@camstack/addon-import-alexa 0.2.51 → 0.2.54
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
|
@@ -7876,7 +7876,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7876
7876
|
"quota",
|
|
7877
7877
|
"manual",
|
|
7878
7878
|
"operator",
|
|
7879
|
-
"maintenance"
|
|
7879
|
+
"maintenance",
|
|
7880
|
+
"orphaned-device"
|
|
7880
7881
|
]);
|
|
7881
7882
|
/** One audit row, shared verbatim by both domains. */
|
|
7882
7883
|
var OpsLogEntrySchema = object({
|
|
@@ -13256,10 +13257,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13256
13257
|
deviceId: number(),
|
|
13257
13258
|
data: record(string(), unknown())
|
|
13258
13259
|
});
|
|
13260
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13261
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13262
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13263
|
+
"off",
|
|
13264
|
+
"on",
|
|
13265
|
+
"not-offered",
|
|
13266
|
+
"unreachable"
|
|
13267
|
+
]);
|
|
13268
|
+
var MigrateSwitchReportSchema = object({
|
|
13269
|
+
deviceId: number(),
|
|
13270
|
+
switchId: CameraSwitchIdSchema,
|
|
13271
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13272
|
+
detail: string().optional()
|
|
13273
|
+
});
|
|
13274
|
+
var MigrateDeviceResultSchema = object({
|
|
13275
|
+
sourceId: number(),
|
|
13276
|
+
targetId: number(),
|
|
13277
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13278
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13279
|
+
* value meaning the replaced hardware is quiet. */
|
|
13280
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13281
|
+
swapped: boolean()
|
|
13282
|
+
});
|
|
13259
13283
|
method(object({
|
|
13260
13284
|
addonId: string(),
|
|
13261
13285
|
stableId: string()
|
|
13262
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13286
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13287
|
+
sourceId: number(),
|
|
13288
|
+
targetId: number()
|
|
13289
|
+
}), MigrateDeviceResultSchema, {
|
|
13290
|
+
kind: "mutation",
|
|
13291
|
+
auth: "admin"
|
|
13292
|
+
}), 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({
|
|
13263
13293
|
deviceId: number(),
|
|
13264
13294
|
name: string()
|
|
13265
13295
|
}), _void(), {
|
|
@@ -13734,6 +13764,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13734
13764
|
auth: "admin"
|
|
13735
13765
|
});
|
|
13736
13766
|
/**
|
|
13767
|
+
* Transport bounds for AI capability methods.
|
|
13768
|
+
*
|
|
13769
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13770
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13771
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13772
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13773
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13774
|
+
*/
|
|
13775
|
+
/**
|
|
13776
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13777
|
+
*
|
|
13778
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13779
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13780
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13781
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13782
|
+
* the wrong layer and hiding the real one.
|
|
13783
|
+
*
|
|
13784
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13785
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13786
|
+
* exactly 60 s and shipped without its text.
|
|
13787
|
+
*
|
|
13788
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13789
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13790
|
+
* decide when to stop, because only they can say WHY.
|
|
13791
|
+
*/
|
|
13792
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13793
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13794
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13795
|
+
/**
|
|
13737
13796
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13738
13797
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13739
13798
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14005,16 +14064,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14005
14064
|
timeoutMs: number().int().positive().optional()
|
|
14006
14065
|
}), LlmGenerateResultSchema, {
|
|
14007
14066
|
kind: "mutation",
|
|
14008
|
-
auth: "admin"
|
|
14067
|
+
auth: "admin",
|
|
14068
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14009
14069
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14010
14070
|
kind: "mutation",
|
|
14011
|
-
auth: "admin"
|
|
14071
|
+
auth: "admin",
|
|
14072
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14012
14073
|
}), method(object({}), _void(), {
|
|
14013
14074
|
kind: "mutation",
|
|
14014
14075
|
auth: "admin"
|
|
14015
14076
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14016
14077
|
kind: "mutation",
|
|
14017
|
-
auth: "admin"
|
|
14078
|
+
auth: "admin",
|
|
14079
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14018
14080
|
}), method(object({ file: string() }), _void(), {
|
|
14019
14081
|
kind: "mutation",
|
|
14020
14082
|
auth: "admin"
|
|
@@ -14182,7 +14244,13 @@ var ProfileRefInputSchema = object({
|
|
|
14182
14244
|
addonId: string(),
|
|
14183
14245
|
profileId: string()
|
|
14184
14246
|
});
|
|
14185
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14247
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14248
|
+
kind: "mutation",
|
|
14249
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14250
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14251
|
+
kind: "mutation",
|
|
14252
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14253
|
+
}), method(object({
|
|
14186
14254
|
addonId: string().optional(),
|
|
14187
14255
|
requestId: string()
|
|
14188
14256
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14193,7 +14261,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14193
14261
|
auth: "admin"
|
|
14194
14262
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14195
14263
|
kind: "mutation",
|
|
14196
|
-
auth: "admin"
|
|
14264
|
+
auth: "admin",
|
|
14265
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14197
14266
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14198
14267
|
selector: LlmDefaultSelectorSchema,
|
|
14199
14268
|
profileId: string().nullable()
|
|
@@ -34271,6 +34340,12 @@ Object.freeze({
|
|
|
34271
34340
|
addonId: null,
|
|
34272
34341
|
access: "view"
|
|
34273
34342
|
},
|
|
34343
|
+
"deviceManager.migrateDevice": {
|
|
34344
|
+
capName: "device-manager",
|
|
34345
|
+
capScope: "system",
|
|
34346
|
+
addonId: null,
|
|
34347
|
+
access: "create"
|
|
34348
|
+
},
|
|
34274
34349
|
"deviceManager.persistConfig": {
|
|
34275
34350
|
capName: "device-manager",
|
|
34276
34351
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7876,7 +7876,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7876
7876
|
"quota",
|
|
7877
7877
|
"manual",
|
|
7878
7878
|
"operator",
|
|
7879
|
-
"maintenance"
|
|
7879
|
+
"maintenance",
|
|
7880
|
+
"orphaned-device"
|
|
7880
7881
|
]);
|
|
7881
7882
|
/** One audit row, shared verbatim by both domains. */
|
|
7882
7883
|
var OpsLogEntrySchema = object({
|
|
@@ -13256,10 +13257,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13256
13257
|
deviceId: number(),
|
|
13257
13258
|
data: record(string(), unknown())
|
|
13258
13259
|
});
|
|
13260
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13261
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13262
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13263
|
+
"off",
|
|
13264
|
+
"on",
|
|
13265
|
+
"not-offered",
|
|
13266
|
+
"unreachable"
|
|
13267
|
+
]);
|
|
13268
|
+
var MigrateSwitchReportSchema = object({
|
|
13269
|
+
deviceId: number(),
|
|
13270
|
+
switchId: CameraSwitchIdSchema,
|
|
13271
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13272
|
+
detail: string().optional()
|
|
13273
|
+
});
|
|
13274
|
+
var MigrateDeviceResultSchema = object({
|
|
13275
|
+
sourceId: number(),
|
|
13276
|
+
targetId: number(),
|
|
13277
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13278
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13279
|
+
* value meaning the replaced hardware is quiet. */
|
|
13280
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13281
|
+
swapped: boolean()
|
|
13282
|
+
});
|
|
13259
13283
|
method(object({
|
|
13260
13284
|
addonId: string(),
|
|
13261
13285
|
stableId: string()
|
|
13262
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13286
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13287
|
+
sourceId: number(),
|
|
13288
|
+
targetId: number()
|
|
13289
|
+
}), MigrateDeviceResultSchema, {
|
|
13290
|
+
kind: "mutation",
|
|
13291
|
+
auth: "admin"
|
|
13292
|
+
}), 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({
|
|
13263
13293
|
deviceId: number(),
|
|
13264
13294
|
name: string()
|
|
13265
13295
|
}), _void(), {
|
|
@@ -13734,6 +13764,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13734
13764
|
auth: "admin"
|
|
13735
13765
|
});
|
|
13736
13766
|
/**
|
|
13767
|
+
* Transport bounds for AI capability methods.
|
|
13768
|
+
*
|
|
13769
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13770
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13771
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13772
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13773
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13774
|
+
*/
|
|
13775
|
+
/**
|
|
13776
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13777
|
+
*
|
|
13778
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13779
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13780
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13781
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13782
|
+
* the wrong layer and hiding the real one.
|
|
13783
|
+
*
|
|
13784
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13785
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13786
|
+
* exactly 60 s and shipped without its text.
|
|
13787
|
+
*
|
|
13788
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13789
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13790
|
+
* decide when to stop, because only they can say WHY.
|
|
13791
|
+
*/
|
|
13792
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13793
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13794
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13795
|
+
/**
|
|
13737
13796
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13738
13797
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13739
13798
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14005,16 +14064,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14005
14064
|
timeoutMs: number().int().positive().optional()
|
|
14006
14065
|
}), LlmGenerateResultSchema, {
|
|
14007
14066
|
kind: "mutation",
|
|
14008
|
-
auth: "admin"
|
|
14067
|
+
auth: "admin",
|
|
14068
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14009
14069
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14010
14070
|
kind: "mutation",
|
|
14011
|
-
auth: "admin"
|
|
14071
|
+
auth: "admin",
|
|
14072
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14012
14073
|
}), method(object({}), _void(), {
|
|
14013
14074
|
kind: "mutation",
|
|
14014
14075
|
auth: "admin"
|
|
14015
14076
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14016
14077
|
kind: "mutation",
|
|
14017
|
-
auth: "admin"
|
|
14078
|
+
auth: "admin",
|
|
14079
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14018
14080
|
}), method(object({ file: string() }), _void(), {
|
|
14019
14081
|
kind: "mutation",
|
|
14020
14082
|
auth: "admin"
|
|
@@ -14182,7 +14244,13 @@ var ProfileRefInputSchema = object({
|
|
|
14182
14244
|
addonId: string(),
|
|
14183
14245
|
profileId: string()
|
|
14184
14246
|
});
|
|
14185
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14247
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14248
|
+
kind: "mutation",
|
|
14249
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14250
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14251
|
+
kind: "mutation",
|
|
14252
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14253
|
+
}), method(object({
|
|
14186
14254
|
addonId: string().optional(),
|
|
14187
14255
|
requestId: string()
|
|
14188
14256
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14193,7 +14261,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14193
14261
|
auth: "admin"
|
|
14194
14262
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14195
14263
|
kind: "mutation",
|
|
14196
|
-
auth: "admin"
|
|
14264
|
+
auth: "admin",
|
|
14265
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14197
14266
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14198
14267
|
selector: LlmDefaultSelectorSchema,
|
|
14199
14268
|
profileId: string().nullable()
|
|
@@ -34271,6 +34340,12 @@ Object.freeze({
|
|
|
34271
34340
|
addonId: null,
|
|
34272
34341
|
access: "view"
|
|
34273
34342
|
},
|
|
34343
|
+
"deviceManager.migrateDevice": {
|
|
34344
|
+
capName: "device-manager",
|
|
34345
|
+
capScope: "system",
|
|
34346
|
+
addonId: null,
|
|
34347
|
+
access: "create"
|
|
34348
|
+
},
|
|
34274
34349
|
"deviceManager.persistConfig": {
|
|
34275
34350
|
capName: "device-manager",
|
|
34276
34351
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|