@camstack/addon-import-alexa 0.2.23 → 0.2.25
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 +76 -6
- package/dist/addon.mjs +76 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -38,7 +38,7 @@ let node_os = require("node:os");
|
|
|
38
38
|
let node_fs = require("node:fs");
|
|
39
39
|
let node_path = require("node:path");
|
|
40
40
|
node_path = __toESM(node_path);
|
|
41
|
-
//#region ../types/dist/event-category-
|
|
41
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
42
42
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
43
43
|
EventCategory["SystemBoot"] = "system.boot";
|
|
44
44
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -54,6 +54,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
54
54
|
*/
|
|
55
55
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
56
56
|
/**
|
|
57
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
58
|
+
* Emitted only when the material on disk actually changed, so an
|
|
59
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
60
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
61
|
+
*
|
|
62
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
63
|
+
*/
|
|
64
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
65
|
+
/**
|
|
57
66
|
* A newer addon or server-root package version was found by the
|
|
58
67
|
* authoritative registry check. Emitted once when any observed
|
|
59
68
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19224,6 +19233,12 @@ var CameraStatusSchema = object({
|
|
|
19224
19233
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19225
19234
|
fetchedAt: number()
|
|
19226
19235
|
});
|
|
19236
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19237
|
+
"disabled",
|
|
19238
|
+
"unavailable",
|
|
19239
|
+
"cannot-host-camera-root",
|
|
19240
|
+
"accelerator-preferred"
|
|
19241
|
+
]);
|
|
19227
19242
|
var NodeInferenceDeviceSchema = object({
|
|
19228
19243
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19229
19244
|
key: string(),
|
|
@@ -19254,7 +19269,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19254
19269
|
* available per format; this is the stored selection that becomes the
|
|
19255
19270
|
* default for EVERY camera landing on this accelerator.
|
|
19256
19271
|
*/
|
|
19257
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19272
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19273
|
+
/**
|
|
19274
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19275
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19276
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19277
|
+
* never disagree with the election — deriving it in the UI from
|
|
19278
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19279
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19280
|
+
* "an accelerator is serving" predicate).
|
|
19281
|
+
*/
|
|
19282
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19258
19283
|
});
|
|
19259
19284
|
var NodeInferenceDevicesSchema = object({
|
|
19260
19285
|
nodeId: string(),
|
|
@@ -24122,7 +24147,12 @@ var ListResultSchema = object({
|
|
|
24122
24147
|
probedAt: number()
|
|
24123
24148
|
});
|
|
24124
24149
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24125
|
-
|
|
24150
|
+
/**
|
|
24151
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24152
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24153
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24154
|
+
*/
|
|
24155
|
+
var ConnectionEndpointSchema = object({
|
|
24126
24156
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24127
24157
|
label: string(),
|
|
24128
24158
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24165,7 +24195,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24165
24195
|
* ordering between polls.
|
|
24166
24196
|
*/
|
|
24167
24197
|
priority: number()
|
|
24168
|
-
})
|
|
24198
|
+
});
|
|
24199
|
+
/**
|
|
24200
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24201
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24202
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24203
|
+
*/
|
|
24204
|
+
var LocalPortSourceEnum = _enum([
|
|
24205
|
+
"server-config",
|
|
24206
|
+
"server-env",
|
|
24207
|
+
"caller-hint",
|
|
24208
|
+
"default"
|
|
24209
|
+
]);
|
|
24210
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24211
|
+
var AdvertisedLocalPortSchema = object({
|
|
24212
|
+
port: number().int().min(1).max(65535),
|
|
24213
|
+
source: LocalPortSourceEnum
|
|
24214
|
+
});
|
|
24215
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24216
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24217
|
+
/**
|
|
24218
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24219
|
+
* came from.
|
|
24220
|
+
*
|
|
24221
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24222
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24223
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24224
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24225
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24226
|
+
* `caller-hint` is the hub's own socket.
|
|
24227
|
+
*
|
|
24228
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24229
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24230
|
+
* `caller-hint`.
|
|
24231
|
+
*/
|
|
24232
|
+
localPort: AdvertisedLocalPortSchema
|
|
24233
|
+
});
|
|
24169
24234
|
/**
|
|
24170
24235
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24171
24236
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24186,8 +24251,13 @@ var AllowedAddressesSchema = object({
|
|
|
24186
24251
|
*/
|
|
24187
24252
|
addresses: array(string()).readonly() });
|
|
24188
24253
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24189
|
-
/**
|
|
24190
|
-
|
|
24254
|
+
/**
|
|
24255
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24256
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24257
|
+
* only when it cannot read its own port, and says so via
|
|
24258
|
+
* `localPort.source === 'caller-hint'`.
|
|
24259
|
+
*/
|
|
24260
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24191
24261
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24192
24262
|
* candidate. Default `true`. */
|
|
24193
24263
|
includeLoopback: boolean().optional(),
|
package/dist/addon.mjs
CHANGED
|
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
39
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../types/dist/event-category-
|
|
41
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
42
42
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
43
43
|
EventCategory["SystemBoot"] = "system.boot";
|
|
44
44
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -54,6 +54,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
54
54
|
*/
|
|
55
55
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
56
56
|
/**
|
|
57
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
58
|
+
* Emitted only when the material on disk actually changed, so an
|
|
59
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
60
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
61
|
+
*
|
|
62
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
63
|
+
*/
|
|
64
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
65
|
+
/**
|
|
57
66
|
* A newer addon or server-root package version was found by the
|
|
58
67
|
* authoritative registry check. Emitted once when any observed
|
|
59
68
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19224,6 +19233,12 @@ var CameraStatusSchema = object({
|
|
|
19224
19233
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19225
19234
|
fetchedAt: number()
|
|
19226
19235
|
});
|
|
19236
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19237
|
+
"disabled",
|
|
19238
|
+
"unavailable",
|
|
19239
|
+
"cannot-host-camera-root",
|
|
19240
|
+
"accelerator-preferred"
|
|
19241
|
+
]);
|
|
19227
19242
|
var NodeInferenceDeviceSchema = object({
|
|
19228
19243
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19229
19244
|
key: string(),
|
|
@@ -19254,7 +19269,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19254
19269
|
* available per format; this is the stored selection that becomes the
|
|
19255
19270
|
* default for EVERY camera landing on this accelerator.
|
|
19256
19271
|
*/
|
|
19257
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19272
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19273
|
+
/**
|
|
19274
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19275
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19276
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19277
|
+
* never disagree with the election — deriving it in the UI from
|
|
19278
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19279
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19280
|
+
* "an accelerator is serving" predicate).
|
|
19281
|
+
*/
|
|
19282
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19258
19283
|
});
|
|
19259
19284
|
var NodeInferenceDevicesSchema = object({
|
|
19260
19285
|
nodeId: string(),
|
|
@@ -24122,7 +24147,12 @@ var ListResultSchema = object({
|
|
|
24122
24147
|
probedAt: number()
|
|
24123
24148
|
});
|
|
24124
24149
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24125
|
-
|
|
24150
|
+
/**
|
|
24151
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24152
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24153
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24154
|
+
*/
|
|
24155
|
+
var ConnectionEndpointSchema = object({
|
|
24126
24156
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24127
24157
|
label: string(),
|
|
24128
24158
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24165,7 +24195,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24165
24195
|
* ordering between polls.
|
|
24166
24196
|
*/
|
|
24167
24197
|
priority: number()
|
|
24168
|
-
})
|
|
24198
|
+
});
|
|
24199
|
+
/**
|
|
24200
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24201
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24202
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24203
|
+
*/
|
|
24204
|
+
var LocalPortSourceEnum = _enum([
|
|
24205
|
+
"server-config",
|
|
24206
|
+
"server-env",
|
|
24207
|
+
"caller-hint",
|
|
24208
|
+
"default"
|
|
24209
|
+
]);
|
|
24210
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24211
|
+
var AdvertisedLocalPortSchema = object({
|
|
24212
|
+
port: number().int().min(1).max(65535),
|
|
24213
|
+
source: LocalPortSourceEnum
|
|
24214
|
+
});
|
|
24215
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24216
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24217
|
+
/**
|
|
24218
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24219
|
+
* came from.
|
|
24220
|
+
*
|
|
24221
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24222
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24223
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24224
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24225
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24226
|
+
* `caller-hint` is the hub's own socket.
|
|
24227
|
+
*
|
|
24228
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24229
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24230
|
+
* `caller-hint`.
|
|
24231
|
+
*/
|
|
24232
|
+
localPort: AdvertisedLocalPortSchema
|
|
24233
|
+
});
|
|
24169
24234
|
/**
|
|
24170
24235
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24171
24236
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24186,8 +24251,13 @@ var AllowedAddressesSchema = object({
|
|
|
24186
24251
|
*/
|
|
24187
24252
|
addresses: array(string()).readonly() });
|
|
24188
24253
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24189
|
-
/**
|
|
24190
|
-
|
|
24254
|
+
/**
|
|
24255
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24256
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24257
|
+
* only when it cannot read its own port, and says so via
|
|
24258
|
+
* `localPort.source === 'caller-hint'`.
|
|
24259
|
+
*/
|
|
24260
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24191
24261
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24192
24262
|
* candidate. Default `true`. */
|
|
24193
24263
|
includeLoopback: boolean().optional(),
|
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.25",
|
|
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",
|