@camstack/addon-provider-tuya 0.2.24 → 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 +66 -5
- package/dist/addon.mjs +66 -5
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -19818,6 +19818,12 @@ var CameraStatusSchema = object({
|
|
|
19818
19818
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19819
19819
|
fetchedAt: number()
|
|
19820
19820
|
});
|
|
19821
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19822
|
+
"disabled",
|
|
19823
|
+
"unavailable",
|
|
19824
|
+
"cannot-host-camera-root",
|
|
19825
|
+
"accelerator-preferred"
|
|
19826
|
+
]);
|
|
19821
19827
|
var NodeInferenceDeviceSchema = object({
|
|
19822
19828
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19823
19829
|
key: string(),
|
|
@@ -19848,7 +19854,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19848
19854
|
* available per format; this is the stored selection that becomes the
|
|
19849
19855
|
* default for EVERY camera landing on this accelerator.
|
|
19850
19856
|
*/
|
|
19851
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19857
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19858
|
+
/**
|
|
19859
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19860
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19861
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19862
|
+
* never disagree with the election — deriving it in the UI from
|
|
19863
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19864
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19865
|
+
* "an accelerator is serving" predicate).
|
|
19866
|
+
*/
|
|
19867
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19852
19868
|
});
|
|
19853
19869
|
var NodeInferenceDevicesSchema = object({
|
|
19854
19870
|
nodeId: string(),
|
|
@@ -24707,7 +24723,12 @@ var ListResultSchema = object({
|
|
|
24707
24723
|
probedAt: number()
|
|
24708
24724
|
});
|
|
24709
24725
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24710
|
-
|
|
24726
|
+
/**
|
|
24727
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24728
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24729
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24730
|
+
*/
|
|
24731
|
+
var ConnectionEndpointSchema = object({
|
|
24711
24732
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24712
24733
|
label: string(),
|
|
24713
24734
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24750,7 +24771,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24750
24771
|
* ordering between polls.
|
|
24751
24772
|
*/
|
|
24752
24773
|
priority: number()
|
|
24753
|
-
})
|
|
24774
|
+
});
|
|
24775
|
+
/**
|
|
24776
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24777
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24778
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24779
|
+
*/
|
|
24780
|
+
var LocalPortSourceEnum = _enum([
|
|
24781
|
+
"server-config",
|
|
24782
|
+
"server-env",
|
|
24783
|
+
"caller-hint",
|
|
24784
|
+
"default"
|
|
24785
|
+
]);
|
|
24786
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24787
|
+
var AdvertisedLocalPortSchema = object({
|
|
24788
|
+
port: number().int().min(1).max(65535),
|
|
24789
|
+
source: LocalPortSourceEnum
|
|
24790
|
+
});
|
|
24791
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24792
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24793
|
+
/**
|
|
24794
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24795
|
+
* came from.
|
|
24796
|
+
*
|
|
24797
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24798
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24799
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24800
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24801
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24802
|
+
* `caller-hint` is the hub's own socket.
|
|
24803
|
+
*
|
|
24804
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24805
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24806
|
+
* `caller-hint`.
|
|
24807
|
+
*/
|
|
24808
|
+
localPort: AdvertisedLocalPortSchema
|
|
24809
|
+
});
|
|
24754
24810
|
/**
|
|
24755
24811
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24756
24812
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24771,8 +24827,13 @@ var AllowedAddressesSchema = object({
|
|
|
24771
24827
|
*/
|
|
24772
24828
|
addresses: array(string()).readonly() });
|
|
24773
24829
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24774
|
-
/**
|
|
24775
|
-
|
|
24830
|
+
/**
|
|
24831
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24832
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24833
|
+
* only when it cannot read its own port, and says so via
|
|
24834
|
+
* `localPort.source === 'caller-hint'`.
|
|
24835
|
+
*/
|
|
24836
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24776
24837
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24777
24838
|
* candidate. Default `true`. */
|
|
24778
24839
|
includeLoopback: boolean().optional(),
|
package/dist/addon.mjs
CHANGED
|
@@ -19817,6 +19817,12 @@ var CameraStatusSchema = object({
|
|
|
19817
19817
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19818
19818
|
fetchedAt: number()
|
|
19819
19819
|
});
|
|
19820
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19821
|
+
"disabled",
|
|
19822
|
+
"unavailable",
|
|
19823
|
+
"cannot-host-camera-root",
|
|
19824
|
+
"accelerator-preferred"
|
|
19825
|
+
]);
|
|
19820
19826
|
var NodeInferenceDeviceSchema = object({
|
|
19821
19827
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19822
19828
|
key: string(),
|
|
@@ -19847,7 +19853,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19847
19853
|
* available per format; this is the stored selection that becomes the
|
|
19848
19854
|
* default for EVERY camera landing on this accelerator.
|
|
19849
19855
|
*/
|
|
19850
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19856
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19857
|
+
/**
|
|
19858
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19859
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19860
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19861
|
+
* never disagree with the election — deriving it in the UI from
|
|
19862
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19863
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19864
|
+
* "an accelerator is serving" predicate).
|
|
19865
|
+
*/
|
|
19866
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19851
19867
|
});
|
|
19852
19868
|
var NodeInferenceDevicesSchema = object({
|
|
19853
19869
|
nodeId: string(),
|
|
@@ -24706,7 +24722,12 @@ var ListResultSchema = object({
|
|
|
24706
24722
|
probedAt: number()
|
|
24707
24723
|
});
|
|
24708
24724
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24709
|
-
|
|
24725
|
+
/**
|
|
24726
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24727
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24728
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24729
|
+
*/
|
|
24730
|
+
var ConnectionEndpointSchema = object({
|
|
24710
24731
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24711
24732
|
label: string(),
|
|
24712
24733
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24749,7 +24770,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24749
24770
|
* ordering between polls.
|
|
24750
24771
|
*/
|
|
24751
24772
|
priority: number()
|
|
24752
|
-
})
|
|
24773
|
+
});
|
|
24774
|
+
/**
|
|
24775
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24776
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24777
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24778
|
+
*/
|
|
24779
|
+
var LocalPortSourceEnum = _enum([
|
|
24780
|
+
"server-config",
|
|
24781
|
+
"server-env",
|
|
24782
|
+
"caller-hint",
|
|
24783
|
+
"default"
|
|
24784
|
+
]);
|
|
24785
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24786
|
+
var AdvertisedLocalPortSchema = object({
|
|
24787
|
+
port: number().int().min(1).max(65535),
|
|
24788
|
+
source: LocalPortSourceEnum
|
|
24789
|
+
});
|
|
24790
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24791
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24792
|
+
/**
|
|
24793
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24794
|
+
* came from.
|
|
24795
|
+
*
|
|
24796
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24797
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24798
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24799
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24800
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24801
|
+
* `caller-hint` is the hub's own socket.
|
|
24802
|
+
*
|
|
24803
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24804
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24805
|
+
* `caller-hint`.
|
|
24806
|
+
*/
|
|
24807
|
+
localPort: AdvertisedLocalPortSchema
|
|
24808
|
+
});
|
|
24753
24809
|
/**
|
|
24754
24810
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24755
24811
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24770,8 +24826,13 @@ var AllowedAddressesSchema = object({
|
|
|
24770
24826
|
*/
|
|
24771
24827
|
addresses: array(string()).readonly() });
|
|
24772
24828
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24773
|
-
/**
|
|
24774
|
-
|
|
24829
|
+
/**
|
|
24830
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24831
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24832
|
+
* only when it cannot read its own port, and says so via
|
|
24833
|
+
* `localPort.source === 'caller-hint'`.
|
|
24834
|
+
*/
|
|
24835
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24775
24836
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24776
24837
|
* candidate. Default `true`. */
|
|
24777
24838
|
includeLoopback: boolean().optional(),
|
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.25",
|
|
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",
|