@camstack/addon-provider-amcrest 0.2.54 → 0.2.57
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 +47 -27
- package/dist/addon.mjs +47 -27
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -13514,6 +13514,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13514
13514
|
auth: "admin"
|
|
13515
13515
|
});
|
|
13516
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
|
+
/**
|
|
13517
13546
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13518
13547
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13519
13548
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13785,16 +13814,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13785
13814
|
timeoutMs: number().int().positive().optional()
|
|
13786
13815
|
}), LlmGenerateResultSchema, {
|
|
13787
13816
|
kind: "mutation",
|
|
13788
|
-
auth: "admin"
|
|
13817
|
+
auth: "admin",
|
|
13818
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13789
13819
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13790
13820
|
kind: "mutation",
|
|
13791
|
-
auth: "admin"
|
|
13821
|
+
auth: "admin",
|
|
13822
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13792
13823
|
}), method(object({}), _void(), {
|
|
13793
13824
|
kind: "mutation",
|
|
13794
13825
|
auth: "admin"
|
|
13795
13826
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13796
13827
|
kind: "mutation",
|
|
13797
|
-
auth: "admin"
|
|
13828
|
+
auth: "admin",
|
|
13829
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13798
13830
|
}), method(object({ file: string() }), _void(), {
|
|
13799
13831
|
kind: "mutation",
|
|
13800
13832
|
auth: "admin"
|
|
@@ -13962,7 +13994,13 @@ var ProfileRefInputSchema = object({
|
|
|
13962
13994
|
addonId: string(),
|
|
13963
13995
|
profileId: string()
|
|
13964
13996
|
});
|
|
13965
|
-
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({
|
|
13966
14004
|
addonId: string().optional(),
|
|
13967
14005
|
requestId: string()
|
|
13968
14006
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13973,7 +14011,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13973
14011
|
auth: "admin"
|
|
13974
14012
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13975
14013
|
kind: "mutation",
|
|
13976
|
-
auth: "admin"
|
|
14014
|
+
auth: "admin",
|
|
14015
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13977
14016
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13978
14017
|
selector: LlmDefaultSelectorSchema,
|
|
13979
14018
|
profileId: string().nullable()
|
|
@@ -14439,17 +14478,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
14439
14478
|
*/
|
|
14440
14479
|
gpuShmemBytes: number().nullable()
|
|
14441
14480
|
}).extend({ atMs: number() });
|
|
14442
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
14443
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
14444
|
-
addonId: string() });
|
|
14445
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
14446
|
-
success: boolean(),
|
|
14447
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14448
|
-
path: string().optional(),
|
|
14449
|
-
/** Process pid that was signalled. */
|
|
14450
|
-
pid: number().optional(),
|
|
14451
|
-
reason: string().optional()
|
|
14452
|
-
});
|
|
14453
14481
|
/**
|
|
14454
14482
|
* One point of one function's series.
|
|
14455
14483
|
*
|
|
@@ -14573,10 +14601,7 @@ var SystemMetricsSchema = object({
|
|
|
14573
14601
|
gpuPercent: number().optional(),
|
|
14574
14602
|
gpuMemoryPercent: number().optional()
|
|
14575
14603
|
});
|
|
14576
|
-
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
14577
|
-
kind: "mutation",
|
|
14578
|
-
auth: "admin"
|
|
14579
|
-
});
|
|
14604
|
+
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
|
|
14580
14605
|
method(object({
|
|
14581
14606
|
sourceUrl: string(),
|
|
14582
14607
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -18888,7 +18913,8 @@ var MediaFileKindEnum = _enum([
|
|
|
18888
18913
|
"plateCrop",
|
|
18889
18914
|
"keyFrame",
|
|
18890
18915
|
"keyFrameSmall",
|
|
18891
|
-
"thumbnailSmall"
|
|
18916
|
+
"thumbnailSmall",
|
|
18917
|
+
"sceneFrame"
|
|
18892
18918
|
]);
|
|
18893
18919
|
/**
|
|
18894
18920
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35716,12 +35742,6 @@ Object.freeze({
|
|
|
35716
35742
|
addonId: null,
|
|
35717
35743
|
access: "view"
|
|
35718
35744
|
},
|
|
35719
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35720
|
-
capName: "metrics-provider",
|
|
35721
|
-
capScope: "system",
|
|
35722
|
-
addonId: null,
|
|
35723
|
-
access: "create"
|
|
35724
|
-
},
|
|
35725
35745
|
"metricsProvider.getAddonStats": {
|
|
35726
35746
|
capName: "metrics-provider",
|
|
35727
35747
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -13515,6 +13515,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13515
13515
|
auth: "admin"
|
|
13516
13516
|
});
|
|
13517
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
|
+
/**
|
|
13518
13547
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13519
13548
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13520
13549
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13786,16 +13815,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13786
13815
|
timeoutMs: number().int().positive().optional()
|
|
13787
13816
|
}), LlmGenerateResultSchema, {
|
|
13788
13817
|
kind: "mutation",
|
|
13789
|
-
auth: "admin"
|
|
13818
|
+
auth: "admin",
|
|
13819
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13790
13820
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13791
13821
|
kind: "mutation",
|
|
13792
|
-
auth: "admin"
|
|
13822
|
+
auth: "admin",
|
|
13823
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13793
13824
|
}), method(object({}), _void(), {
|
|
13794
13825
|
kind: "mutation",
|
|
13795
13826
|
auth: "admin"
|
|
13796
13827
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13797
13828
|
kind: "mutation",
|
|
13798
|
-
auth: "admin"
|
|
13829
|
+
auth: "admin",
|
|
13830
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13799
13831
|
}), method(object({ file: string() }), _void(), {
|
|
13800
13832
|
kind: "mutation",
|
|
13801
13833
|
auth: "admin"
|
|
@@ -13963,7 +13995,13 @@ var ProfileRefInputSchema = object({
|
|
|
13963
13995
|
addonId: string(),
|
|
13964
13996
|
profileId: string()
|
|
13965
13997
|
});
|
|
13966
|
-
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({
|
|
13967
14005
|
addonId: string().optional(),
|
|
13968
14006
|
requestId: string()
|
|
13969
14007
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13974,7 +14012,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13974
14012
|
auth: "admin"
|
|
13975
14013
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13976
14014
|
kind: "mutation",
|
|
13977
|
-
auth: "admin"
|
|
14015
|
+
auth: "admin",
|
|
14016
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13978
14017
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13979
14018
|
selector: LlmDefaultSelectorSchema,
|
|
13980
14019
|
profileId: string().nullable()
|
|
@@ -14440,17 +14479,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
14440
14479
|
*/
|
|
14441
14480
|
gpuShmemBytes: number().nullable()
|
|
14442
14481
|
}).extend({ atMs: number() });
|
|
14443
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
14444
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
14445
|
-
addonId: string() });
|
|
14446
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
14447
|
-
success: boolean(),
|
|
14448
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14449
|
-
path: string().optional(),
|
|
14450
|
-
/** Process pid that was signalled. */
|
|
14451
|
-
pid: number().optional(),
|
|
14452
|
-
reason: string().optional()
|
|
14453
|
-
});
|
|
14454
14482
|
/**
|
|
14455
14483
|
* One point of one function's series.
|
|
14456
14484
|
*
|
|
@@ -14574,10 +14602,7 @@ var SystemMetricsSchema = object({
|
|
|
14574
14602
|
gpuPercent: number().optional(),
|
|
14575
14603
|
gpuMemoryPercent: number().optional()
|
|
14576
14604
|
});
|
|
14577
|
-
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
14578
|
-
kind: "mutation",
|
|
14579
|
-
auth: "admin"
|
|
14580
|
-
});
|
|
14605
|
+
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
|
|
14581
14606
|
method(object({
|
|
14582
14607
|
sourceUrl: string(),
|
|
14583
14608
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -18889,7 +18914,8 @@ var MediaFileKindEnum = _enum([
|
|
|
18889
18914
|
"plateCrop",
|
|
18890
18915
|
"keyFrame",
|
|
18891
18916
|
"keyFrameSmall",
|
|
18892
|
-
"thumbnailSmall"
|
|
18917
|
+
"thumbnailSmall",
|
|
18918
|
+
"sceneFrame"
|
|
18893
18919
|
]);
|
|
18894
18920
|
/**
|
|
18895
18921
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35717,12 +35743,6 @@ Object.freeze({
|
|
|
35717
35743
|
addonId: null,
|
|
35718
35744
|
access: "view"
|
|
35719
35745
|
},
|
|
35720
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35721
|
-
capName: "metrics-provider",
|
|
35722
|
-
capScope: "system",
|
|
35723
|
-
addonId: null,
|
|
35724
|
-
access: "create"
|
|
35725
|
-
},
|
|
35726
35746
|
"metricsProvider.getAddonStats": {
|
|
35727
35747
|
capName: "metrics-provider",
|
|
35728
35748
|
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.57",
|
|
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",
|