@camstack/addon-provider-unifi 0.2.53 → 0.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/addon.js +44 -5
- package/dist/addon.mjs +44 -5
- 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()
|
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()
|
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.55",
|
|
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",
|