@camstack/addon-provider-tuya 0.2.32 → 0.2.33
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 +87 -5
- package/dist/addon.mjs +87 -5
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -29248,17 +29248,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
29248
29248
|
longitude: number().min(-180).max(180)
|
|
29249
29249
|
}).nullable();
|
|
29250
29250
|
/**
|
|
29251
|
-
*
|
|
29251
|
+
* The TRANSPORT a call arrived on.
|
|
29252
|
+
*
|
|
29253
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
29254
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
29255
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
29256
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
29257
|
+
* checkable rather than asserted.
|
|
29258
|
+
*
|
|
29259
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
29260
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
29261
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
29262
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
29263
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
29264
|
+
* never touches a socket and therefore never touched a census.
|
|
29265
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
29266
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
29267
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
29268
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
29269
|
+
*/
|
|
29270
|
+
var TransportPlaneSchema = _enum([
|
|
29271
|
+
"http",
|
|
29272
|
+
"ws",
|
|
29273
|
+
"mesh",
|
|
29274
|
+
"unknown"
|
|
29275
|
+
]);
|
|
29276
|
+
/**
|
|
29277
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
29278
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
29279
|
+
* make an operator wonder about.
|
|
29280
|
+
*/
|
|
29281
|
+
var TransportPlaneCountsSchema = object({
|
|
29282
|
+
http: number(),
|
|
29283
|
+
ws: number(),
|
|
29284
|
+
mesh: number(),
|
|
29285
|
+
unknown: number()
|
|
29286
|
+
});
|
|
29287
|
+
/**
|
|
29288
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
29252
29289
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29253
29290
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29254
29291
|
* already prints - never a token, never an `Authorization` header.
|
|
29292
|
+
*
|
|
29293
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
29294
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
29295
|
+
* stream look like a storm.
|
|
29255
29296
|
*/
|
|
29256
29297
|
var RequestCensusGroupSchema = object({
|
|
29298
|
+
plane: TransportPlaneSchema,
|
|
29257
29299
|
procedure: string(),
|
|
29258
29300
|
userAgent: string(),
|
|
29259
29301
|
ip: string(),
|
|
29260
29302
|
principal: string(),
|
|
29261
29303
|
calls: number(),
|
|
29304
|
+
subscriptions: number(),
|
|
29262
29305
|
perMin: number()
|
|
29263
29306
|
});
|
|
29264
29307
|
/**
|
|
@@ -29271,6 +29314,14 @@ var RequestCensusGroupSchema = object({
|
|
|
29271
29314
|
var RequestCensusProcedureSchema = object({
|
|
29272
29315
|
procedure: string(),
|
|
29273
29316
|
calls: number(),
|
|
29317
|
+
/**
|
|
29318
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
29319
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
29320
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
29321
|
+
*/
|
|
29322
|
+
planes: TransportPlaneCountsSchema,
|
|
29323
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
29324
|
+
subscriptions: number(),
|
|
29274
29325
|
perMin: number()
|
|
29275
29326
|
});
|
|
29276
29327
|
/**
|
|
@@ -29298,14 +29349,45 @@ var RequestCensusStatusSchema = object({
|
|
|
29298
29349
|
*/
|
|
29299
29350
|
procedureCalls: number(),
|
|
29300
29351
|
/**
|
|
29352
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
29353
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
29354
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
29355
|
+
*/
|
|
29356
|
+
planes: TransportPlaneCountsSchema,
|
|
29357
|
+
/**
|
|
29358
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
29359
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
29360
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
29361
|
+
*/
|
|
29362
|
+
planesExplainTotal: boolean(),
|
|
29363
|
+
/**
|
|
29301
29364
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29302
|
-
*
|
|
29303
|
-
*
|
|
29365
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
29366
|
+
* count of zero against 37 open connections says something different from a
|
|
29367
|
+
* plane with no connections at all.
|
|
29304
29368
|
*/
|
|
29305
29369
|
wsConnections: number(),
|
|
29370
|
+
/**
|
|
29371
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
29372
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
29373
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
29374
|
+
*/
|
|
29375
|
+
wsMessages: number(),
|
|
29376
|
+
/**
|
|
29377
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
29378
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
29379
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
29380
|
+
* masquerade as the storm.
|
|
29381
|
+
*/
|
|
29382
|
+
subscriptions: number(),
|
|
29383
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
29384
|
+
subscriptionStops: number(),
|
|
29306
29385
|
distinctGroups: number(),
|
|
29307
|
-
/**
|
|
29308
|
-
*
|
|
29386
|
+
/**
|
|
29387
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
29388
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
29389
|
+
* which transport they arrived on, they just lost their group row.
|
|
29390
|
+
*/
|
|
29309
29391
|
unattributedCalls: number(),
|
|
29310
29392
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29311
29393
|
groups: array(RequestCensusGroupSchema).readonly()
|
package/dist/addon.mjs
CHANGED
|
@@ -29247,17 +29247,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
29247
29247
|
longitude: number().min(-180).max(180)
|
|
29248
29248
|
}).nullable();
|
|
29249
29249
|
/**
|
|
29250
|
-
*
|
|
29250
|
+
* The TRANSPORT a call arrived on.
|
|
29251
|
+
*
|
|
29252
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
29253
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
29254
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
29255
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
29256
|
+
* checkable rather than asserted.
|
|
29257
|
+
*
|
|
29258
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
29259
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
29260
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
29261
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
29262
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
29263
|
+
* never touches a socket and therefore never touched a census.
|
|
29264
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
29265
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
29266
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
29267
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
29268
|
+
*/
|
|
29269
|
+
var TransportPlaneSchema = _enum([
|
|
29270
|
+
"http",
|
|
29271
|
+
"ws",
|
|
29272
|
+
"mesh",
|
|
29273
|
+
"unknown"
|
|
29274
|
+
]);
|
|
29275
|
+
/**
|
|
29276
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
29277
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
29278
|
+
* make an operator wonder about.
|
|
29279
|
+
*/
|
|
29280
|
+
var TransportPlaneCountsSchema = object({
|
|
29281
|
+
http: number(),
|
|
29282
|
+
ws: number(),
|
|
29283
|
+
mesh: number(),
|
|
29284
|
+
unknown: number()
|
|
29285
|
+
});
|
|
29286
|
+
/**
|
|
29287
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
29251
29288
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29252
29289
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29253
29290
|
* already prints - never a token, never an `Authorization` header.
|
|
29291
|
+
*
|
|
29292
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
29293
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
29294
|
+
* stream look like a storm.
|
|
29254
29295
|
*/
|
|
29255
29296
|
var RequestCensusGroupSchema = object({
|
|
29297
|
+
plane: TransportPlaneSchema,
|
|
29256
29298
|
procedure: string(),
|
|
29257
29299
|
userAgent: string(),
|
|
29258
29300
|
ip: string(),
|
|
29259
29301
|
principal: string(),
|
|
29260
29302
|
calls: number(),
|
|
29303
|
+
subscriptions: number(),
|
|
29261
29304
|
perMin: number()
|
|
29262
29305
|
});
|
|
29263
29306
|
/**
|
|
@@ -29270,6 +29313,14 @@ var RequestCensusGroupSchema = object({
|
|
|
29270
29313
|
var RequestCensusProcedureSchema = object({
|
|
29271
29314
|
procedure: string(),
|
|
29272
29315
|
calls: number(),
|
|
29316
|
+
/**
|
|
29317
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
29318
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
29319
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
29320
|
+
*/
|
|
29321
|
+
planes: TransportPlaneCountsSchema,
|
|
29322
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
29323
|
+
subscriptions: number(),
|
|
29273
29324
|
perMin: number()
|
|
29274
29325
|
});
|
|
29275
29326
|
/**
|
|
@@ -29297,14 +29348,45 @@ var RequestCensusStatusSchema = object({
|
|
|
29297
29348
|
*/
|
|
29298
29349
|
procedureCalls: number(),
|
|
29299
29350
|
/**
|
|
29351
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
29352
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
29353
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
29354
|
+
*/
|
|
29355
|
+
planes: TransportPlaneCountsSchema,
|
|
29356
|
+
/**
|
|
29357
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
29358
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
29359
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
29360
|
+
*/
|
|
29361
|
+
planesExplainTotal: boolean(),
|
|
29362
|
+
/**
|
|
29300
29363
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29301
|
-
*
|
|
29302
|
-
*
|
|
29364
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
29365
|
+
* count of zero against 37 open connections says something different from a
|
|
29366
|
+
* plane with no connections at all.
|
|
29303
29367
|
*/
|
|
29304
29368
|
wsConnections: number(),
|
|
29369
|
+
/**
|
|
29370
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
29371
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
29372
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
29373
|
+
*/
|
|
29374
|
+
wsMessages: number(),
|
|
29375
|
+
/**
|
|
29376
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
29377
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
29378
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
29379
|
+
* masquerade as the storm.
|
|
29380
|
+
*/
|
|
29381
|
+
subscriptions: number(),
|
|
29382
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
29383
|
+
subscriptionStops: number(),
|
|
29305
29384
|
distinctGroups: number(),
|
|
29306
|
-
/**
|
|
29307
|
-
*
|
|
29385
|
+
/**
|
|
29386
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
29387
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
29388
|
+
* which transport they arrived on, they just lost their group row.
|
|
29389
|
+
*/
|
|
29308
29390
|
unattributedCalls: number(),
|
|
29309
29391
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29310
29392
|
groups: array(RequestCensusGroupSchema).readonly()
|
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.33",
|
|
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",
|