@camstack/addon-provider-tuya 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
|
@@ -14358,6 +14358,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
14358
14358
|
auth: "admin"
|
|
14359
14359
|
});
|
|
14360
14360
|
/**
|
|
14361
|
+
* Transport bounds for AI capability methods.
|
|
14362
|
+
*
|
|
14363
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
14364
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
14365
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
14366
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
14367
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
14368
|
+
*/
|
|
14369
|
+
/**
|
|
14370
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
14371
|
+
*
|
|
14372
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
14373
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
14374
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
14375
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
14376
|
+
* the wrong layer and hiding the real one.
|
|
14377
|
+
*
|
|
14378
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
14379
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
14380
|
+
* exactly 60 s and shipped without its text.
|
|
14381
|
+
*
|
|
14382
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
14383
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
14384
|
+
* decide when to stop, because only they can say WHY.
|
|
14385
|
+
*/
|
|
14386
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
14387
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
14388
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
14389
|
+
/**
|
|
14361
14390
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
14362
14391
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
14363
14392
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14629,16 +14658,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14629
14658
|
timeoutMs: number().int().positive().optional()
|
|
14630
14659
|
}), LlmGenerateResultSchema, {
|
|
14631
14660
|
kind: "mutation",
|
|
14632
|
-
auth: "admin"
|
|
14661
|
+
auth: "admin",
|
|
14662
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14633
14663
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14634
14664
|
kind: "mutation",
|
|
14635
|
-
auth: "admin"
|
|
14665
|
+
auth: "admin",
|
|
14666
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14636
14667
|
}), method(object({}), _void(), {
|
|
14637
14668
|
kind: "mutation",
|
|
14638
14669
|
auth: "admin"
|
|
14639
14670
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14640
14671
|
kind: "mutation",
|
|
14641
|
-
auth: "admin"
|
|
14672
|
+
auth: "admin",
|
|
14673
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14642
14674
|
}), method(object({ file: string() }), _void(), {
|
|
14643
14675
|
kind: "mutation",
|
|
14644
14676
|
auth: "admin"
|
|
@@ -14806,7 +14838,13 @@ var ProfileRefInputSchema = object({
|
|
|
14806
14838
|
addonId: string(),
|
|
14807
14839
|
profileId: string()
|
|
14808
14840
|
});
|
|
14809
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14841
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14842
|
+
kind: "mutation",
|
|
14843
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14844
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14845
|
+
kind: "mutation",
|
|
14846
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14847
|
+
}), method(object({
|
|
14810
14848
|
addonId: string().optional(),
|
|
14811
14849
|
requestId: string()
|
|
14812
14850
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14817,7 +14855,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14817
14855
|
auth: "admin"
|
|
14818
14856
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14819
14857
|
kind: "mutation",
|
|
14820
|
-
auth: "admin"
|
|
14858
|
+
auth: "admin",
|
|
14859
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14821
14860
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14822
14861
|
selector: LlmDefaultSelectorSchema,
|
|
14823
14862
|
profileId: string().nullable()
|
|
@@ -15283,17 +15322,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
15283
15322
|
*/
|
|
15284
15323
|
gpuShmemBytes: number().nullable()
|
|
15285
15324
|
}).extend({ atMs: number() });
|
|
15286
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
15287
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
15288
|
-
addonId: string() });
|
|
15289
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
15290
|
-
success: boolean(),
|
|
15291
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
15292
|
-
path: string().optional(),
|
|
15293
|
-
/** Process pid that was signalled. */
|
|
15294
|
-
pid: number().optional(),
|
|
15295
|
-
reason: string().optional()
|
|
15296
|
-
});
|
|
15297
15325
|
/**
|
|
15298
15326
|
* One point of one function's series.
|
|
15299
15327
|
*
|
|
@@ -15417,10 +15445,7 @@ var SystemMetricsSchema = object({
|
|
|
15417
15445
|
gpuPercent: number().optional(),
|
|
15418
15446
|
gpuMemoryPercent: number().optional()
|
|
15419
15447
|
});
|
|
15420
|
-
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)
|
|
15421
|
-
kind: "mutation",
|
|
15422
|
-
auth: "admin"
|
|
15423
|
-
});
|
|
15448
|
+
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);
|
|
15424
15449
|
method(object({
|
|
15425
15450
|
sourceUrl: string(),
|
|
15426
15451
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -19732,7 +19757,8 @@ var MediaFileKindEnum = _enum([
|
|
|
19732
19757
|
"plateCrop",
|
|
19733
19758
|
"keyFrame",
|
|
19734
19759
|
"keyFrameSmall",
|
|
19735
|
-
"thumbnailSmall"
|
|
19760
|
+
"thumbnailSmall",
|
|
19761
|
+
"sceneFrame"
|
|
19736
19762
|
]);
|
|
19737
19763
|
/**
|
|
19738
19764
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35972,12 +35998,6 @@ Object.freeze({
|
|
|
35972
35998
|
addonId: null,
|
|
35973
35999
|
access: "view"
|
|
35974
36000
|
},
|
|
35975
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35976
|
-
capName: "metrics-provider",
|
|
35977
|
-
capScope: "system",
|
|
35978
|
-
addonId: null,
|
|
35979
|
-
access: "create"
|
|
35980
|
-
},
|
|
35981
36001
|
"metricsProvider.getAddonStats": {
|
|
35982
36002
|
capName: "metrics-provider",
|
|
35983
36003
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -14357,6 +14357,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
14357
14357
|
auth: "admin"
|
|
14358
14358
|
});
|
|
14359
14359
|
/**
|
|
14360
|
+
* Transport bounds for AI capability methods.
|
|
14361
|
+
*
|
|
14362
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
14363
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
14364
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
14365
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
14366
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
14367
|
+
*/
|
|
14368
|
+
/**
|
|
14369
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
14370
|
+
*
|
|
14371
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
14372
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
14373
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
14374
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
14375
|
+
* the wrong layer and hiding the real one.
|
|
14376
|
+
*
|
|
14377
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
14378
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
14379
|
+
* exactly 60 s and shipped without its text.
|
|
14380
|
+
*
|
|
14381
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
14382
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
14383
|
+
* decide when to stop, because only they can say WHY.
|
|
14384
|
+
*/
|
|
14385
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
14386
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
14387
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
14388
|
+
/**
|
|
14360
14389
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
14361
14390
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
14362
14391
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14628,16 +14657,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14628
14657
|
timeoutMs: number().int().positive().optional()
|
|
14629
14658
|
}), LlmGenerateResultSchema, {
|
|
14630
14659
|
kind: "mutation",
|
|
14631
|
-
auth: "admin"
|
|
14660
|
+
auth: "admin",
|
|
14661
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14632
14662
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14633
14663
|
kind: "mutation",
|
|
14634
|
-
auth: "admin"
|
|
14664
|
+
auth: "admin",
|
|
14665
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14635
14666
|
}), method(object({}), _void(), {
|
|
14636
14667
|
kind: "mutation",
|
|
14637
14668
|
auth: "admin"
|
|
14638
14669
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14639
14670
|
kind: "mutation",
|
|
14640
|
-
auth: "admin"
|
|
14671
|
+
auth: "admin",
|
|
14672
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14641
14673
|
}), method(object({ file: string() }), _void(), {
|
|
14642
14674
|
kind: "mutation",
|
|
14643
14675
|
auth: "admin"
|
|
@@ -14805,7 +14837,13 @@ var ProfileRefInputSchema = object({
|
|
|
14805
14837
|
addonId: string(),
|
|
14806
14838
|
profileId: string()
|
|
14807
14839
|
});
|
|
14808
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14840
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14841
|
+
kind: "mutation",
|
|
14842
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14843
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14844
|
+
kind: "mutation",
|
|
14845
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14846
|
+
}), method(object({
|
|
14809
14847
|
addonId: string().optional(),
|
|
14810
14848
|
requestId: string()
|
|
14811
14849
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14816,7 +14854,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14816
14854
|
auth: "admin"
|
|
14817
14855
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14818
14856
|
kind: "mutation",
|
|
14819
|
-
auth: "admin"
|
|
14857
|
+
auth: "admin",
|
|
14858
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14820
14859
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14821
14860
|
selector: LlmDefaultSelectorSchema,
|
|
14822
14861
|
profileId: string().nullable()
|
|
@@ -15282,17 +15321,6 @@ var ContainerMemoryPointSchema = object({
|
|
|
15282
15321
|
*/
|
|
15283
15322
|
gpuShmemBytes: number().nullable()
|
|
15284
15323
|
}).extend({ atMs: number() });
|
|
15285
|
-
var DumpHeapSnapshotInputSchema = object({
|
|
15286
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
15287
|
-
addonId: string() });
|
|
15288
|
-
var DumpHeapSnapshotResultSchema = object({
|
|
15289
|
-
success: boolean(),
|
|
15290
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
15291
|
-
path: string().optional(),
|
|
15292
|
-
/** Process pid that was signalled. */
|
|
15293
|
-
pid: number().optional(),
|
|
15294
|
-
reason: string().optional()
|
|
15295
|
-
});
|
|
15296
15324
|
/**
|
|
15297
15325
|
* One point of one function's series.
|
|
15298
15326
|
*
|
|
@@ -15416,10 +15444,7 @@ var SystemMetricsSchema = object({
|
|
|
15416
15444
|
gpuPercent: number().optional(),
|
|
15417
15445
|
gpuMemoryPercent: number().optional()
|
|
15418
15446
|
});
|
|
15419
|
-
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)
|
|
15420
|
-
kind: "mutation",
|
|
15421
|
-
auth: "admin"
|
|
15422
|
-
});
|
|
15447
|
+
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);
|
|
15423
15448
|
method(object({
|
|
15424
15449
|
sourceUrl: string(),
|
|
15425
15450
|
metadata: ModelConvertMetadataSchema,
|
|
@@ -19731,7 +19756,8 @@ var MediaFileKindEnum = _enum([
|
|
|
19731
19756
|
"plateCrop",
|
|
19732
19757
|
"keyFrame",
|
|
19733
19758
|
"keyFrameSmall",
|
|
19734
|
-
"thumbnailSmall"
|
|
19759
|
+
"thumbnailSmall",
|
|
19760
|
+
"sceneFrame"
|
|
19735
19761
|
]);
|
|
19736
19762
|
/**
|
|
19737
19763
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -35971,12 +35997,6 @@ Object.freeze({
|
|
|
35971
35997
|
addonId: null,
|
|
35972
35998
|
access: "view"
|
|
35973
35999
|
},
|
|
35974
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
35975
|
-
capName: "metrics-provider",
|
|
35976
|
-
capScope: "system",
|
|
35977
|
-
addonId: null,
|
|
35978
|
-
access: "create"
|
|
35979
|
-
},
|
|
35980
36000
|
"metricsProvider.getAddonStats": {
|
|
35981
36001
|
capName: "metrics-provider",
|
|
35982
36002
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.56",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|