@camstack/addon-provider-dreo 0.2.52 → 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 +82 -7
- package/dist/addon.mjs +82 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7754,7 +7754,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7754
7754
|
"quota",
|
|
7755
7755
|
"manual",
|
|
7756
7756
|
"operator",
|
|
7757
|
-
"maintenance"
|
|
7757
|
+
"maintenance",
|
|
7758
|
+
"orphaned-device"
|
|
7758
7759
|
]);
|
|
7759
7760
|
/** One audit row, shared verbatim by both domains. */
|
|
7760
7761
|
var OpsLogEntrySchema = object({
|
|
@@ -13066,10 +13067,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13066
13067
|
deviceId: number(),
|
|
13067
13068
|
data: record(string(), unknown())
|
|
13068
13069
|
});
|
|
13070
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13071
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13072
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13073
|
+
"off",
|
|
13074
|
+
"on",
|
|
13075
|
+
"not-offered",
|
|
13076
|
+
"unreachable"
|
|
13077
|
+
]);
|
|
13078
|
+
var MigrateSwitchReportSchema = object({
|
|
13079
|
+
deviceId: number(),
|
|
13080
|
+
switchId: CameraSwitchIdSchema,
|
|
13081
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13082
|
+
detail: string().optional()
|
|
13083
|
+
});
|
|
13084
|
+
var MigrateDeviceResultSchema = object({
|
|
13085
|
+
sourceId: number(),
|
|
13086
|
+
targetId: number(),
|
|
13087
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13088
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13089
|
+
* value meaning the replaced hardware is quiet. */
|
|
13090
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13091
|
+
swapped: boolean()
|
|
13092
|
+
});
|
|
13069
13093
|
method(object({
|
|
13070
13094
|
addonId: string(),
|
|
13071
13095
|
stableId: string()
|
|
13072
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13096
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13097
|
+
sourceId: number(),
|
|
13098
|
+
targetId: number()
|
|
13099
|
+
}), MigrateDeviceResultSchema, {
|
|
13100
|
+
kind: "mutation",
|
|
13101
|
+
auth: "admin"
|
|
13102
|
+
}), 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({
|
|
13073
13103
|
deviceId: number(),
|
|
13074
13104
|
name: string()
|
|
13075
13105
|
}), _void(), {
|
|
@@ -13544,6 +13574,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13544
13574
|
auth: "admin"
|
|
13545
13575
|
});
|
|
13546
13576
|
/**
|
|
13577
|
+
* Transport bounds for AI capability methods.
|
|
13578
|
+
*
|
|
13579
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13580
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13581
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13582
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13583
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13584
|
+
*/
|
|
13585
|
+
/**
|
|
13586
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13587
|
+
*
|
|
13588
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13589
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13590
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13591
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13592
|
+
* the wrong layer and hiding the real one.
|
|
13593
|
+
*
|
|
13594
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13595
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13596
|
+
* exactly 60 s and shipped without its text.
|
|
13597
|
+
*
|
|
13598
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13599
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13600
|
+
* decide when to stop, because only they can say WHY.
|
|
13601
|
+
*/
|
|
13602
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13603
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13604
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13605
|
+
/**
|
|
13547
13606
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13548
13607
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13549
13608
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13815,16 +13874,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13815
13874
|
timeoutMs: number().int().positive().optional()
|
|
13816
13875
|
}), LlmGenerateResultSchema, {
|
|
13817
13876
|
kind: "mutation",
|
|
13818
|
-
auth: "admin"
|
|
13877
|
+
auth: "admin",
|
|
13878
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13819
13879
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13820
13880
|
kind: "mutation",
|
|
13821
|
-
auth: "admin"
|
|
13881
|
+
auth: "admin",
|
|
13882
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13822
13883
|
}), method(object({}), _void(), {
|
|
13823
13884
|
kind: "mutation",
|
|
13824
13885
|
auth: "admin"
|
|
13825
13886
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13826
13887
|
kind: "mutation",
|
|
13827
|
-
auth: "admin"
|
|
13888
|
+
auth: "admin",
|
|
13889
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13828
13890
|
}), method(object({ file: string() }), _void(), {
|
|
13829
13891
|
kind: "mutation",
|
|
13830
13892
|
auth: "admin"
|
|
@@ -13992,7 +14054,13 @@ var ProfileRefInputSchema = object({
|
|
|
13992
14054
|
addonId: string(),
|
|
13993
14055
|
profileId: string()
|
|
13994
14056
|
});
|
|
13995
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14057
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14058
|
+
kind: "mutation",
|
|
14059
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14060
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14061
|
+
kind: "mutation",
|
|
14062
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14063
|
+
}), method(object({
|
|
13996
14064
|
addonId: string().optional(),
|
|
13997
14065
|
requestId: string()
|
|
13998
14066
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14003,7 +14071,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14003
14071
|
auth: "admin"
|
|
14004
14072
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14005
14073
|
kind: "mutation",
|
|
14006
|
-
auth: "admin"
|
|
14074
|
+
auth: "admin",
|
|
14075
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14007
14076
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14008
14077
|
selector: LlmDefaultSelectorSchema,
|
|
14009
14078
|
profileId: string().nullable()
|
|
@@ -34072,6 +34141,12 @@ Object.freeze({
|
|
|
34072
34141
|
addonId: null,
|
|
34073
34142
|
access: "view"
|
|
34074
34143
|
},
|
|
34144
|
+
"deviceManager.migrateDevice": {
|
|
34145
|
+
capName: "device-manager",
|
|
34146
|
+
capScope: "system",
|
|
34147
|
+
addonId: null,
|
|
34148
|
+
access: "create"
|
|
34149
|
+
},
|
|
34075
34150
|
"deviceManager.persistConfig": {
|
|
34076
34151
|
capName: "device-manager",
|
|
34077
34152
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7755,7 +7755,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7755
7755
|
"quota",
|
|
7756
7756
|
"manual",
|
|
7757
7757
|
"operator",
|
|
7758
|
-
"maintenance"
|
|
7758
|
+
"maintenance",
|
|
7759
|
+
"orphaned-device"
|
|
7759
7760
|
]);
|
|
7760
7761
|
/** One audit row, shared verbatim by both domains. */
|
|
7761
7762
|
var OpsLogEntrySchema = object({
|
|
@@ -13067,10 +13068,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13067
13068
|
deviceId: number(),
|
|
13068
13069
|
data: record(string(), unknown())
|
|
13069
13070
|
});
|
|
13071
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13072
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13073
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13074
|
+
"off",
|
|
13075
|
+
"on",
|
|
13076
|
+
"not-offered",
|
|
13077
|
+
"unreachable"
|
|
13078
|
+
]);
|
|
13079
|
+
var MigrateSwitchReportSchema = object({
|
|
13080
|
+
deviceId: number(),
|
|
13081
|
+
switchId: CameraSwitchIdSchema,
|
|
13082
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13083
|
+
detail: string().optional()
|
|
13084
|
+
});
|
|
13085
|
+
var MigrateDeviceResultSchema = object({
|
|
13086
|
+
sourceId: number(),
|
|
13087
|
+
targetId: number(),
|
|
13088
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13089
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13090
|
+
* value meaning the replaced hardware is quiet. */
|
|
13091
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13092
|
+
swapped: boolean()
|
|
13093
|
+
});
|
|
13070
13094
|
method(object({
|
|
13071
13095
|
addonId: string(),
|
|
13072
13096
|
stableId: string()
|
|
13073
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13097
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13098
|
+
sourceId: number(),
|
|
13099
|
+
targetId: number()
|
|
13100
|
+
}), MigrateDeviceResultSchema, {
|
|
13101
|
+
kind: "mutation",
|
|
13102
|
+
auth: "admin"
|
|
13103
|
+
}), 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({
|
|
13074
13104
|
deviceId: number(),
|
|
13075
13105
|
name: string()
|
|
13076
13106
|
}), _void(), {
|
|
@@ -13545,6 +13575,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13545
13575
|
auth: "admin"
|
|
13546
13576
|
});
|
|
13547
13577
|
/**
|
|
13578
|
+
* Transport bounds for AI capability methods.
|
|
13579
|
+
*
|
|
13580
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13581
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13582
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13583
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13584
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13585
|
+
*/
|
|
13586
|
+
/**
|
|
13587
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13588
|
+
*
|
|
13589
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13590
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13591
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13592
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13593
|
+
* the wrong layer and hiding the real one.
|
|
13594
|
+
*
|
|
13595
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13596
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13597
|
+
* exactly 60 s and shipped without its text.
|
|
13598
|
+
*
|
|
13599
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13600
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13601
|
+
* decide when to stop, because only they can say WHY.
|
|
13602
|
+
*/
|
|
13603
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13604
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13605
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13606
|
+
/**
|
|
13548
13607
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13549
13608
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13550
13609
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13816,16 +13875,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13816
13875
|
timeoutMs: number().int().positive().optional()
|
|
13817
13876
|
}), LlmGenerateResultSchema, {
|
|
13818
13877
|
kind: "mutation",
|
|
13819
|
-
auth: "admin"
|
|
13878
|
+
auth: "admin",
|
|
13879
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13820
13880
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13821
13881
|
kind: "mutation",
|
|
13822
|
-
auth: "admin"
|
|
13882
|
+
auth: "admin",
|
|
13883
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13823
13884
|
}), method(object({}), _void(), {
|
|
13824
13885
|
kind: "mutation",
|
|
13825
13886
|
auth: "admin"
|
|
13826
13887
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13827
13888
|
kind: "mutation",
|
|
13828
|
-
auth: "admin"
|
|
13889
|
+
auth: "admin",
|
|
13890
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13829
13891
|
}), method(object({ file: string() }), _void(), {
|
|
13830
13892
|
kind: "mutation",
|
|
13831
13893
|
auth: "admin"
|
|
@@ -13993,7 +14055,13 @@ var ProfileRefInputSchema = object({
|
|
|
13993
14055
|
addonId: string(),
|
|
13994
14056
|
profileId: string()
|
|
13995
14057
|
});
|
|
13996
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14058
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14059
|
+
kind: "mutation",
|
|
14060
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14061
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14062
|
+
kind: "mutation",
|
|
14063
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14064
|
+
}), method(object({
|
|
13997
14065
|
addonId: string().optional(),
|
|
13998
14066
|
requestId: string()
|
|
13999
14067
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14004,7 +14072,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14004
14072
|
auth: "admin"
|
|
14005
14073
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14006
14074
|
kind: "mutation",
|
|
14007
|
-
auth: "admin"
|
|
14075
|
+
auth: "admin",
|
|
14076
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14008
14077
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14009
14078
|
selector: LlmDefaultSelectorSchema,
|
|
14010
14079
|
profileId: string().nullable()
|
|
@@ -34073,6 +34142,12 @@ Object.freeze({
|
|
|
34073
34142
|
addonId: null,
|
|
34074
34143
|
access: "view"
|
|
34075
34144
|
},
|
|
34145
|
+
"deviceManager.migrateDevice": {
|
|
34146
|
+
capName: "device-manager",
|
|
34147
|
+
capScope: "system",
|
|
34148
|
+
addonId: null,
|
|
34149
|
+
access: "create"
|
|
34150
|
+
},
|
|
34076
34151
|
"deviceManager.persistConfig": {
|
|
34077
34152
|
capName: "device-manager",
|
|
34078
34153
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.55",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|