@camstack/server 1.2.731 → 1.2.733
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/CHANGELOG.md +13 -0
- package/dist/api/core/cap-providers.js +1 -0
- package/dist/api/core/logging-settings.js +88 -1
- package/dist/api/trpc/generated-cap-routers.js +49 -0
- package/dist/core/addon/addon-registry.service.js +61 -59
- package/package.json +11 -19
- package/system/dist/addon-runner.js +1 -0
- package/system/dist/addon-runner.mjs +2 -1
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-AJPmB73W.mjs → agent-https-D3dptveB.mjs} +1 -1
- package/system/dist/{agent-https-CLJhq0GZ.js → agent-https-v5uyVgpk.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +220 -16
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +220 -16
- package/system/dist/builtins/device-manager/discovery-proposal-service.d.ts +38 -0
- package/system/dist/builtins/device-manager/discovery-proposal-store.d.ts +28 -0
- package/system/dist/builtins/device-manager/record-kinds.d.ts +2 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.d.ts +10 -0
- package/system/dist/builtins/local-network/local-network.addon.js +297 -190
- package/system/dist/builtins/local-network/local-network.addon.mjs +294 -187
- package/system/dist/builtins/local-network/passive/discovery-watcher.d.ts +60 -0
- package/system/dist/builtins/local-network/passive/passive-io-node.d.ts +2 -0
- package/system/dist/builtins/local-network/passive/passive-packets.d.ts +10 -0
- package/system/dist/builtins/local-network/scan/dns-wire.d.ts +6 -2
- package/system/dist/builtins/local-network/scan/scan-engine.d.ts +1 -1
- package/system/dist/builtins/local-network/scan/scan-io.d.ts +6 -0
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-D-S2hhdw.mjs → composition-sources-Dnyu7-1p.mjs} +1 -1
- package/system/dist/{composition-sources-BNBlJAgu.js → composition-sources-j_bFq7Tx.js} +1 -1
- package/system/dist/{constants-CKwdQTnw.js → constants-C6zJ_38f.js} +1 -1
- package/system/dist/{constants-DmithOex.mjs → constants-GDBin8zB.mjs} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
- package/system/dist/{device-ca-D-Cvxobt.mjs → device-ca-Bpqrad00.mjs} +1 -1
- package/system/dist/{device-ca-TbdQfW4d.js → device-ca-CV9QZvoy.js} +1 -1
- package/system/dist/{dist-dQKZfa3-.js → dist-CwYYyGAB.js} +227 -3
- package/system/dist/{dist-yrk6fm65.mjs → dist-DcHvuBfD.mjs} +210 -4
- package/system/dist/dns-wire-CqgMi_uB.js +202 -0
- package/system/dist/dns-wire-DO56tOHL.mjs +173 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-Cae5VWUc.mjs → hub-mdns-ciao-D2sU6sKd.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DP3_GNZw.js → hub-mdns-ciao-DNLnbJNG.js} +2 -2
- package/system/dist/index.js +24 -7
- package/system/dist/index.mjs +236 -219
- package/system/dist/{restore-archive-BJ5gxMvf.mjs → restore-archive-BGK6EnYj.mjs} +94 -94
- package/system/dist/{restore-archive-X9c_wEBY.js → restore-archive-xTqhDFkW.js} +1 -1
- package/system/dist/{retention-DBrdAv12.mjs → retention-CXu8PB2L.mjs} +1 -1
- package/system/dist/{retention-DRT2wUyB.js → retention-gQ3GIUA3.js} +1 -1
- package/system/dist/{wal-maintenance-Bi4yImEY.mjs → wal-maintenance-D7XmFaUD.mjs} +0 -0
- package/system/dist/{wal-maintenance-hsgNGrjh.js → wal-maintenance-Hwzm3DCe.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1162,7 +1162,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1162
1162
|
return DeviceRole;
|
|
1163
1163
|
}({});
|
|
1164
1164
|
//#endregion
|
|
1165
|
-
//#region ../types/dist/sleep-
|
|
1165
|
+
//#region ../types/dist/sleep-Bei295Bz.mjs
|
|
1166
1166
|
/**
|
|
1167
1167
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1168
1168
|
* window to float samples (D455).
|
|
@@ -5015,6 +5015,60 @@ var ProfileRtspEntrySchema = z.object({
|
|
|
5015
5015
|
codec: z.string().optional(),
|
|
5016
5016
|
resolution: CamStreamResolutionSchema.optional()
|
|
5017
5017
|
});
|
|
5018
|
+
/** Every debug channel's name starts with this; the ring denies it by default. */
|
|
5019
|
+
var DEBUG_CHANNEL_PREFIX = "debug.";
|
|
5020
|
+
function isDebugChannelName(name) {
|
|
5021
|
+
return name.startsWith(DEBUG_CHANNEL_PREFIX);
|
|
5022
|
+
}
|
|
5023
|
+
/**
|
|
5024
|
+
* Who is watching what, in THIS process. In-memory, moved off the log path.
|
|
5025
|
+
*
|
|
5026
|
+
* `active` is a plain boolean FIELD, read first: with no watch anywhere, a
|
|
5027
|
+
* `ctx.debug` call is one load and one branch.
|
|
5028
|
+
*/
|
|
5029
|
+
var DebugInterest = class {
|
|
5030
|
+
active = false;
|
|
5031
|
+
windows = /* @__PURE__ */ new Map();
|
|
5032
|
+
/**
|
|
5033
|
+
* Replace the interest with the FULL set of windows. Non-debug windows are
|
|
5034
|
+
* ignored and an absent one is dropped, so a lost disarm cannot leave a
|
|
5035
|
+
* channel running.
|
|
5036
|
+
*/
|
|
5037
|
+
apply(windows, nowMs) {
|
|
5038
|
+
this.windows.clear();
|
|
5039
|
+
for (const window of windows) {
|
|
5040
|
+
if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
|
|
5041
|
+
const ids = window.deviceIds;
|
|
5042
|
+
this.windows.set(window.channel, {
|
|
5043
|
+
untilMs: window.armedUntilMs,
|
|
5044
|
+
devices: ids === null || ids.length === 0 ? null : new Set(ids)
|
|
5045
|
+
});
|
|
5046
|
+
}
|
|
5047
|
+
this.active = this.windows.size > 0;
|
|
5048
|
+
}
|
|
5049
|
+
/** Drop what has lapsed. Called on a timer, never from a log path. */
|
|
5050
|
+
tick(nowMs) {
|
|
5051
|
+
const closed = [];
|
|
5052
|
+
for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
|
|
5053
|
+
this.windows.delete(name);
|
|
5054
|
+
closed.push(name);
|
|
5055
|
+
}
|
|
5056
|
+
this.active = this.windows.size > 0;
|
|
5057
|
+
return closed;
|
|
5058
|
+
}
|
|
5059
|
+
/** `channel` is the full name, `debug.<channel>`. */
|
|
5060
|
+
wants(channel, deviceId) {
|
|
5061
|
+
if (!this.active) return false;
|
|
5062
|
+
const window = this.windows.get(channel);
|
|
5063
|
+
if (window === void 0) return false;
|
|
5064
|
+
return window.devices === null || window.devices.has(deviceId);
|
|
5065
|
+
}
|
|
5066
|
+
};
|
|
5067
|
+
var interestInstance = null;
|
|
5068
|
+
function getDebugInterest() {
|
|
5069
|
+
interestInstance ??= new DebugInterest();
|
|
5070
|
+
return interestInstance;
|
|
5071
|
+
}
|
|
5018
5072
|
var ReadinessTimeoutError = class extends Error {
|
|
5019
5073
|
capName;
|
|
5020
5074
|
scope;
|
|
@@ -14250,8 +14304,18 @@ var LogChannelDescriptorSchema = z.object({
|
|
|
14250
14304
|
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
14251
14305
|
* path was never taken.
|
|
14252
14306
|
*/
|
|
14253
|
-
perDevice: z.boolean()
|
|
14254
|
-
|
|
14307
|
+
perDevice: z.boolean(),
|
|
14308
|
+
/**
|
|
14309
|
+
* What the channel is FOR, so the UI can list the channels an addon offers.
|
|
14310
|
+
*
|
|
14311
|
+
* - `diagnostic` (the default): a per-component diagnostic armed from the
|
|
14312
|
+
* Levels page, emitted at its declared level.
|
|
14313
|
+
* - `debug`: a `debug.<channel>` dump watched live for a short window
|
|
14314
|
+
* (`ctx.debug`). Always per-device, and its lines are denied by the log
|
|
14315
|
+
* ring unless somebody is watching that device.
|
|
14316
|
+
*/
|
|
14317
|
+
kind: z.enum(["diagnostic", "debug"]).default("diagnostic")
|
|
14318
|
+
}).refine((d) => d.kind !== "debug" || d.name.startsWith("debug.") && d.perDevice, { message: "a debug channel is named debug.<channel> and is per-device" });
|
|
14255
14319
|
/**
|
|
14256
14320
|
* An armed window over one channel, as the document hands it to a mirror.
|
|
14257
14321
|
*
|
|
@@ -56153,6 +56217,45 @@ var deviceProviderCapability = {
|
|
|
56153
56217
|
}
|
|
56154
56218
|
};
|
|
56155
56219
|
/**
|
|
56220
|
+
* What the passive listener of `local-network` saw on the wire, before any
|
|
56221
|
+
* provider classified it. Device-manager turns an observation into the hits
|
|
56222
|
+
* of the providers whose declared discovery modes it matches.
|
|
56223
|
+
*/
|
|
56224
|
+
var DiscoveryObservationSchema = z.discriminatedUnion("kind", [z.object({
|
|
56225
|
+
kind: z.literal("mdns"),
|
|
56226
|
+
/** Normalised DNS-SD service type, e.g. `_esphomelib._tcp`. */
|
|
56227
|
+
serviceType: z.string(),
|
|
56228
|
+
instance: z.string(),
|
|
56229
|
+
host: z.string(),
|
|
56230
|
+
/** The A record address when the announcement carried one. */
|
|
56231
|
+
address: z.string().nullable(),
|
|
56232
|
+
port: z.number().int(),
|
|
56233
|
+
txt: z.record(z.string(), z.string())
|
|
56234
|
+
}), z.object({
|
|
56235
|
+
kind: z.literal("ssdp"),
|
|
56236
|
+
/** Sender address of the datagram. */
|
|
56237
|
+
host: z.string(),
|
|
56238
|
+
port: z.number().int(),
|
|
56239
|
+
/** `NT` of a NOTIFY, `ST` of a search response. */
|
|
56240
|
+
target: z.string(),
|
|
56241
|
+
headers: z.record(z.string(), z.string())
|
|
56242
|
+
})]);
|
|
56243
|
+
var DiscoveryProposalBodySchema = z.object({
|
|
56244
|
+
addonId: z.string(),
|
|
56245
|
+
candidate: DiscoveryCandidateSchema,
|
|
56246
|
+
firstSeenAt: z.number(),
|
|
56247
|
+
lastSeenAt: z.number(),
|
|
56248
|
+
dismissed: z.boolean()
|
|
56249
|
+
});
|
|
56250
|
+
var DiscoveryProposalSchema = z.object({
|
|
56251
|
+
id: z.string(),
|
|
56252
|
+
addonId: z.string(),
|
|
56253
|
+
candidate: DiscoveryCandidateSchema,
|
|
56254
|
+
firstSeenAt: z.number(),
|
|
56255
|
+
lastSeenAt: z.number(),
|
|
56256
|
+
dismissed: z.boolean()
|
|
56257
|
+
});
|
|
56258
|
+
/**
|
|
56156
56259
|
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
56157
56260
|
* live registry access, and all management operations into a single tRPC surface.
|
|
56158
56261
|
*
|
|
@@ -57476,6 +57579,27 @@ var deviceManagerCapability = {
|
|
|
57476
57579
|
kind: "mutation",
|
|
57477
57580
|
auth: "admin"
|
|
57478
57581
|
}),
|
|
57582
|
+
/** Proposals still worth showing: not dismissed, not adopted, not an integration we own. */
|
|
57583
|
+
listDiscoveryProposals: method(z.object({}), z.object({ proposals: z.array(DiscoveryProposalSchema).readonly() }), { auth: "admin" }),
|
|
57584
|
+
/** Hide a proposal for good; seeing the device again does not bring it back. */
|
|
57585
|
+
dismissDiscoveryProposal: method(z.object({ id: z.string() }), z.object({ dismissed: z.boolean() }), {
|
|
57586
|
+
kind: "mutation",
|
|
57587
|
+
auth: "admin"
|
|
57588
|
+
}),
|
|
57589
|
+
/** Raw passive sightings from `local-network`; classified by the matching providers. */
|
|
57590
|
+
reportDiscoveryObservations: method(z.object({ observations: z.array(DiscoveryObservationSchema).max(512) }), z.object({ proposed: z.number().int() }), {
|
|
57591
|
+
kind: "mutation",
|
|
57592
|
+
auth: "admin"
|
|
57593
|
+
}),
|
|
57594
|
+
/** Run the providers' discovery once and record what it found as proposals. */
|
|
57595
|
+
runDiscoverySweep: method(z.object({}), z.object({
|
|
57596
|
+
providers: z.number().int(),
|
|
57597
|
+
proposed: z.number().int()
|
|
57598
|
+
}), {
|
|
57599
|
+
kind: "mutation",
|
|
57600
|
+
auth: "admin",
|
|
57601
|
+
timeoutMs: 12e4
|
|
57602
|
+
}),
|
|
57479
57603
|
/** The device type a provider creates via manual add (Camera/Container/Hub),
|
|
57480
57604
|
* so the Add-Device dialog uses the right type instead of assuming Camera. */
|
|
57481
57605
|
providerCreationType: method(z.object({ addonId: z.string() }), z.object({ deviceType: z.enum(DeviceType).nullable() }), { auth: "admin" }),
|
|
@@ -87028,6 +87152,40 @@ var LoggingSettingsStateSchema = z.object({
|
|
|
87028
87152
|
opsLogRetentionDays: z.number().int().min(0),
|
|
87029
87153
|
persisted: z.boolean()
|
|
87030
87154
|
});
|
|
87155
|
+
/**
|
|
87156
|
+
* Debug WATCH — a short, per-device window over `debug.<channel>` lines.
|
|
87157
|
+
*
|
|
87158
|
+
* `start` opens (or re-arms) a 10 minute window; `rearm` extends a LIVE one
|
|
87159
|
+
* and never revives a lapsed one; `stop` closes it; `list` only reads. No
|
|
87160
|
+
* chain of re-arms outlives 60 minutes from the first start. The hub holds the
|
|
87161
|
+
* watches in memory and pushes the interest to every node, so a watch lapses
|
|
87162
|
+
* by itself and survives nothing — a restart is a stop.
|
|
87163
|
+
*/
|
|
87164
|
+
var DebugWatchInputSchema = z.object({
|
|
87165
|
+
action: z.enum([
|
|
87166
|
+
"list",
|
|
87167
|
+
"start",
|
|
87168
|
+
"rearm",
|
|
87169
|
+
"stop"
|
|
87170
|
+
]),
|
|
87171
|
+
/** Full channel names, `debug.<channel>`, each declared with `kind: 'debug'`. */
|
|
87172
|
+
channels: z.array(z.string().min(1)).readonly().default([]),
|
|
87173
|
+
/** Numeric device ids. Required (non-empty) for `start`. */
|
|
87174
|
+
deviceIds: z.array(z.number().int()).readonly().default([])
|
|
87175
|
+
});
|
|
87176
|
+
var DebugWatchStateSchema = z.object({
|
|
87177
|
+
channel: z.string(),
|
|
87178
|
+
deviceIds: z.array(z.number().int()).readonly(),
|
|
87179
|
+
startedAtMs: z.number(),
|
|
87180
|
+
untilMs: z.number(),
|
|
87181
|
+
capAtMs: z.number()
|
|
87182
|
+
});
|
|
87183
|
+
var DebugWatchResultSchema = z.object({
|
|
87184
|
+
nowMs: z.number(),
|
|
87185
|
+
watches: z.array(DebugWatchStateSchema).readonly(),
|
|
87186
|
+
/** Channels a `rearm` found already lapsed: nothing was revived. */
|
|
87187
|
+
lapsed: z.array(z.string()).readonly()
|
|
87188
|
+
});
|
|
87031
87189
|
var systemCapability = {
|
|
87032
87190
|
name: "system",
|
|
87033
87191
|
scope: "system",
|
|
@@ -87141,6 +87299,14 @@ var systemCapability = {
|
|
|
87141
87299
|
setLoggingSettings: method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
87142
87300
|
kind: "mutation",
|
|
87143
87301
|
auth: "admin"
|
|
87302
|
+
}),
|
|
87303
|
+
/**
|
|
87304
|
+
* Start, re-arm, stop or list the live debug watches. See
|
|
87305
|
+
* {@link DebugWatchInputSchema}.
|
|
87306
|
+
*/
|
|
87307
|
+
debugWatch: method(DebugWatchInputSchema, DebugWatchResultSchema, {
|
|
87308
|
+
kind: "mutation",
|
|
87309
|
+
auth: "admin"
|
|
87144
87310
|
})
|
|
87145
87311
|
},
|
|
87146
87312
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/server/system` `buildCapRouters`. */
|
|
@@ -95700,6 +95866,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
95700
95866
|
access: "view",
|
|
95701
95867
|
role: "admin"
|
|
95702
95868
|
},
|
|
95869
|
+
"deviceManager.dismissDiscoveryProposal": {
|
|
95870
|
+
capName: "device-manager",
|
|
95871
|
+
capScope: "system",
|
|
95872
|
+
addonId: null,
|
|
95873
|
+
access: "create",
|
|
95874
|
+
role: "admin"
|
|
95875
|
+
},
|
|
95703
95876
|
"deviceManager.enable": {
|
|
95704
95877
|
capName: "device-manager",
|
|
95705
95878
|
capScope: "system",
|
|
@@ -95882,6 +96055,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
95882
96055
|
access: "view",
|
|
95883
96056
|
role: "viewer"
|
|
95884
96057
|
},
|
|
96058
|
+
"deviceManager.listDiscoveryProposals": {
|
|
96059
|
+
capName: "device-manager",
|
|
96060
|
+
capScope: "system",
|
|
96061
|
+
addonId: null,
|
|
96062
|
+
access: "view",
|
|
96063
|
+
role: "admin"
|
|
96064
|
+
},
|
|
95885
96065
|
"deviceManager.listLocationDescriptions": {
|
|
95886
96066
|
capName: "device-manager",
|
|
95887
96067
|
capScope: "system",
|
|
@@ -96036,6 +96216,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96036
96216
|
access: "create",
|
|
96037
96217
|
role: "admin"
|
|
96038
96218
|
},
|
|
96219
|
+
"deviceManager.reportDiscoveryObservations": {
|
|
96220
|
+
capName: "device-manager",
|
|
96221
|
+
capScope: "system",
|
|
96222
|
+
addonId: null,
|
|
96223
|
+
access: "create",
|
|
96224
|
+
role: "admin"
|
|
96225
|
+
},
|
|
96039
96226
|
"deviceManager.runDeviceAction": {
|
|
96040
96227
|
capName: "device-manager",
|
|
96041
96228
|
capScope: "system",
|
|
@@ -96043,6 +96230,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96043
96230
|
access: "create",
|
|
96044
96231
|
role: "admin"
|
|
96045
96232
|
},
|
|
96233
|
+
"deviceManager.runDiscoverySweep": {
|
|
96234
|
+
capName: "device-manager",
|
|
96235
|
+
capScope: "system",
|
|
96236
|
+
addonId: null,
|
|
96237
|
+
access: "create",
|
|
96238
|
+
role: "admin"
|
|
96239
|
+
},
|
|
96046
96240
|
"deviceManager.setChildLayout": {
|
|
96047
96241
|
capName: "device-manager",
|
|
96048
96242
|
capScope: "system",
|
|
@@ -102630,6 +102824,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
102630
102824
|
access: "create",
|
|
102631
102825
|
role: "viewer"
|
|
102632
102826
|
},
|
|
102827
|
+
"system.debugWatch": {
|
|
102828
|
+
capName: "system",
|
|
102829
|
+
capScope: "system",
|
|
102830
|
+
addonId: null,
|
|
102831
|
+
access: "create",
|
|
102832
|
+
role: "admin"
|
|
102833
|
+
},
|
|
102633
102834
|
"system.detectSiteLocation": {
|
|
102634
102835
|
capName: "system",
|
|
102635
102836
|
capScope: "system",
|
|
@@ -106637,6 +106838,11 @@ Object.freeze({
|
|
|
106637
106838
|
form: "single",
|
|
106638
106839
|
optional: false
|
|
106639
106840
|
}],
|
|
106841
|
+
"system.debugWatch": [{
|
|
106842
|
+
name: "deviceIds",
|
|
106843
|
+
form: "array",
|
|
106844
|
+
optional: true
|
|
106845
|
+
}],
|
|
106640
106846
|
"tamper.getStatus": [{
|
|
106641
106847
|
name: "deviceId",
|
|
106642
106848
|
form: "single",
|
|
@@ -109123,4 +109329,4 @@ z.object({
|
|
|
109123
109329
|
commands: z.record(z.string(), z.unknown())
|
|
109124
109330
|
});
|
|
109125
109331
|
//#endregion
|
|
109126
|
-
export { FAN_CAPTURE_FIELDS as $, integrateReading as $a, settingsStoreCapability as $i, deviceHistoryCapability as $n, collectZodSecretPaths as $o, mayWriteToLocation as $r, actionEffect as $t, CredentialTokenClaimsSchema as A, weekdayOfLocalDate as Aa, recordsCapability as Ai, colorCapability as An, RUNTIME_DEFAULTS as Ao, isArrayOutputSchema as Ar, resolveSecretMarkers as As, QuantityUnitError as At, DEVICE_ID_FIELD as B, buildFfmpegArgs as Ba, resolveHubAddressRoles as Bi, createDeviceExtensionProvider as Bn, TransactRefusedError as Bo, keychainCapability as Br, DeviceFeature as Bs, SchedulerSchema as Bt, CORE_BLOCK_ADDON_PREFIX as C, validateCustomAddress as Ca, powerSourceCapability as Ci, canonicalIconKey as Cn, RECORD_BATCH_MAX as Co, groupCommandsCapability as Cr, normalizeSecretOwner as Cs, MigrationLedgerEntrySchema as Ct, ConditionMirror as D, vectorIndexDimConflictError as Da, procedureAuthKey as Di, checkTemplatePayload as Dn, RECORD_SWEEP_INTERVAL_MS as Do, isAlertEpisodeOpen as Dr, readinessKey as Ds, PreferenceDeviceIdSchema as Dt, CatalogFileSchema as E, vectorDimFromBase64 as Ea, problemsBlockSave as Ei, checkRoleAddress as En, RECORD_SECRET_COLLECTION_PREFIX as Eo, interpolate as Er, parseSecretRef as Es, PREFERENCES_MAX_VALUE_BYTES as Et, DAY_NAMES as F, DEFAULT_HISTORY_RETENTION as Fa, resolveActionVariables as Fi, coreBlockComposition as Fn, RecordTooLargeError as Fo, isLocationEnabled as Fr, toNodeId as Fs, RemoteConfigSchema as Ft, DataStoreDatabaseSchema as G, compositionItemFieldPath as Ga, resolveStepArgs as Gi, declarationOwnerNodeId as Gn, asNumber as Go, localNetworkCapability as Gr, StorageLocationModeSchema as Gt, DEVICE_SAN_CREDENTIAL_PREFIX as H, composedDeviceRef as Ha, resolveMethodAuth as Hi, customRole as Hn, UnknownRecordKindError as Ho, legacyModeOf as Hr, DeviceType as Hs, ServerNameSchema as Ht, DEFAULT_HOLD_OVERRIDE as I, HISTORY_FAST_MS as Ia, resolveAppConnections as Ii, coreBlockIdFromAddonId as In, RecordUniqueViolationError as Io, isObjectInput as Ir, toSecretFieldView as Is, RunningStateStatusSchema as It, DeviceStatusSchema as J, createStatefulExpressionMemory as Ja, runtimeStatePolicyFor as Ji, defineExtensionSlotProvider as Jn, assertValidDeclaration as Jo, lockDoorLinkOfComposition as Jr, SwitchStatusSchema as Jt, DeclaredDevices as K, compositionSliceKey as Ka, runFanOut as Ki, declaredSeriesKind as Kn, asString$1 as Ko, locationIconKey as Kr, StorageLocationTypeSchema as Kt, DERIVED_CAMERA_SILENCED_CAP_NAMES as L, HISTORY_SLOW_MS as La, resolveBucketMs as Li, coreBlockSourceKind as Ln, RevConflictError as Lo, isVoidInput as Lr, transformSecretWrite as Ls, STORAGE_ACCESS_FALLBACK as Lt, DATABASE_SNAPSHOT_SUFFIX as M, zoneOnlySite as Ma, remoteCapability as Mi, compositionFieldKey as Mn, ReadinessTimeoutError as Mo, isCredentialTokenPayload as Mr, secretTreeFromPaths as Ms, ROOT_BUCKET_KEY as Mt, DATABASE_SNAPSHOT_TIMEOUT_MS as N, COMPOSER_ADDON_ID as Na, remoteLayoutComponentsCapability as Ni, compositionSourceRefs as Nn, RecordKindDeclarationSchema as No, isDefaultAppConnectionEndpoint as Nr, secretTreeFromSchema as Ns, RecordingStatusSchema as Nt, ControlStatusSchema as O, vectorStoreCapability as Oa, ptzAutotrackCapability as Oi, climateControlCapability as On, REDACTED_SECRET as Oo, isAlertEpisodeSeverity as Or, recordSecretRef as Os, PreferenceNamespaceSchema as Ot, DATA_STORE_DATABASES as P, DAY_MS as Pa, replacedFieldKeys as Pi, coreBlockAddonId as Pn, RecordNotFoundError as Po, isInternalActionId as Pr, sleep as Ps, RemoteAssumedStateSchema as Pt, EMPTY_REMOTE_CONFIG as Q, helperMembers as Qa, scoreRuntimes as Qi, deviceExtensionCapability as Qn, collectSecretMarkerRefs as Qo, mayReadLocation as Qr, UserRecordSchema as Qt, DEVICE_ENROLLMENT_TTL_MS as R, HOUR_MS as Ra, resolveCoreBlockEntry as Ri, coreBlocksCapability as Rn, SECRET_CLEAR as Ro, kebabToCamel as Rr, userError as Rs, STREAM_PROFILE_META as Rt, CORE_BLOCKS_ADDON_ID as S, validateComposition as Sa, platformProbeCapability as Si, cameraGridLayoutCapability as Sn, PlaintextSecretError as So, gbToBytes as Sr, normalizeNodeId as Ss, MediaPlayerStatusSchema as St, CalendarPreferencesSchema as T, valveCapability as Ta, preconditionOf as Ti, catalogueIssues as Tn, RECORD_DELETE_BATCH as To, internalActionId as Tr, parseJsonUnknown as Ts, NetworkTunnelStartedDataSchema as Tt, DEVICE_SAN_USER_PREFIX as U, composedDeviceStableId as Ua, resolveMutate as Ui, dataStoreProviderCapability as Un, WELL_KNOWN_TAB_MAP as Uo, lifecycleJobSchema as Ur, errMsg as Us, SsoBridgeClaimsSchema as Ut, DEVICE_NONCE_TTL_MS as V, cloneStatefulExpressionMemory as Va, resolveLocationMode as Vi, customKeyOfRole as Vn, UnindexedFilterError as Vo, legacyAutoLinkIds as Vr, DeviceRole as Vs, ScopedTokenSchema as Vt, DEVICE_TOMBSTONE_RETENTION_MS as W, compositionFeatureEnabled as Wa, resolveNotificationTapAddress as Wi, databaseSnapshotCapability as Wn, asJsonObject as Wo, localDateOf as Wr, EventCategory as Ws, StorageCleanupJobSchema as Wt, EMPTY_AUTOMATION_STATE as X, evaluateDerivative as Xa, scopesAllowAddon as Xi, describeComposableCaps as Xn, collectSecretConfigKeys as Xo, logLevelAtMost as Xr, TokenScopeSchema as Xt, DeviceTombstoneSchema as Y, disarmRoseMemory as Ya, schedulersCapability as Yi, deriveBatteryPresence as Yn, buildSecretRef as Yo, logDestinationCapability as Yr, TemplateKindSchema as Yt, EMPTY_REMOTE_ASSUMED_STATE as Z, evaluateStatistic as Za, scopesAllowDeviceCap as Zi, deviceCredentialsCapability as Zn, collectSecretLeaves as Zo, looseSchema as Zr, UNATTRIBUTED_BUCKET_KEY as Zt, CAMSTACK_APP_LINK_ORIGIN as _, templateCapability as _a, parseAcceleratorFactsJson as _i, buildCapabilityLookup as _n, FilterRequiredError as _o, featureForwards as _r, isSecretMarkerLike as _s, LOG_LEVEL_RANK as _t, AGENT_MDNS_TXT_KEYS as a, siteZoneKey as aa, modeMayWrite as ai, addonWidgetsCapability as an, planResetTier as ao, enumerateInferenceDevices as ar, emitReadiness as as, FieldClaimSchema as at, COMPOSED_ITEM_FIXED_FIELDS as b, timedRunSeconds as ba, pickAppLinkHub as bi, buildStreamParamsConfigSchema as bn, InvalidRecordError as bo, formatDeviceRevoker as br, mapSecretLeaves as bs, MINUTES_PER_DAY as bt, ActionStepSchema as c, storageAdminCapability as ca, normalizeActionUnits as ci, alertsCapability as cn, toExpressionValue as co, evaluateCompositionField as cr, historyItemFieldPath as cs, HISTORY_ITEM_CATALOG as ct, AlertSchema as d, storageOccupancyCapability as da, normalizeStepTargets as di, authProviderCapability as dn, BatchTooLargeError as do, expandContainer as dr, isDeviceConfigCap as ds, HvacModeSchema as dt, sharedActuatorFeatures as ea, mediaPlayerCapability as ei, actionSourceCapability as en, isForwardInputRef as eo, deviceManagerCapability as er, createEvent as es, FIRST_LEVEL_MACRO_CLASSES as et, AutomationStateDocSchema as f, storageProviderCapability as fa, normalizeUnit as fi, backupCapability as fn, CALLER_STAMPED_CAPABILITIES as fo, expressionContainsBuiltinCall as fr, isEvent as fs, IDLE_ACTION_STATUS as ft, CAMERA_SWITCH_ORDER as g, switchCapability as ga, orderMigrations as gi, buildActionSteps as gn, DeclarationRefusedError as go, fanPresetsCapability as gr, isSecretMarker as gs, KeychainResetRecordSchema as gt, BatteryStatusSchema as h, supportedRuntimes as ha, occurrenceOn as hi, brightnessCapability as hn, DEVICE_STATUS_METHOD as ho, fanOutTargets as hr, isSecretClear as hs, KeychainAuditEntrySchema as ht, AGENT_MDNS_SERVICE_TYPE as i, siteFor as ia, migrationsCapability as ii, addonSettingsCapability as in, openStatistic as io, deviceStatusCapability as ir, emitDownForOwnedCaps as is, FieldClaimModeSchema as it, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as j, withLocationMode as ja, reducePoints as ji, composerCapability as jn, ReadinessRegistry as jo, isCollectionArrayMethod as jr, scopeKey as js, RECORDING_SOURCE_CAMSTACK_ADDON as jt, CoreBlockSchema as k, vocabActionIdFor as ka, recordEntriesCapability as ki, collectWhenMirrorSources as kn, REMOVE_LEAF as ko, isAppLinkBase as kr, resolveCapMount as ks, PreferenceValueSchema as kt, ActionTargetResolver as l, storageCapability as la, normalizeCapStep as li, appendTrace as ln, wattMillisecondsToKwh as lo, evaluateWhenTree as lr, historyUnitFor as ls, HUB_MDNS_SERVICE_TYPE as lt, BaseDevice as m, streamQualityLabel as ma, objectInputDeclaresRequiredDeviceId as mi, batteryCapability as mn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as mo, fanControlCapability as mr, isReadingQuantity as ms, KEYCHAIN_RESET_TRIGGER_ACTOR as mt, ACTUATOR_METHODS as n, sharedColorModes as na, methodRefusal as ni, addonIdOfActionId as nn, nextLocalMidnight as no, deviceRunsCapability as nr, defineCustomActions as ns, FanDirectionSchema as nt, ALL_CAPABILITY_DEFINITIONS as o, snapshotCapability as oa, motionCapability as oi, alertEpisodeId as on, planStatisticTier as oo, enumerateItemArrayFields as or, expandCapMethods as os, GroupCommandResultSchema as ot, BUILTIN_REMOTE_COMPONENTS as p, streamCatalogCapability as pa, objectInputDeclaresAddonId as pi, bareAddonId as pn, DATAPLANE_SECRET_HEADER as po, extractNestedAddonId as pr, isKeychainStoredField as ps, INTERNAL_ACTION_PREFIX as pt, DeviceRunSchema as q, compositionSourceKey as qa, runSteps as qi, decodeVectorBase64 as qn, assertTransactScope as qo, lockControlCapability as qr, StorageMigrationJobSchema as qt, ACTUATOR_TEMPLATE_IDS as r, shortHostname as ra, metricsProviderCapability as ri, addonPagesCapability as rn, openReset as ro, deviceStateCapability as rr, defineRecordKinds as rs, FanPresetSchema as rt, ActionError as s, splitTranslationRef as sa, nextOccurrence as si, alertEpisodePayload as sn, statisticCadenceMs as so, enumerateSchemaFields as sr, formatSecretScope as ss, HISTORY_CATALOG as st, ACTION_TARGET_INVALIDATION_EVENTS as t, sharedActuatorMethods as ta, memoizePinnedFfmpeg as ti, actionsCapability as tn, isHistoryHelper as to, deviceRemovalHookCapability as tr, customAction as ts, FanControlStatusSchema as tt, ActionVariableSchema as u, storageMigrationCapability as ua, normalizeCoreBlockWrite as ui, armRemovalReconcile as un, BaseAddon as uo, evictionPolicyOfLocation as ur, hydrateSchema as us, HUB_MDNS_TXT_KEYS as ut, CAP_NAMES_WITH_STATUS as v, timedRunCapability as va, parseColorInput as vi, buildDeviceEnrollmentLink as vn, ForeignSecretMarkerError as vo, filesystemBrowseCapability as vr, isSecretRefOwnedBy as vs, LegacyStorageLocationDefaultSchema as vt, CREDENTIAL_TOKEN_AUDIENCE as w, validateSchedulerInput as wa, powerSourceLinkOfComposition as wi, capUnitResolver as wn, RECORD_BATCH_MAX_BYTES as wo, groupTemplate as wr, parseJsonObject as ws, MigrationMetaSchema as wt, COMPOSER_RUNNER_ID as x, userManagementCapability as xa, planComposition as xi, calendarsCapability as xn, NoCallerError as xo, formatMinutes as xr, nodePin as xs, MOTION_CLOSE_AFTER_MS as xt, CATALOG_LANGS as y, timedRunLimitOf as ya, parseStreamParamsFormPatch as yi, buildDeviceSignatureMessage as yn, HISTORY_DEFAULT_MIN_INTERVAL_MS as yo, foldSnapshotByFunction as yr, makeSecretMarker as ys, METHOD_ACCESS_MAP as yt, DEVICE_HISTORY_ENERGY_KEY as z, MINUTE_MS as za, resolveCoreBlockFiles as zi, coverCapability as zn, StoredRecordKindDeclarationSchema as zo, keychainAdminCapability as zr, withoutCallerStamp as zs, SchedulerError as zt };
|
|
109332
|
+
export { EMPTY_REMOTE_CONFIG as $, helperMembers as $a, scoreRuntimes as $i, deviceExtensionCapability as $n, collectSecretMarkerRefs as $o, mayReadLocation as $r, UserRecordSchema as $t, CredentialTokenClaimsSchema as A, vocabActionIdFor as Aa, recordEntriesCapability as Ai, collectWhenMirrorSources as An, REMOVE_LEAF as Ao, isAppLinkBase as Ar, readinessKey as As, PreferenceValueSchema as At, DEVICE_ID_FIELD as B, MINUTE_MS as Ba, resolveCoreBlockFiles as Bi, coverCapability as Bn, StoredRecordKindDeclarationSchema as Bo, keychainAdminCapability as Br, transformSecretWrite as Bs, SchedulerError as Bt, CORE_BLOCK_ADDON_PREFIX as C, validateComposition as Ca, platformProbeCapability as Ci, cameraGridLayoutCapability as Cn, PlaintextSecretError as Co, gbToBytes as Cr, mapSecretLeaves as Cs, MediaPlayerStatusSchema as Ct, ConditionMirror as D, vectorDimFromBase64 as Da, problemsBlockSave as Di, checkRoleAddress as Dn, RECORD_SECRET_COLLECTION_PREFIX as Do, interpolate as Dr, parseJsonObject as Ds, PREFERENCES_MAX_VALUE_BYTES as Dt, CatalogFileSchema as E, valveCapability as Ea, preconditionOf as Ei, catalogueIssues as En, RECORD_DELETE_BATCH as Eo, internalActionId as Er, normalizeSecretOwner as Es, NetworkTunnelStartedDataSchema as Et, DAY_NAMES as F, DAY_MS as Fa, replacedFieldKeys as Fi, coreBlockAddonId as Fn, RecordNotFoundError as Fo, isInternalActionId as Fr, secretTreeFromPaths as Fs, RemoteAssumedStateSchema as Ft, DataStoreDatabaseSchema as G, compositionFeatureEnabled as Ga, resolveNotificationTapAddress as Gi, databaseSnapshotCapability as Gn, asJsonObject as Go, localDateOf as Gr, DeviceType as Gs, StorageCleanupJobSchema as Gt, DEVICE_SAN_CREDENTIAL_PREFIX as H, cloneStatefulExpressionMemory as Ha, resolveLocationMode as Hi, customKeyOfRole as Hn, UnindexedFilterError as Ho, legacyAutoLinkIds as Hr, withoutCallerStamp as Hs, ScopedTokenSchema as Ht, DEFAULT_HOLD_OVERRIDE as I, DEFAULT_HISTORY_RETENTION as Ia, resolveActionVariables as Ii, coreBlockComposition as In, RecordTooLargeError as Io, isLocationEnabled as Ir, secretTreeFromSchema as Is, RemoteConfigSchema as It, DeviceStatusSchema as J, compositionSourceKey as Ja, runSteps as Ji, decodeVectorBase64 as Jn, assertTransactScope as Jo, lockControlCapability as Jr, StorageMigrationJobSchema as Jt, DeclaredDevices as K, compositionItemFieldPath as Ka, resolveStepArgs as Ki, declarationOwnerNodeId as Kn, asNumber as Ko, localNetworkCapability as Kr, errMsg as Ks, StorageLocationModeSchema as Kt, DERIVED_CAMERA_SILENCED_CAP_NAMES as L, HISTORY_FAST_MS as La, resolveAppConnections as Li, coreBlockIdFromAddonId as Ln, RecordUniqueViolationError as Lo, isObjectInput as Lr, sleep as Ls, RunningStateStatusSchema as Lt, DATABASE_SNAPSHOT_SUFFIX as M, withLocationMode as Ma, reducePoints as Mi, composerCapability as Mn, ReadinessRegistry as Mo, isCollectionArrayMethod as Mr, resolveCapMount as Ms, RECORDING_SOURCE_CAMSTACK_ADDON as Mt, DATABASE_SNAPSHOT_TIMEOUT_MS as N, zoneOnlySite as Na, remoteCapability as Ni, compositionFieldKey as Nn, ReadinessTimeoutError as No, isCredentialTokenPayload as Nr, resolveSecretMarkers as Ns, ROOT_BUCKET_KEY as Nt, ControlStatusSchema as O, vectorIndexDimConflictError as Oa, procedureAuthKey as Oi, checkTemplatePayload as On, RECORD_SWEEP_INTERVAL_MS as Oo, isAlertEpisodeOpen as Or, parseJsonUnknown as Os, PreferenceDeviceIdSchema as Ot, DATA_STORE_DATABASES as P, COMPOSER_ADDON_ID as Pa, remoteLayoutComponentsCapability as Pi, compositionSourceRefs as Pn, RecordKindDeclarationSchema as Po, isDefaultAppConnectionEndpoint as Pr, scopeKey as Ps, RecordingStatusSchema as Pt, EMPTY_REMOTE_ASSUMED_STATE as Q, evaluateStatistic as Qa, scopesAllowDeviceCap as Qi, deviceCredentialsCapability as Qn, collectSecretLeaves as Qo, looseSchema as Qr, UNATTRIBUTED_BUCKET_KEY as Qt, DEVICE_ENROLLMENT_TTL_MS as R, HISTORY_SLOW_MS as Ra, resolveBucketMs as Ri, coreBlockSourceKind as Rn, RevConflictError as Ro, isVoidInput as Rr, toNodeId as Rs, STORAGE_ACCESS_FALLBACK as Rt, CORE_BLOCKS_ADDON_ID as S, userManagementCapability as Sa, planComposition as Si, calendarsCapability as Sn, NoCallerError as So, formatMinutes as Sr, makeSecretMarker as Ss, MOTION_CLOSE_AFTER_MS as St, CalendarPreferencesSchema as T, validateSchedulerInput as Ta, powerSourceLinkOfComposition as Ti, capUnitResolver as Tn, RECORD_BATCH_MAX_BYTES as To, groupTemplate as Tr, normalizeNodeId as Ts, MigrationMetaSchema as Tt, DEVICE_SAN_USER_PREFIX as U, composedDeviceRef as Ua, resolveMethodAuth as Ui, customRole as Un, UnknownRecordKindError as Uo, legacyModeOf as Ur, DeviceFeature as Us, ServerNameSchema as Ut, DEVICE_NONCE_TTL_MS as V, buildFfmpegArgs as Va, resolveHubAddressRoles as Vi, createDeviceExtensionProvider as Vn, TransactRefusedError as Vo, keychainCapability as Vr, userError as Vs, SchedulerSchema as Vt, DEVICE_TOMBSTONE_RETENTION_MS as W, composedDeviceStableId as Wa, resolveMutate as Wi, dataStoreProviderCapability as Wn, WELL_KNOWN_TAB_MAP as Wo, lifecycleJobSchema as Wr, DeviceRole as Ws, SsoBridgeClaimsSchema as Wt, DiscoveryProposalBodySchema as X, disarmRoseMemory as Xa, schedulersCapability as Xi, deriveBatteryPresence as Xn, buildSecretRef as Xo, logDestinationCapability as Xr, TemplateKindSchema as Xt, DeviceTombstoneSchema as Y, createStatefulExpressionMemory as Ya, runtimeStatePolicyFor as Yi, defineExtensionSlotProvider as Yn, assertValidDeclaration as Yo, lockDoorLinkOfComposition as Yr, SwitchStatusSchema as Yt, EMPTY_AUTOMATION_STATE as Z, evaluateDerivative as Za, scopesAllowAddon as Zi, describeComposableCaps as Zn, collectSecretConfigKeys as Zo, logLevelAtMost as Zr, TokenScopeSchema as Zt, CAMSTACK_APP_LINK_ORIGIN as _, switchCapability as _a, orderMigrations as _i, buildActionSteps as _n, DeclarationRefusedError as _o, fanPresetsCapability as _r, isReadingQuantity as _s, KeychainResetRecordSchema as _t, AGENT_MDNS_TXT_KEYS as a, siteFor as aa, migrationsCapability as ai, addonSettingsCapability as an, openStatistic as ao, deviceStatusCapability as ar, emitDownForOwnedCaps as as, FieldClaimModeSchema as at, COMPOSED_ITEM_FIXED_FIELDS as b, timedRunLimitOf as ba, parseStreamParamsFormPatch as bi, buildDeviceSignatureMessage as bn, HISTORY_DEFAULT_MIN_INTERVAL_MS as bo, foldSnapshotByFunction as br, isSecretMarkerLike as bs, METHOD_ACCESS_MAP as bt, ActionStepSchema as c, splitTranslationRef as ca, nextOccurrence as ci, alertEpisodePayload as cn, statisticCadenceMs as co, enumerateSchemaFields as cr, formatSecretScope as cs, HISTORY_CATALOG as ct, AlertSchema as d, storageMigrationCapability as da, normalizeCoreBlockWrite as di, armRemovalReconcile as dn, BaseAddon as do, evictionPolicyOfLocation as dr, historyUnitFor as ds, HUB_MDNS_TXT_KEYS as dt, settingsStoreCapability as ea, mayWriteToLocation as ei, actionEffect as en, integrateReading as eo, deviceHistoryCapability as er, collectZodSecretPaths as es, FAN_CAPTURE_FIELDS as et, AutomationStateDocSchema as f, storageOccupancyCapability as fa, normalizeStepTargets as fi, authProviderCapability as fn, BatchTooLargeError as fo, expandContainer as fr, hydrateSchema as fs, HvacModeSchema as ft, CAMERA_SWITCH_ORDER as g, supportedRuntimes as ga, occurrenceOn as gi, brightnessCapability as gn, DEVICE_STATUS_METHOD as go, fanOutTargets as gr, isKeychainStoredField as gs, KeychainAuditEntrySchema as gt, BatteryStatusSchema as h, streamQualityLabel as ha, objectInputDeclaresRequiredDeviceId as hi, batteryCapability as hn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as ho, fanControlCapability as hr, isEvent as hs, KEYCHAIN_RESET_TRIGGER_ACTOR as ht, AGENT_MDNS_SERVICE_TYPE as i, shortHostname as ia, metricsProviderCapability as ii, addonPagesCapability as in, openReset as io, deviceStateCapability as ir, defineRecordKinds as is, FanPresetSchema as it, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as j, weekdayOfLocalDate as ja, recordsCapability as ji, colorCapability as jn, RUNTIME_DEFAULTS as jo, isArrayOutputSchema as jr, recordSecretRef as js, QuantityUnitError as jt, CoreBlockSchema as k, vectorStoreCapability as ka, ptzAutotrackCapability as ki, climateControlCapability as kn, REDACTED_SECRET as ko, isAlertEpisodeSeverity as kr, parseSecretRef as ks, PreferenceNamespaceSchema as kt, ActionTargetResolver as l, storageAdminCapability as la, normalizeActionUnits as li, alertsCapability as ln, toExpressionValue as lo, evaluateCompositionField as lr, getDebugInterest as ls, HISTORY_ITEM_CATALOG as lt, BaseDevice as m, streamCatalogCapability as ma, objectInputDeclaresAddonId as mi, bareAddonId as mn, DATAPLANE_SECRET_HEADER as mo, extractNestedAddonId as mr, isDeviceConfigCap as ms, INTERNAL_ACTION_PREFIX as mt, ACTUATOR_METHODS as n, sharedActuatorMethods as na, memoizePinnedFfmpeg as ni, actionsCapability as nn, isHistoryHelper as no, deviceRemovalHookCapability as nr, customAction as ns, FanControlStatusSchema as nt, ALL_CAPABILITY_DEFINITIONS as o, siteZoneKey as oa, modeMayWrite as oi, addonWidgetsCapability as on, planResetTier as oo, enumerateInferenceDevices as or, emitReadiness as os, FieldClaimSchema as ot, BUILTIN_REMOTE_COMPONENTS as p, storageProviderCapability as pa, normalizeUnit as pi, backupCapability as pn, CALLER_STAMPED_CAPABILITIES as po, expressionContainsBuiltinCall as pr, isDebugChannelName as ps, IDLE_ACTION_STATUS as pt, DeviceRunSchema as q, compositionSliceKey as qa, runFanOut as qi, declaredSeriesKind as qn, asString$1 as qo, locationIconKey as qr, EventCategory as qs, StorageLocationTypeSchema as qt, ACTUATOR_TEMPLATE_IDS as r, sharedColorModes as ra, methodRefusal as ri, addonIdOfActionId as rn, nextLocalMidnight as ro, deviceRunsCapability as rr, defineCustomActions as rs, FanDirectionSchema as rt, ActionError as s, snapshotCapability as sa, motionCapability as si, alertEpisodeId as sn, planStatisticTier as so, enumerateItemArrayFields as sr, expandCapMethods as ss, GroupCommandResultSchema as st, ACTION_TARGET_INVALIDATION_EVENTS as t, sharedActuatorFeatures as ta, mediaPlayerCapability as ti, actionSourceCapability as tn, isForwardInputRef as to, deviceManagerCapability as tr, createEvent as ts, FIRST_LEVEL_MACRO_CLASSES as tt, ActionVariableSchema as u, storageCapability as ua, normalizeCapStep as ui, appendTrace as un, wattMillisecondsToKwh as uo, evaluateWhenTree as ur, historyItemFieldPath as us, HUB_MDNS_SERVICE_TYPE as ut, CAP_NAMES_WITH_STATUS as v, templateCapability as va, parseAcceleratorFactsJson as vi, buildCapabilityLookup as vn, FilterRequiredError as vo, featureForwards as vr, isSecretClear as vs, LOG_LEVEL_RANK as vt, CREDENTIAL_TOKEN_AUDIENCE as w, validateCustomAddress as wa, powerSourceCapability as wi, canonicalIconKey as wn, RECORD_BATCH_MAX as wo, groupCommandsCapability as wr, nodePin as ws, MigrationLedgerEntrySchema as wt, COMPOSER_RUNNER_ID as x, timedRunSeconds as xa, pickAppLinkHub as xi, buildStreamParamsConfigSchema as xn, InvalidRecordError as xo, formatDeviceRevoker as xr, isSecretRefOwnedBy as xs, MINUTES_PER_DAY as xt, CATALOG_LANGS as y, timedRunCapability as ya, parseColorInput as yi, buildDeviceEnrollmentLink as yn, ForeignSecretMarkerError as yo, filesystemBrowseCapability as yr, isSecretMarker as ys, LegacyStorageLocationDefaultSchema as yt, DEVICE_HISTORY_ENERGY_KEY as z, HOUR_MS as za, resolveCoreBlockEntry as zi, coreBlocksCapability as zn, SECRET_CLEAR as zo, kebabToCamel as zr, toSecretFieldView as zs, STREAM_PROFILE_META as zt };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
//#region src/builtins/local-network/scan/dns-wire.ts
|
|
2
|
+
/**
|
|
3
|
+
* DNS-SD wire format for the scan engine: one PTR question per service type,
|
|
4
|
+
* and a parser that turns an answer into services (instance, host, port, TXT).
|
|
5
|
+
*/
|
|
6
|
+
/** Top bit of the question class: ask for a unicast reply (RFC 6762). */
|
|
7
|
+
var MDNS_QU_CLASS = 32769;
|
|
8
|
+
/** Plain IN class: the responder may answer on the group (QM), which a group member hears. */
|
|
9
|
+
var MDNS_QM_CLASS = 1;
|
|
10
|
+
var A = 1;
|
|
11
|
+
var PTR = 12;
|
|
12
|
+
var TXT = 16;
|
|
13
|
+
var SRV = 33;
|
|
14
|
+
var SRV_FIXED = 6;
|
|
15
|
+
var MAX_NAME_HOPS = 16;
|
|
16
|
+
var MDNS_PORT = 5353;
|
|
17
|
+
var MDNS_GROUP = "224.0.0.251";
|
|
18
|
+
/** `_esphomelib._tcp` and `_esphomelib._tcp.local.` name the same service. */
|
|
19
|
+
function normalizeServiceType(serviceType) {
|
|
20
|
+
const lower = serviceType.trim().toLowerCase().replace(/\.$/, "");
|
|
21
|
+
return lower.endsWith(".local") ? lower.slice(0, -6) : lower;
|
|
22
|
+
}
|
|
23
|
+
function readName(buf, start) {
|
|
24
|
+
const labels = [];
|
|
25
|
+
let pos = start;
|
|
26
|
+
let end = start;
|
|
27
|
+
let jumped = false;
|
|
28
|
+
for (let hops = 0; hops < MAX_NAME_HOPS; hops++) {
|
|
29
|
+
if (pos < 0 || pos >= buf.length) return null;
|
|
30
|
+
const len = buf[pos] ?? 0;
|
|
31
|
+
if (len === 0) {
|
|
32
|
+
if (!jumped) end = pos + 1;
|
|
33
|
+
return {
|
|
34
|
+
name: labels.join("."),
|
|
35
|
+
end
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if ((len & 192) === 192) {
|
|
39
|
+
if (pos + 1 >= buf.length) return null;
|
|
40
|
+
if (!jumped) end = pos + 2;
|
|
41
|
+
jumped = true;
|
|
42
|
+
pos = (len & 63) << 8 | (buf[pos + 1] ?? 0);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if ((len & 192) !== 0 || pos + 1 + len > buf.length) return null;
|
|
46
|
+
labels.push(buf.subarray(pos + 1, pos + 1 + len).toString("utf8"));
|
|
47
|
+
pos += 1 + len;
|
|
48
|
+
if (!jumped) end = pos;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
function readRecords(buf, offset, count) {
|
|
53
|
+
const records = [];
|
|
54
|
+
let pos = offset;
|
|
55
|
+
for (let i = 0; i < count; i++) {
|
|
56
|
+
const name = readName(buf, pos);
|
|
57
|
+
if (name === null || name.end + 10 > buf.length) return null;
|
|
58
|
+
const type = buf.readUInt16BE(name.end);
|
|
59
|
+
const dataLength = buf.readUInt16BE(name.end + 8);
|
|
60
|
+
const dataOffset = name.end + 10;
|
|
61
|
+
if (dataOffset + dataLength > buf.length) return null;
|
|
62
|
+
records.push({
|
|
63
|
+
name: name.name,
|
|
64
|
+
type,
|
|
65
|
+
dataOffset,
|
|
66
|
+
dataLength
|
|
67
|
+
});
|
|
68
|
+
pos = dataOffset + dataLength;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
records,
|
|
72
|
+
next: pos
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function parseTxt(buf, offset, length) {
|
|
76
|
+
const out = {};
|
|
77
|
+
let pos = offset;
|
|
78
|
+
const end = offset + length;
|
|
79
|
+
while (pos < end) {
|
|
80
|
+
const len = buf[pos] ?? 0;
|
|
81
|
+
pos += 1;
|
|
82
|
+
if (len === 0 || pos + len > end) break;
|
|
83
|
+
const entry = buf.subarray(pos, pos + len).toString("utf8");
|
|
84
|
+
pos += len;
|
|
85
|
+
const eq = entry.indexOf("=");
|
|
86
|
+
if (eq < 0) out[entry] = "";
|
|
87
|
+
else out[entry.slice(0, eq)] = entry.slice(eq + 1);
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/** One PTR question per service type, with the unicast-reply bit unless `unicastResponse` is false. */
|
|
92
|
+
function buildPtrQuery(serviceTypes, options = {}) {
|
|
93
|
+
const questionClass = options.unicastResponse === false ? MDNS_QM_CLASS : MDNS_QU_CLASS;
|
|
94
|
+
const header = Buffer.alloc(12);
|
|
95
|
+
header.writeUInt16BE(serviceTypes.length, 4);
|
|
96
|
+
const questions = serviceTypes.map((type) => {
|
|
97
|
+
const encoded = `${normalizeServiceType(type)}.local`.split(".").filter((part) => part.length > 0).map((l) => Buffer.concat([Buffer.from([l.length]), Buffer.from(l)]));
|
|
98
|
+
const tail = Buffer.alloc(4);
|
|
99
|
+
tail.writeUInt16BE(PTR, 0);
|
|
100
|
+
tail.writeUInt16BE(questionClass, 2);
|
|
101
|
+
return Buffer.concat([
|
|
102
|
+
...encoded,
|
|
103
|
+
Buffer.from([0]),
|
|
104
|
+
tail
|
|
105
|
+
]);
|
|
106
|
+
});
|
|
107
|
+
return Buffer.concat([header, ...questions]);
|
|
108
|
+
}
|
|
109
|
+
/** The services advertised on one mDNS message; a malformed packet yields none. */
|
|
110
|
+
function parseMdnsMessage(buf) {
|
|
111
|
+
if (buf.length < 12) return [];
|
|
112
|
+
const [questions = 0, answers = 0, authorities = 0, extra = 0] = [
|
|
113
|
+
4,
|
|
114
|
+
6,
|
|
115
|
+
8,
|
|
116
|
+
10
|
|
117
|
+
].map((o) => buf.readUInt16BE(o));
|
|
118
|
+
let pos = 12;
|
|
119
|
+
for (let i = 0; i < questions; i++) {
|
|
120
|
+
const name = readName(buf, pos);
|
|
121
|
+
if (name === null) return [];
|
|
122
|
+
pos = name.end + 4;
|
|
123
|
+
if (pos > buf.length) return [];
|
|
124
|
+
}
|
|
125
|
+
const records = [];
|
|
126
|
+
for (const count of [
|
|
127
|
+
answers,
|
|
128
|
+
authorities,
|
|
129
|
+
extra
|
|
130
|
+
]) {
|
|
131
|
+
const read = readRecords(buf, pos, count);
|
|
132
|
+
if (read === null) return [];
|
|
133
|
+
records.push(...read.records);
|
|
134
|
+
pos = read.next;
|
|
135
|
+
}
|
|
136
|
+
const ptrs = [];
|
|
137
|
+
const srv = /* @__PURE__ */ new Map();
|
|
138
|
+
const txt = /* @__PURE__ */ new Map();
|
|
139
|
+
const addresses = /* @__PURE__ */ new Map();
|
|
140
|
+
for (const rec of records) {
|
|
141
|
+
const key = rec.name.toLowerCase();
|
|
142
|
+
if (rec.type === PTR) {
|
|
143
|
+
const target = readName(buf, rec.dataOffset);
|
|
144
|
+
if (target !== null) ptrs.push({
|
|
145
|
+
serviceType: rec.name,
|
|
146
|
+
instance: target.name
|
|
147
|
+
});
|
|
148
|
+
} else if (rec.type === SRV && rec.dataLength >= SRV_FIXED) {
|
|
149
|
+
const target = readName(buf, rec.dataOffset + SRV_FIXED);
|
|
150
|
+
if (target !== null) srv.set(key, {
|
|
151
|
+
target: target.name,
|
|
152
|
+
port: buf.readUInt16BE(rec.dataOffset + 4)
|
|
153
|
+
});
|
|
154
|
+
} else if (rec.type === TXT) txt.set(key, parseTxt(buf, rec.dataOffset, rec.dataLength));
|
|
155
|
+
else if (rec.type === A && rec.dataLength === 4) addresses.set(key, `${buf[rec.dataOffset]}.${buf[rec.dataOffset + 1]}.${buf[rec.dataOffset + 2]}.${buf[rec.dataOffset + 3]}`);
|
|
156
|
+
}
|
|
157
|
+
const out = [];
|
|
158
|
+
for (const { serviceType, instance } of ptrs) {
|
|
159
|
+
const service = srv.get(instance.toLowerCase());
|
|
160
|
+
const target = service?.target ?? instance;
|
|
161
|
+
out.push({
|
|
162
|
+
serviceType: normalizeServiceType(serviceType),
|
|
163
|
+
instance,
|
|
164
|
+
address: addresses.get(target.toLowerCase()) ?? addresses.get(instance.toLowerCase()) ?? null,
|
|
165
|
+
host: target,
|
|
166
|
+
port: service?.port ?? 0,
|
|
167
|
+
txt: txt.get(instance.toLowerCase()) ?? {}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return out;
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
173
|
+
Object.defineProperty(exports, "MDNS_GROUP", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function() {
|
|
176
|
+
return MDNS_GROUP;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(exports, "MDNS_PORT", {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: function() {
|
|
182
|
+
return MDNS_PORT;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, "buildPtrQuery", {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function() {
|
|
188
|
+
return buildPtrQuery;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(exports, "normalizeServiceType", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: function() {
|
|
194
|
+
return normalizeServiceType;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
Object.defineProperty(exports, "parseMdnsMessage", {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function() {
|
|
200
|
+
return parseMdnsMessage;
|
|
201
|
+
}
|
|
202
|
+
});
|