@camstack/addon-provider-unifi 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 +47 -27
- package/dist/addon.mjs +47 -27
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -13521,6 +13521,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13521
13521
|
auth: "admin"
|
|
13522
13522
|
});
|
|
13523
13523
|
/**
|
|
13524
|
+
* Transport bounds for AI capability methods.
|
|
13525
|
+
*
|
|
13526
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13527
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13528
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13529
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13530
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13531
|
+
*/
|
|
13532
|
+
/**
|
|
13533
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13534
|
+
*
|
|
13535
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13536
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13537
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13538
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13539
|
+
* the wrong layer and hiding the real one.
|
|
13540
|
+
*
|
|
13541
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13542
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13543
|
+
* exactly 60 s and shipped without its text.
|
|
13544
|
+
*
|
|
13545
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13546
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13547
|
+
* decide when to stop, because only they can say WHY.
|
|
13548
|
+
*/
|
|
13549
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13550
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13551
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13552
|
+
/**
|
|
13524
13553
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13525
13554
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13526
13555
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13792,16 +13821,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13792
13821
|
timeoutMs: number().int().positive().optional()
|
|
13793
13822
|
}), LlmGenerateResultSchema, {
|
|
13794
13823
|
kind: "mutation",
|
|
13795
|
-
auth: "admin"
|
|
13824
|
+
auth: "admin",
|
|
13825
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13796
13826
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13797
13827
|
kind: "mutation",
|
|
13798
|
-
auth: "admin"
|
|
13828
|
+
auth: "admin",
|
|
13829
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13799
13830
|
}), method(object({}), _void(), {
|
|
13800
13831
|
kind: "mutation",
|
|
13801
13832
|
auth: "admin"
|
|
13802
13833
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13803
13834
|
kind: "mutation",
|
|
13804
|
-
auth: "admin"
|
|
13835
|
+
auth: "admin",
|
|
13836
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13805
13837
|
}), method(object({ file: string() }), _void(), {
|
|
13806
13838
|
kind: "mutation",
|
|
13807
13839
|
auth: "admin"
|
|
@@ -13969,7 +14001,13 @@ var ProfileRefInputSchema = object({
|
|
|
13969
14001
|
addonId: string(),
|
|
13970
14002
|
profileId: string()
|
|
13971
14003
|
});
|
|
13972
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14004
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14005
|
+
kind: "mutation",
|
|
14006
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14007
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14008
|
+
kind: "mutation",
|
|
14009
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14010
|
+
}), method(object({
|
|
13973
14011
|
addonId: string().optional(),
|
|
13974
14012
|
requestId: string()
|
|
13975
14013
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13980,7 +14018,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13980
14018
|
auth: "admin"
|
|
13981
14019
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13982
14020
|
kind: "mutation",
|
|
13983
|
-
auth: "admin"
|
|
14021
|
+
auth: "admin",
|
|
14022
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13984
14023
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13985
14024
|
selector: LlmDefaultSelectorSchema,
|
|
13986
14025
|
profileId: string().nullable()
|
|
@@ -14446,17 +14485,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
14446
14485
|
*/
|
|
14447
14486
|
gpuShmemBytes: number().nullable()
|
|
14448
14487
|
}).extend({ atMs: number() });
|
|
14449
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
14450
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
14451
|
-
addonId: string() });
|
|
14452
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
14453
|
-
success: boolean(),
|
|
14454
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14455
|
-
path: string().optional(),
|
|
14456
|
-
/** Process pid that was signalled. */
|
|
14457
|
-
pid: number().optional(),
|
|
14458
|
-
reason: string().optional()
|
|
14459
|
-
});
|
|
14460
14488
|
/**
|
|
14461
14489
|
* One point of one function's series.
|
|
14462
14490
|
*
|
|
@@ -14580,10 +14608,7 @@ var SystemMetricsSchema = object({
|
|
|
14580
14608
|
gpuPercent: number().optional(),
|
|
14581
14609
|
gpuMemoryPercent: number().optional()
|
|
14582
14610
|
});
|
|
14583
|
-
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)
|
|
14584
|
-
kind: "mutation",
|
|
14585
|
-
auth: "admin"
|
|
14586
|
-
});
|
|
14611
|
+
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);
|
|
14587
14612
|
method(object({
|
|
14588
14613
|
sourceUrl: string(),
|
|
14589
14614
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -18895,7 +18920,8 @@ var MediaFileKindEnum = _enum([
|
|
|
18895
18920
|
"plateCrop",
|
|
18896
18921
|
"keyFrame",
|
|
18897
18922
|
"keyFrameSmall",
|
|
18898
|
-
"thumbnailSmall"
|
|
18923
|
+
"thumbnailSmall",
|
|
18924
|
+
"sceneFrame"
|
|
18899
18925
|
]);
|
|
18900
18926
|
/**
|
|
18901
18927
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35144,12 +35170,6 @@ Object.freeze({
|
|
|
35144
35170
|
addonId: null,
|
|
35145
35171
|
access: "view"
|
|
35146
35172
|
},
|
|
35147
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35148
|
-
capName: "metrics-provider",
|
|
35149
|
-
capScope: "system",
|
|
35150
|
-
addonId: null,
|
|
35151
|
-
access: "create"
|
|
35152
|
-
},
|
|
35153
35173
|
"metricsProvider.getAddonStats": {
|
|
35154
35174
|
capName: "metrics-provider",
|
|
35155
35175
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -13520,6 +13520,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13520
13520
|
auth: "admin"
|
|
13521
13521
|
});
|
|
13522
13522
|
/**
|
|
13523
|
+
* Transport bounds for AI capability methods.
|
|
13524
|
+
*
|
|
13525
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13526
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13527
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13528
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13529
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13530
|
+
*/
|
|
13531
|
+
/**
|
|
13532
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13533
|
+
*
|
|
13534
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13535
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13536
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13537
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13538
|
+
* the wrong layer and hiding the real one.
|
|
13539
|
+
*
|
|
13540
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13541
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13542
|
+
* exactly 60 s and shipped without its text.
|
|
13543
|
+
*
|
|
13544
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13545
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13546
|
+
* decide when to stop, because only they can say WHY.
|
|
13547
|
+
*/
|
|
13548
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13549
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13550
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13551
|
+
/**
|
|
13523
13552
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13524
13553
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13525
13554
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13791,16 +13820,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13791
13820
|
timeoutMs: number().int().positive().optional()
|
|
13792
13821
|
}), LlmGenerateResultSchema, {
|
|
13793
13822
|
kind: "mutation",
|
|
13794
|
-
auth: "admin"
|
|
13823
|
+
auth: "admin",
|
|
13824
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13795
13825
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13796
13826
|
kind: "mutation",
|
|
13797
|
-
auth: "admin"
|
|
13827
|
+
auth: "admin",
|
|
13828
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13798
13829
|
}), method(object({}), _void(), {
|
|
13799
13830
|
kind: "mutation",
|
|
13800
13831
|
auth: "admin"
|
|
13801
13832
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13802
13833
|
kind: "mutation",
|
|
13803
|
-
auth: "admin"
|
|
13834
|
+
auth: "admin",
|
|
13835
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13804
13836
|
}), method(object({ file: string() }), _void(), {
|
|
13805
13837
|
kind: "mutation",
|
|
13806
13838
|
auth: "admin"
|
|
@@ -13968,7 +14000,13 @@ var ProfileRefInputSchema = object({
|
|
|
13968
14000
|
addonId: string(),
|
|
13969
14001
|
profileId: string()
|
|
13970
14002
|
});
|
|
13971
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14003
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14004
|
+
kind: "mutation",
|
|
14005
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14006
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14007
|
+
kind: "mutation",
|
|
14008
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14009
|
+
}), method(object({
|
|
13972
14010
|
addonId: string().optional(),
|
|
13973
14011
|
requestId: string()
|
|
13974
14012
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13979,7 +14017,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13979
14017
|
auth: "admin"
|
|
13980
14018
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13981
14019
|
kind: "mutation",
|
|
13982
|
-
auth: "admin"
|
|
14020
|
+
auth: "admin",
|
|
14021
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13983
14022
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13984
14023
|
selector: LlmDefaultSelectorSchema,
|
|
13985
14024
|
profileId: string().nullable()
|
|
@@ -14445,17 +14484,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
14445
14484
|
*/
|
|
14446
14485
|
gpuShmemBytes: number().nullable()
|
|
14447
14486
|
}).extend({ atMs: number() });
|
|
14448
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
14449
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
14450
|
-
addonId: string() });
|
|
14451
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
14452
|
-
success: boolean(),
|
|
14453
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14454
|
-
path: string().optional(),
|
|
14455
|
-
/** Process pid that was signalled. */
|
|
14456
|
-
pid: number().optional(),
|
|
14457
|
-
reason: string().optional()
|
|
14458
|
-
});
|
|
14459
14487
|
/**
|
|
14460
14488
|
* One point of one function's series.
|
|
14461
14489
|
*
|
|
@@ -14579,10 +14607,7 @@ var SystemMetricsSchema = object({
|
|
|
14579
14607
|
gpuPercent: number().optional(),
|
|
14580
14608
|
gpuMemoryPercent: number().optional()
|
|
14581
14609
|
});
|
|
14582
|
-
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)
|
|
14583
|
-
kind: "mutation",
|
|
14584
|
-
auth: "admin"
|
|
14585
|
-
});
|
|
14610
|
+
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);
|
|
14586
14611
|
method(object({
|
|
14587
14612
|
sourceUrl: string(),
|
|
14588
14613
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -18894,7 +18919,8 @@ var MediaFileKindEnum = _enum([
|
|
|
18894
18919
|
"plateCrop",
|
|
18895
18920
|
"keyFrame",
|
|
18896
18921
|
"keyFrameSmall",
|
|
18897
|
-
"thumbnailSmall"
|
|
18922
|
+
"thumbnailSmall",
|
|
18923
|
+
"sceneFrame"
|
|
18898
18924
|
]);
|
|
18899
18925
|
/**
|
|
18900
18926
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35143,12 +35169,6 @@ Object.freeze({
|
|
|
35143
35169
|
addonId: null,
|
|
35144
35170
|
access: "view"
|
|
35145
35171
|
},
|
|
35146
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35147
|
-
capName: "metrics-provider",
|
|
35148
|
-
capScope: "system",
|
|
35149
|
-
addonId: null,
|
|
35150
|
-
access: "create"
|
|
35151
|
-
},
|
|
35152
35172
|
"metricsProvider.getAddonStats": {
|
|
35153
35173
|
capName: "metrics-provider",
|
|
35154
35174
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.56",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|