@camstack/server 1.2.732 → 1.2.734

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/core/agent/node-removal-hooks.js +25 -0
  3. package/dist/manual-boot.js +11 -0
  4. package/package.json +4 -9
  5. package/system/dist/addon-runner.js +107 -82928
  6. package/system/dist/addon-runner.mjs +106 -82927
  7. package/system/dist/{agent-https-DKMO-__h.js → agent-https-DEmi-YQ_.js} +1 -1
  8. package/system/dist/{agent-https-CDtAIEne.mjs → agent-https-DGp4gFzH.mjs} +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  14. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  15. package/system/dist/builtins/autotrack/index.js +1 -1
  16. package/system/dist/builtins/autotrack/index.mjs +1 -1
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  19. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  20. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  21. package/system/dist/builtins/camera-grid/index.js +1 -1
  22. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  23. package/system/dist/builtins/composer/composer.addon.js +3 -3
  24. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  25. package/system/dist/builtins/console-logging/index.js +1 -1
  26. package/system/dist/builtins/console-logging/index.mjs +1 -1
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.js +79 -8
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +90 -21
  29. package/system/dist/builtins/core-blocks/index.mjs +1 -1
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  33. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  34. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  35. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  36. package/system/dist/builtins/keychain/index.js +3 -3
  37. package/system/dist/builtins/keychain/index.mjs +3 -3
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  39. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  40. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  41. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  42. package/system/dist/builtins/local-network/local-network.addon.js +131 -23
  43. package/system/dist/builtins/local-network/local-network.addon.mjs +131 -23
  44. package/system/dist/builtins/local-network/scan/dns-wire.d.ts +35 -2
  45. package/system/dist/builtins/local-network/scan/scan-engine.d.ts +1 -1
  46. package/system/dist/builtins/local-network/scan/scan-io.d.ts +6 -0
  47. package/system/dist/builtins/loki-logging/index.js +1 -1
  48. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  51. package/system/dist/builtins/platform-probe/index.js +1 -1
  52. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  53. package/system/dist/builtins/record-entries/index.js +1 -1
  54. package/system/dist/builtins/record-entries/index.mjs +1 -1
  55. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/system/dist/builtins/snapshot/index.js +1 -1
  58. package/system/dist/builtins/snapshot/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  64. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  65. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  66. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  67. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  68. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  69. package/system/dist/builtins/winston-logging/index.js +1 -1
  70. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  71. package/system/dist/{composition-sources-UQohOHgd.js → composition-sources-DfyoPtMe.js} +1 -1
  72. package/system/dist/{composition-sources-Ca7JEbmu.mjs → composition-sources-wVMwuZ-r.mjs} +1 -1
  73. package/system/dist/{constants-iG57sUNp.mjs → constants-C8fjD4YU.mjs} +1 -1
  74. package/system/dist/{constants-CLA4ogvA.js → constants-CavIW3ee.js} +1 -1
  75. package/system/dist/{device-ca--iHw76cR.mjs → device-ca-B1vN9ZRB.mjs} +1 -1
  76. package/system/dist/{device-ca-BUcHAAew.js → device-ca-b_fSvUlI.js} +1 -1
  77. package/system/dist/{dist-qO48FNMZ.js → dist-DDl6NKUe.js} +110 -82
  78. package/system/dist/{dist-C_cZ9rGK.mjs → dist-SXRVvbkS.mjs} +105 -77
  79. package/system/dist/{dns-wire-CHXO1qSl.js → dns-wire-B1BvF9Ao.js} +84 -13
  80. package/system/dist/{dns-wire-DcL6a0L-.mjs → dns-wire-Dm3H_7ST.mjs} +61 -14
  81. package/system/dist/file-host-worker.js +1 -1
  82. package/system/dist/file-host-worker.mjs +1 -1
  83. package/system/dist/{hub-mdns-ciao-DDmMPZCN.js → hub-mdns-ciao-95JXbLd5.js} +2 -2
  84. package/system/dist/{hub-mdns-ciao-9wPOmsXd.mjs → hub-mdns-ciao-euMLdIPi.mjs} +2 -2
  85. package/system/dist/index.d.ts +1 -0
  86. package/system/dist/index.js +46 -20
  87. package/system/dist/index.mjs +46 -21
  88. package/system/dist/kernel/addon-settings-store.d.ts +25 -0
  89. package/system/dist/kernel/device-settings-resolver.d.ts +27 -0
  90. package/system/dist/kernel/moleculer/runner-device-settings.d.ts +2 -0
  91. package/system/dist/kernel/settings-door-view.d.ts +5 -1
  92. package/system/dist/kernel/settings-view-types.d.ts +7 -1
  93. package/system/dist/migrations/hub/2026-11-02-addon-settings-node-id.d.ts +3 -0
  94. package/system/dist/migrations/hub/index.d.ts +3 -4
  95. package/system/dist/{restore-archive-Cravj5LG.js → restore-archive-CMkK7SeP.js} +1 -1
  96. package/system/dist/{restore-archive-BHVjOlza.mjs → restore-archive-DbtbDgPC.mjs} +1 -1
  97. package/system/dist/{retention-C_9dxCQn.mjs → retention-BGUmx4FD.mjs} +1 -1
  98. package/system/dist/{retention-B_eloRtb.js → retention-DI_dDceD.js} +1 -1
  99. package/system/dist/{wal-maintenance-CfKeIQAG.js → wal-maintenance-BaPMwUtL.js} +0 -0
  100. package/system/dist/{wal-maintenance-Dw7rplkv.mjs → wal-maintenance-CgHJ7XTw.mjs} +0 -0
  101. 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-B-vp7x15.mjs
1165
+ //#region ../types/dist/sleep-47MM9p3b.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).
@@ -3118,6 +3118,44 @@ var BaseAddon = class {
3118
3118
  return null;
3119
3119
  }
3120
3120
  /**
3121
+ * D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
3122
+ * provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
3123
+ * declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
3124
+ * {@link nodeSettingsSchema} and of {@link deviceDefaultsSchema} are disjoint, and a key never
3125
+ * contains `@` (guard `check-scoped-settings-declared`). SHAPE only: values are read by scope.
3126
+ */
3127
+ async clusterSettingsSchema(_cap) {
3128
+ return null;
3129
+ }
3130
+ /**
3131
+ * D986: the form shape of the settings one capability owns PER NODE, or `null`. Stored as
3132
+ * `addon-settings` rows `<addonId>.<field>@<nodeId>` carrying `nodeId` in the row data, so a
3133
+ * forgotten node's rows go in one central delete.
3134
+ */
3135
+ async nodeSettingsSchema(_cap) {
3136
+ return null;
3137
+ }
3138
+ /**
3139
+ * D986: the form shape of the FLEET DEFAULTS of the per-device settings one capability owns,
3140
+ * or `null`. Stored as `addon-settings` rows `<addonId>.<field>`; a device resolves its value
3141
+ * as device row, then this default, then the schema default (`resolveDeviceSettings`).
3142
+ */
3143
+ async deviceDefaultsSchema(_cap) {
3144
+ return null;
3145
+ }
3146
+ /**
3147
+ * The host's read of the scoped declarations: the schema one capability declares for `scope`,
3148
+ * or `null`. Beside {@link getIntegrationFormSchema}, the same shape: the hook is protected, the
3149
+ * host asks this method.
3150
+ */
3151
+ async getScopedSettingsSchema(scope, cap) {
3152
+ switch (scope) {
3153
+ case "cluster": return this.clusterSettingsSchema(cap);
3154
+ case "node": return this.nodeSettingsSchema(cap);
3155
+ case "device-defaults": return this.deviceDefaultsSchema(cap);
3156
+ }
3157
+ }
3158
+ /**
3121
3159
  * What the create wizard and the integration edit page render for one instance: the addon's
3122
3160
  * per-instance schema when it declares one, else its global schema (what they always showed).
3123
3161
  */
@@ -3912,6 +3950,17 @@ function normalizeAddonInitResult(result) {
3912
3950
  return result;
3913
3951
  }
3914
3952
  /**
3953
+ * The node id a node-scoped KEY carries: the part after the `@`. `null` for a key with no `@`
3954
+ * (a cluster or fleet-default key) or an empty node id. A schema key never contains `@`
3955
+ * (guard `check-scoped-settings-declared`), so the first `@` is the separator.
3956
+ */
3957
+ function nodeIdOfScopedKey(key) {
3958
+ const at = key.indexOf("@");
3959
+ if (at <= 0) return null;
3960
+ const nodeId = key.slice(at + 1);
3961
+ return nodeId === "" ? null : nodeId;
3962
+ }
3963
+ /**
3915
3964
  * Per-listener shared-secret header the hub injects on every reverse-proxied
3916
3965
  * data-plane request and the addon's framework wrapper validates — so only the
3917
3966
  * hub can reach the addon's `127.0.0.1` listener. Defined here (shared by the
@@ -5015,6 +5064,60 @@ var ProfileRtspEntrySchema = z.object({
5015
5064
  codec: z.string().optional(),
5016
5065
  resolution: CamStreamResolutionSchema.optional()
5017
5066
  });
5067
+ /** Every debug channel's name starts with this; the ring denies it by default. */
5068
+ var DEBUG_CHANNEL_PREFIX = "debug.";
5069
+ function isDebugChannelName(name) {
5070
+ return name.startsWith(DEBUG_CHANNEL_PREFIX);
5071
+ }
5072
+ /**
5073
+ * Who is watching what, in THIS process. In-memory, moved off the log path.
5074
+ *
5075
+ * `active` is a plain boolean FIELD, read first: with no watch anywhere, a
5076
+ * `ctx.debug` call is one load and one branch.
5077
+ */
5078
+ var DebugInterest = class {
5079
+ active = false;
5080
+ windows = /* @__PURE__ */ new Map();
5081
+ /**
5082
+ * Replace the interest with the FULL set of windows. Non-debug windows are
5083
+ * ignored and an absent one is dropped, so a lost disarm cannot leave a
5084
+ * channel running.
5085
+ */
5086
+ apply(windows, nowMs) {
5087
+ this.windows.clear();
5088
+ for (const window of windows) {
5089
+ if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
5090
+ const ids = window.deviceIds;
5091
+ this.windows.set(window.channel, {
5092
+ untilMs: window.armedUntilMs,
5093
+ devices: ids === null || ids.length === 0 ? null : new Set(ids)
5094
+ });
5095
+ }
5096
+ this.active = this.windows.size > 0;
5097
+ }
5098
+ /** Drop what has lapsed. Called on a timer, never from a log path. */
5099
+ tick(nowMs) {
5100
+ const closed = [];
5101
+ for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
5102
+ this.windows.delete(name);
5103
+ closed.push(name);
5104
+ }
5105
+ this.active = this.windows.size > 0;
5106
+ return closed;
5107
+ }
5108
+ /** `channel` is the full name, `debug.<channel>`. */
5109
+ wants(channel, deviceId) {
5110
+ if (!this.active) return false;
5111
+ const window = this.windows.get(channel);
5112
+ if (window === void 0) return false;
5113
+ return window.devices === null || window.devices.has(deviceId);
5114
+ }
5115
+ };
5116
+ var interestInstance = null;
5117
+ function getDebugInterest() {
5118
+ interestInstance ??= new DebugInterest();
5119
+ return interestInstance;
5120
+ }
5018
5121
  var ReadinessTimeoutError = class extends Error {
5019
5122
  capName;
5020
5123
  scope;
@@ -14160,81 +14263,6 @@ var StorageLocationDeclarationSchema = z.object({
14160
14263
  "backup"
14161
14264
  ]).optional()
14162
14265
  });
14163
- /** Every debug channel's name starts with this; the ring denies it by default. */
14164
- var DEBUG_CHANNEL_PREFIX = "debug.";
14165
- function isDebugChannelName(name) {
14166
- return name.startsWith(DEBUG_CHANNEL_PREFIX);
14167
- }
14168
- /**
14169
- * Who is watching what, in THIS process. In-memory, moved off the log path.
14170
- *
14171
- * `active` is a plain boolean FIELD, read first: with no watch anywhere, a
14172
- * `ctx.debug` call is one load and one branch.
14173
- */
14174
- var DebugInterest = class {
14175
- active = false;
14176
- windows = /* @__PURE__ */ new Map();
14177
- /**
14178
- * Replace the interest with the FULL set of windows. Non-debug windows are
14179
- * ignored and an absent one is dropped, so a lost disarm cannot leave a
14180
- * channel running.
14181
- */
14182
- apply(windows, nowMs) {
14183
- this.windows.clear();
14184
- for (const window of windows) {
14185
- if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
14186
- const ids = window.deviceIds;
14187
- this.windows.set(window.channel, {
14188
- untilMs: window.armedUntilMs,
14189
- devices: ids === null || ids.length === 0 ? null : new Set(ids)
14190
- });
14191
- }
14192
- this.active = this.windows.size > 0;
14193
- }
14194
- /** Drop what has lapsed. Called on a timer, never from a log path. */
14195
- tick(nowMs) {
14196
- const closed = [];
14197
- for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
14198
- this.windows.delete(name);
14199
- closed.push(name);
14200
- }
14201
- this.active = this.windows.size > 0;
14202
- return closed;
14203
- }
14204
- /** `channel` is the full name, `debug.<channel>`. */
14205
- wants(channel, deviceId) {
14206
- if (!this.active) return false;
14207
- const window = this.windows.get(channel);
14208
- if (window === void 0) return false;
14209
- return window.devices === null || window.devices.has(deviceId);
14210
- }
14211
- };
14212
- var interestInstance = null;
14213
- function getDebugInterest() {
14214
- interestInstance ??= new DebugInterest();
14215
- return interestInstance;
14216
- }
14217
- /**
14218
- * Build `ctx.debug`. The thunk runs ONLY when somebody watches this
14219
- * (channel, device) pair, and the line carries `tags: { deviceId }` plus the
14220
- * `debug.<channel>` name as `logChannel`.
14221
- */
14222
- function createDebugEmitter(logger, interest = getDebugInterest()) {
14223
- return (channel, deviceId, thunk) => {
14224
- if (!interest.active) return;
14225
- const name = `${DEBUG_CHANNEL_PREFIX}${channel}`;
14226
- if (!interest.wants(name, deviceId)) return;
14227
- const line = thunk();
14228
- const tags = {
14229
- deviceId,
14230
- logChannel: name
14231
- };
14232
- logger.info(line.message, line.meta === void 0 ? { tags } : {
14233
- tags,
14234
- meta: line.meta
14235
- });
14236
- };
14237
- }
14238
14266
  /**
14239
14267
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
14240
14268
  * an addon declares its channels in.
@@ -109350,4 +109378,4 @@ z.object({
109350
109378
  commands: z.record(z.string(), z.unknown())
109351
109379
  });
109352
109380
  //#endregion
109353
- export { EMPTY_REMOTE_CONFIG as $, disarmRoseMemory as $a, schedulersCapability as $i, deviceCredentialsCapability as $n, buildSecretRef as $o, logDestinationCapability as $r, UserRecordSchema as $t, CredentialTokenClaimsSchema as A, vectorDimFromBase64 as Aa, problemsBlockSave as Ai, collectWhenMirrorSources as An, RECORD_SECRET_COLLECTION_PREFIX as Ao, isAlertEpisodeOpen as Ar, parseSecretRef as As, PreferenceValueSchema as At, DEVICE_ID_FIELD as B, HISTORY_FAST_MS as Ba, resolveAppConnections as Bi, coverCapability as Bn, RecordUniqueViolationError as Bo, isObjectInput as Br, toSecretFieldView as Bs, SchedulerError as Bt, CORE_BLOCK_ADDON_PREFIX as C, timedRunLimitOf as Ca, parseStreamParamsFormPatch as Ci, cameraGridLayoutCapability as Cn, HISTORY_DEFAULT_MIN_INTERVAL_MS as Co, formatMinutes as Cr, makeSecretMarker as Cs, MediaPlayerStatusSchema as Ct, ConditionMirror as D, validateCustomAddress as Da, powerSourceCapability as Di, checkRoleAddress as Dn, RECORD_BATCH_MAX as Do, groupTemplate as Dr, normalizeSecretOwner as Ds, PREFERENCES_MAX_VALUE_BYTES as Dt, CatalogFileSchema as E, validateComposition as Ea, platformProbeCapability as Ei, catalogueIssues as En, PlaintextSecretError as Eo, groupCommandsCapability as Er, normalizeNodeId as Es, NetworkTunnelStartedDataSchema as Et, DAY_NAMES as F, withLocationMode as Fa, reducePoints as Fi, coreBlockAddonId as Fn, ReadinessRegistry as Fo, isCredentialTokenPayload as Fr, scopeKey as Fs, RemoteAssumedStateSchema as Ft, DataStoreDatabaseSchema as G, cloneStatefulExpressionMemory as Ga, resolveLocationMode as Gi, dataStoreProviderCapability as Gn, UnindexedFilterError as Go, legacyAutoLinkIds as Gr, DeviceRole as Gs, StorageCleanupJobSchema as Gt, DEVICE_SAN_CREDENTIAL_PREFIX as H, HOUR_MS as Ha, resolveCoreBlockEntry as Hi, createDeviceExtensionProvider as Hn, SECRET_CLEAR as Ho, kebabToCamel as Hr, userError as Hs, ScopedTokenSchema as Ht, DEFAULT_HOLD_OVERRIDE as I, zoneOnlySite as Ia, remoteCapability as Ii, coreBlockComposition as In, ReadinessTimeoutError as Io, isDebugChannelName as Ir, secretTreeFromPaths as Is, RemoteConfigSchema as It, DeviceStatusSchema as J, compositionFeatureEnabled as Ja, resolveNotificationTapAddress as Ji, declaredSeriesKind as Jn, asJsonObject as Jo, localDateOf as Jr, EventCategory as Js, StorageMigrationJobSchema as Jt, DeclaredDevices as K, composedDeviceRef as Ka, resolveMethodAuth as Ki, databaseSnapshotCapability as Kn, UnknownRecordKindError as Ko, legacyModeOf as Kr, DeviceType as Ks, StorageLocationModeSchema as Kt, DERIVED_CAMERA_SILENCED_CAP_NAMES as L, COMPOSER_ADDON_ID as La, remoteLayoutComponentsCapability as Li, coreBlockIdFromAddonId as Ln, RecordKindDeclarationSchema as Lo, isDefaultAppConnectionEndpoint as Lr, secretTreeFromSchema as Ls, RunningStateStatusSchema as Lt, DATABASE_SNAPSHOT_SUFFIX as M, vectorStoreCapability as Ma, ptzAutotrackCapability as Mi, composerCapability as Mn, REDACTED_SECRET as Mo, isAppLinkBase as Mr, recordSecretRef as Ms, RECORDING_SOURCE_CAMSTACK_ADDON as Mt, DATABASE_SNAPSHOT_TIMEOUT_MS as N, vocabActionIdFor as Na, recordEntriesCapability as Ni, compositionFieldKey as Nn, REMOVE_LEAF as No, isArrayOutputSchema as Nr, resolveCapMount as Ns, ROOT_BUCKET_KEY as Nt, ControlStatusSchema as O, validateSchedulerInput as Oa, powerSourceLinkOfComposition as Oi, checkTemplatePayload as On, RECORD_BATCH_MAX_BYTES as Oo, internalActionId as Or, parseJsonObject as Os, PreferenceDeviceIdSchema as Ot, DATA_STORE_DATABASES as P, weekdayOfLocalDate as Pa, recordsCapability as Pi, compositionSourceRefs as Pn, RUNTIME_DEFAULTS as Po, isCollectionArrayMethod as Pr, resolveSecretMarkers as Ps, RecordingStatusSchema as Pt, EMPTY_REMOTE_ASSUMED_STATE as Q, createStatefulExpressionMemory as Qa, runtimeStatePolicyFor as Qi, describeComposableCaps as Qn, assertValidDeclaration as Qo, lockDoorLinkOfComposition as Qr, UNATTRIBUTED_BUCKET_KEY as Qt, DEVICE_ENROLLMENT_TTL_MS as R, DAY_MS as Ra, replacedFieldKeys as Ri, coreBlockSourceKind as Rn, RecordNotFoundError as Ro, isInternalActionId as Rr, sleep as Rs, STORAGE_ACCESS_FALLBACK as Rt, CORE_BLOCKS_ADDON_ID as S, timedRunCapability as Sa, parseColorInput as Si, calendarsCapability as Sn, ForeignSecretMarkerError as So, formatDeviceRevoker as Sr, isSecretRefOwnedBy as Ss, MOTION_CLOSE_AFTER_MS as St, CalendarPreferencesSchema as T, userManagementCapability as Ta, planComposition as Ti, capUnitResolver as Tn, NoCallerError as To, getDebugInterest as Tr, nodePin as Ts, MigrationMetaSchema as Tt, DEVICE_SAN_USER_PREFIX as U, MINUTE_MS as Ua, resolveCoreBlockFiles as Ui, customKeyOfRole as Un, StoredRecordKindDeclarationSchema as Uo, keychainAdminCapability as Ur, withoutCallerStamp as Us, ServerNameSchema as Ut, DEVICE_NONCE_TTL_MS as V, HISTORY_SLOW_MS as Va, resolveBucketMs as Vi, createDebugEmitter as Vn, RevConflictError as Vo, isVoidInput as Vr, transformSecretWrite as Vs, SchedulerSchema as Vt, DEVICE_TOMBSTONE_RETENTION_MS as W, buildFfmpegArgs as Wa, resolveHubAddressRoles as Wi, customRole as Wn, TransactRefusedError as Wo, keychainCapability as Wr, DeviceFeature as Ws, SsoBridgeClaimsSchema as Wt, DiscoveryProposalBodySchema as X, compositionSliceKey as Xa, runFanOut as Xi, defineExtensionSlotProvider as Xn, asString$1 as Xo, locationIconKey as Xr, TemplateKindSchema as Xt, DeviceTombstoneSchema as Y, compositionItemFieldPath as Ya, resolveStepArgs as Yi, decodeVectorBase64 as Yn, asNumber as Yo, localNetworkCapability as Yr, SwitchStatusSchema as Yt, EMPTY_AUTOMATION_STATE as Z, compositionSourceKey as Za, runSteps as Zi, deriveBatteryPresence as Zn, assertTransactScope as Zo, lockControlCapability as Zr, TokenScopeSchema as Zt, CAMSTACK_APP_LINK_ORIGIN as _, streamCatalogCapability as _a, objectInputDeclaresAddonId as _i, buildActionSteps as _n, DATAPLANE_SECRET_HEADER as _o, fanOutTargets as _r, isKeychainStoredField as _s, KeychainResetRecordSchema as _t, AGENT_MDNS_TXT_KEYS as a, sharedActuatorMethods as aa, memoizePinnedFfmpeg as ai, addonSettingsCapability as an, isHistoryHelper as ao, deviceStateCapability as ar, customAction as as, FieldClaimModeSchema as at, COMPOSED_ITEM_FIXED_FIELDS as b, switchCapability as ba, orderMigrations as bi, buildDeviceSignatureMessage as bn, DeclarationRefusedError as bo, filesystemBrowseCapability as br, isSecretMarker as bs, METHOD_ACCESS_MAP as bt, ActionStepSchema as c, siteFor as ca, migrationsCapability as ci, alertEpisodePayload as cn, openStatistic as co, enumerateItemArrayFields as cr, emitDownForOwnedCaps as cs, HISTORY_CATALOG as ct, AlertSchema as d, splitTranslationRef as da, nextOccurrence as di, armRemovalReconcile as dn, statisticCadenceMs as do, evaluateWhenTree as dr, formatSecretScope as ds, HUB_MDNS_TXT_KEYS as dt, scopesAllowAddon as ea, logLevelAtMost as ei, actionEffect as en, evaluateDerivative as eo, deviceExtensionCapability as er, collectSecretConfigKeys as es, FAN_CAPTURE_FIELDS as et, AutomationStateDocSchema as f, storageAdminCapability as fa, normalizeActionUnits as fi, authProviderCapability as fn, toExpressionValue as fo, evictionPolicyOfLocation as fr, historyItemFieldPath as fs, HvacModeSchema as ft, CAMERA_SWITCH_ORDER as g, storageProviderCapability as ga, normalizeUnit as gi, brightnessCapability as gn, CALLER_STAMPED_CAPABILITIES as go, fanControlCapability as gr, isEvent as gs, KeychainAuditEntrySchema as gt, BatteryStatusSchema as h, storageOccupancyCapability as ha, normalizeStepTargets as hi, batteryCapability as hn, BatchTooLargeError as ho, extractNestedAddonId as hr, isDeviceConfigCap as hs, KEYCHAIN_RESET_TRIGGER_ACTOR as ht, AGENT_MDNS_SERVICE_TYPE as i, sharedActuatorFeatures as ia, mediaPlayerCapability as ii, addonPagesCapability as in, isForwardInputRef as io, deviceRunsCapability as ir, createEvent as is, FanPresetSchema as it, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as j, vectorIndexDimConflictError as ja, procedureAuthKey as ji, colorCapability as jn, RECORD_SWEEP_INTERVAL_MS as jo, isAlertEpisodeSeverity as jr, readinessKey as js, QuantityUnitError as jt, CoreBlockSchema as k, valveCapability as ka, preconditionOf as ki, climateControlCapability as kn, RECORD_DELETE_BATCH as ko, interpolate as kr, parseJsonUnknown as ks, PreferenceNamespaceSchema as kt, ActionTargetResolver as l, siteZoneKey as la, modeMayWrite as li, alertsCapability as ln, planResetTier as lo, enumerateSchemaFields as lr, emitReadiness as ls, HISTORY_ITEM_CATALOG as lt, BaseDevice as m, storageMigrationCapability as ma, normalizeCoreBlockWrite as mi, bareAddonId as mn, BaseAddon as mo, expressionContainsBuiltinCall as mr, hydrateSchema as ms, INTERNAL_ACTION_PREFIX as mt, ACTUATOR_METHODS as n, scoreRuntimes as na, mayReadLocation as ni, actionsCapability as nn, helperMembers as no, deviceManagerCapability as nr, collectSecretMarkerRefs as ns, FanControlStatusSchema as nt, ALL_CAPABILITY_DEFINITIONS as o, sharedColorModes as oa, methodRefusal as oi, addonWidgetsCapability as on, nextLocalMidnight as oo, deviceStatusCapability as or, defineCustomActions as os, FieldClaimSchema as ot, BUILTIN_REMOTE_COMPONENTS as p, storageCapability as pa, normalizeCapStep as pi, backupCapability as pn, wattMillisecondsToKwh as po, expandContainer as pr, historyUnitFor as ps, IDLE_ACTION_STATUS as pt, DeviceRunSchema as q, composedDeviceStableId as qa, resolveMutate as qi, declarationOwnerNodeId as qn, WELL_KNOWN_TAB_MAP as qo, lifecycleJobSchema as qr, errMsg as qs, StorageLocationTypeSchema as qt, ACTUATOR_TEMPLATE_IDS as r, settingsStoreCapability as ra, mayWriteToLocation as ri, addonIdOfActionId as rn, integrateReading as ro, deviceRemovalHookCapability as rr, collectZodSecretPaths as rs, FanDirectionSchema as rt, ActionError as s, shortHostname as sa, metricsProviderCapability as si, alertEpisodeId as sn, openReset as so, enumerateInferenceDevices as sr, defineRecordKinds as ss, GroupCommandResultSchema as st, ACTION_TARGET_INVALIDATION_EVENTS as t, scopesAllowDeviceCap as ta, looseSchema as ti, actionSourceCapability as tn, evaluateStatistic as to, deviceHistoryCapability as tr, collectSecretLeaves as ts, FIRST_LEVEL_MACRO_CLASSES as tt, ActionVariableSchema as u, snapshotCapability as ua, motionCapability as ui, appendTrace as un, planStatisticTier as uo, evaluateCompositionField as ur, expandCapMethods as us, HUB_MDNS_SERVICE_TYPE as ut, CAP_NAMES_WITH_STATUS as v, streamQualityLabel as va, objectInputDeclaresRequiredDeviceId as vi, buildCapabilityLookup as vn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as vo, fanPresetsCapability as vr, isReadingQuantity as vs, LOG_LEVEL_RANK as vt, CREDENTIAL_TOKEN_AUDIENCE as w, timedRunSeconds as wa, pickAppLinkHub as wi, canonicalIconKey as wn, InvalidRecordError as wo, gbToBytes as wr, mapSecretLeaves as ws, MigrationLedgerEntrySchema as wt, COMPOSER_RUNNER_ID as x, templateCapability as xa, parseAcceleratorFactsJson as xi, buildStreamParamsConfigSchema as xn, FilterRequiredError as xo, foldSnapshotByFunction as xr, isSecretMarkerLike as xs, MINUTES_PER_DAY as xt, CATALOG_LANGS as y, supportedRuntimes as ya, occurrenceOn as yi, buildDeviceEnrollmentLink as yn, DEVICE_STATUS_METHOD as yo, featureForwards as yr, isSecretClear as ys, LegacyStorageLocationDefaultSchema as yt, DEVICE_HISTORY_ENERGY_KEY as z, DEFAULT_HISTORY_RETENTION as za, resolveActionVariables as zi, coreBlocksCapability as zn, RecordTooLargeError as zo, isLocationEnabled as zr, toNodeId as zs, STREAM_PROFILE_META as zt };
109381
+ 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, parseSecretRef 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, toSecretFieldView 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, normalizeSecretOwner 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, normalizeNodeId 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, scopeKey as Fs, RemoteAssumedStateSchema as Ft, DataStoreDatabaseSchema as G, compositionFeatureEnabled as Ga, resolveNotificationTapAddress as Gi, databaseSnapshotCapability as Gn, asJsonObject as Go, localDateOf as Gr, DeviceRole 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, userError 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, secretTreeFromPaths as Is, RemoteConfigSchema as It, DeviceStatusSchema as J, compositionSourceKey as Ja, runSteps as Ji, decodeVectorBase64 as Jn, assertTransactScope as Jo, lockControlCapability as Jr, EventCategory as Js, StorageMigrationJobSchema as Jt, DeclaredDevices as K, compositionItemFieldPath as Ka, resolveStepArgs as Ki, declarationOwnerNodeId as Kn, asNumber as Ko, localNetworkCapability as Kr, DeviceType 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, secretTreeFromSchema 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, recordSecretRef 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, resolveCapMount 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, parseJsonObject 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, resolveSecretMarkers 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, sleep 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, nodePin 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, withoutCallerStamp 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, transformSecretWrite 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, DeviceFeature 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, readinessKey as js, QuantityUnitError as jt, CoreBlockSchema as k, vectorStoreCapability as ka, ptzAutotrackCapability as ki, climateControlCapability as kn, REDACTED_SECRET as ko, isAlertEpisodeSeverity as kr, parseJsonUnknown 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, errMsg 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, nodeIdOfScopedKey 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, toNodeId as zs, STREAM_PROFILE_META as zt };
@@ -5,6 +5,8 @@
5
5
  */
6
6
  /** Top bit of the question class: ask for a unicast reply (RFC 6762). */
7
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;
8
10
  var A = 1;
9
11
  var PTR = 12;
10
12
  var TXT = 16;
@@ -86,15 +88,16 @@ function parseTxt(buf, offset, length) {
86
88
  }
87
89
  return out;
88
90
  }
89
- /** One PTR question per service type, all with the unicast-reply bit. */
90
- function buildPtrQuery(serviceTypes) {
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;
91
94
  const header = Buffer.alloc(12);
92
95
  header.writeUInt16BE(serviceTypes.length, 4);
93
96
  const questions = serviceTypes.map((type) => {
94
97
  const encoded = `${normalizeServiceType(type)}.local`.split(".").filter((part) => part.length > 0).map((l) => Buffer.concat([Buffer.from([l.length]), Buffer.from(l)]));
95
98
  const tail = Buffer.alloc(4);
96
99
  tail.writeUInt16BE(PTR, 0);
97
- tail.writeUInt16BE(MDNS_QU_CLASS, 2);
100
+ tail.writeUInt16BE(questionClass, 2);
98
101
  return Buffer.concat([
99
102
  ...encoded,
100
103
  Buffer.from([0]),
@@ -103,9 +106,51 @@ function buildPtrQuery(serviceTypes) {
103
106
  });
104
107
  return Buffer.concat([header, ...questions]);
105
108
  }
106
- /** The services advertised on one mDNS message; a malformed packet yields none. */
107
- function parseMdnsMessage(buf) {
108
- if (buf.length < 12) return [];
109
+ var QUESTION_TYPE_CODE = {
110
+ SRV,
111
+ TXT,
112
+ A
113
+ };
114
+ /** A QM (or QU when `unicastResponse`) question per record, for the follow-up that resolves an instance. */
115
+ function buildRecordQuery(questions, options = {}) {
116
+ const questionClass = options.unicastResponse === true ? MDNS_QU_CLASS : MDNS_QM_CLASS;
117
+ const header = Buffer.alloc(12);
118
+ header.writeUInt16BE(questions.length, 4);
119
+ const encoded = questions.map((q) => {
120
+ const parts = q.name.split(".").filter((part) => part.length > 0).map((l) => {
121
+ const bytes = Buffer.from(l);
122
+ return Buffer.concat([Buffer.from([bytes.length]), bytes]);
123
+ });
124
+ const tail = Buffer.alloc(4);
125
+ tail.writeUInt16BE(QUESTION_TYPE_CODE[q.type], 0);
126
+ tail.writeUInt16BE(questionClass, 2);
127
+ return Buffer.concat([
128
+ ...parts,
129
+ Buffer.from([0]),
130
+ tail
131
+ ]);
132
+ });
133
+ return Buffer.concat([header, ...encoded]);
134
+ }
135
+ function emptyMdnsRecords() {
136
+ return {
137
+ ptrs: [],
138
+ srv: /* @__PURE__ */ new Map(),
139
+ txt: /* @__PURE__ */ new Map(),
140
+ addresses: /* @__PURE__ */ new Map()
141
+ };
142
+ }
143
+ /** Fold the records of one message into `into`: an answer may arrive in any packet (a reflector forwards them). */
144
+ function mergeMdnsRecords(into, from) {
145
+ for (const ptr of from.ptrs) if (!into.ptrs.some((p) => p.instance === ptr.instance && p.serviceType === ptr.serviceType)) into.ptrs.push(ptr);
146
+ for (const [k, v] of from.srv) into.srv.set(k, v);
147
+ for (const [k, v] of from.txt) into.txt.set(k, v);
148
+ for (const [k, v] of from.addresses) into.addresses.set(k, v);
149
+ }
150
+ /** Every PTR/SRV/TXT/A record of one mDNS message; a malformed packet yields none. */
151
+ function parseMdnsRecords(buf) {
152
+ const out = emptyMdnsRecords();
153
+ if (buf.length < 12) return out;
109
154
  const [questions = 0, answers = 0, authorities = 0, extra = 0] = [
110
155
  4,
111
156
  6,
@@ -115,9 +160,9 @@ function parseMdnsMessage(buf) {
115
160
  let pos = 12;
116
161
  for (let i = 0; i < questions; i++) {
117
162
  const name = readName(buf, pos);
118
- if (name === null) return [];
163
+ if (name === null) return out;
119
164
  pos = name.end + 4;
120
- if (pos > buf.length) return [];
165
+ if (pos > buf.length) return out;
121
166
  }
122
167
  const records = [];
123
168
  for (const count of [
@@ -126,14 +171,11 @@ function parseMdnsMessage(buf) {
126
171
  extra
127
172
  ]) {
128
173
  const read = readRecords(buf, pos, count);
129
- if (read === null) return [];
174
+ if (read === null) return out;
130
175
  records.push(...read.records);
131
176
  pos = read.next;
132
177
  }
133
- const ptrs = [];
134
- const srv = /* @__PURE__ */ new Map();
135
- const txt = /* @__PURE__ */ new Map();
136
- const addresses = /* @__PURE__ */ new Map();
178
+ const { ptrs, srv, txt, addresses } = out;
137
179
  for (const rec of records) {
138
180
  const key = rec.name.toLowerCase();
139
181
  if (rec.type === PTR) {
@@ -151,6 +193,11 @@ function parseMdnsMessage(buf) {
151
193
  } else if (rec.type === TXT) txt.set(key, parseTxt(buf, rec.dataOffset, rec.dataLength));
152
194
  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]}`);
153
195
  }
196
+ return out;
197
+ }
198
+ /** The services advertised on one mDNS message; a malformed packet yields none. */
199
+ function parseMdnsMessage(buf) {
200
+ const { ptrs, srv, txt, addresses } = parseMdnsRecords(buf);
154
201
  const out = [];
155
202
  for (const { serviceType, instance } of ptrs) {
156
203
  const service = srv.get(instance.toLowerCase());
@@ -185,6 +232,24 @@ Object.defineProperty(exports, "buildPtrQuery", {
185
232
  return buildPtrQuery;
186
233
  }
187
234
  });
235
+ Object.defineProperty(exports, "buildRecordQuery", {
236
+ enumerable: true,
237
+ get: function() {
238
+ return buildRecordQuery;
239
+ }
240
+ });
241
+ Object.defineProperty(exports, "emptyMdnsRecords", {
242
+ enumerable: true,
243
+ get: function() {
244
+ return emptyMdnsRecords;
245
+ }
246
+ });
247
+ Object.defineProperty(exports, "mergeMdnsRecords", {
248
+ enumerable: true,
249
+ get: function() {
250
+ return mergeMdnsRecords;
251
+ }
252
+ });
188
253
  Object.defineProperty(exports, "normalizeServiceType", {
189
254
  enumerable: true,
190
255
  get: function() {
@@ -197,3 +262,9 @@ Object.defineProperty(exports, "parseMdnsMessage", {
197
262
  return parseMdnsMessage;
198
263
  }
199
264
  });
265
+ Object.defineProperty(exports, "parseMdnsRecords", {
266
+ enumerable: true,
267
+ get: function() {
268
+ return parseMdnsRecords;
269
+ }
270
+ });
@@ -5,6 +5,8 @@
5
5
  */
6
6
  /** Top bit of the question class: ask for a unicast reply (RFC 6762). */
7
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;
8
10
  var A = 1;
9
11
  var PTR = 12;
10
12
  var TXT = 16;
@@ -86,15 +88,16 @@ function parseTxt(buf, offset, length) {
86
88
  }
87
89
  return out;
88
90
  }
89
- /** One PTR question per service type, all with the unicast-reply bit. */
90
- function buildPtrQuery(serviceTypes) {
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;
91
94
  const header = Buffer.alloc(12);
92
95
  header.writeUInt16BE(serviceTypes.length, 4);
93
96
  const questions = serviceTypes.map((type) => {
94
97
  const encoded = `${normalizeServiceType(type)}.local`.split(".").filter((part) => part.length > 0).map((l) => Buffer.concat([Buffer.from([l.length]), Buffer.from(l)]));
95
98
  const tail = Buffer.alloc(4);
96
99
  tail.writeUInt16BE(PTR, 0);
97
- tail.writeUInt16BE(MDNS_QU_CLASS, 2);
100
+ tail.writeUInt16BE(questionClass, 2);
98
101
  return Buffer.concat([
99
102
  ...encoded,
100
103
  Buffer.from([0]),
@@ -103,9 +106,51 @@ function buildPtrQuery(serviceTypes) {
103
106
  });
104
107
  return Buffer.concat([header, ...questions]);
105
108
  }
106
- /** The services advertised on one mDNS message; a malformed packet yields none. */
107
- function parseMdnsMessage(buf) {
108
- if (buf.length < 12) return [];
109
+ var QUESTION_TYPE_CODE = {
110
+ SRV,
111
+ TXT,
112
+ A
113
+ };
114
+ /** A QM (or QU when `unicastResponse`) question per record, for the follow-up that resolves an instance. */
115
+ function buildRecordQuery(questions, options = {}) {
116
+ const questionClass = options.unicastResponse === true ? MDNS_QU_CLASS : MDNS_QM_CLASS;
117
+ const header = Buffer.alloc(12);
118
+ header.writeUInt16BE(questions.length, 4);
119
+ const encoded = questions.map((q) => {
120
+ const parts = q.name.split(".").filter((part) => part.length > 0).map((l) => {
121
+ const bytes = Buffer.from(l);
122
+ return Buffer.concat([Buffer.from([bytes.length]), bytes]);
123
+ });
124
+ const tail = Buffer.alloc(4);
125
+ tail.writeUInt16BE(QUESTION_TYPE_CODE[q.type], 0);
126
+ tail.writeUInt16BE(questionClass, 2);
127
+ return Buffer.concat([
128
+ ...parts,
129
+ Buffer.from([0]),
130
+ tail
131
+ ]);
132
+ });
133
+ return Buffer.concat([header, ...encoded]);
134
+ }
135
+ function emptyMdnsRecords() {
136
+ return {
137
+ ptrs: [],
138
+ srv: /* @__PURE__ */ new Map(),
139
+ txt: /* @__PURE__ */ new Map(),
140
+ addresses: /* @__PURE__ */ new Map()
141
+ };
142
+ }
143
+ /** Fold the records of one message into `into`: an answer may arrive in any packet (a reflector forwards them). */
144
+ function mergeMdnsRecords(into, from) {
145
+ for (const ptr of from.ptrs) if (!into.ptrs.some((p) => p.instance === ptr.instance && p.serviceType === ptr.serviceType)) into.ptrs.push(ptr);
146
+ for (const [k, v] of from.srv) into.srv.set(k, v);
147
+ for (const [k, v] of from.txt) into.txt.set(k, v);
148
+ for (const [k, v] of from.addresses) into.addresses.set(k, v);
149
+ }
150
+ /** Every PTR/SRV/TXT/A record of one mDNS message; a malformed packet yields none. */
151
+ function parseMdnsRecords(buf) {
152
+ const out = emptyMdnsRecords();
153
+ if (buf.length < 12) return out;
109
154
  const [questions = 0, answers = 0, authorities = 0, extra = 0] = [
110
155
  4,
111
156
  6,
@@ -115,9 +160,9 @@ function parseMdnsMessage(buf) {
115
160
  let pos = 12;
116
161
  for (let i = 0; i < questions; i++) {
117
162
  const name = readName(buf, pos);
118
- if (name === null) return [];
163
+ if (name === null) return out;
119
164
  pos = name.end + 4;
120
- if (pos > buf.length) return [];
165
+ if (pos > buf.length) return out;
121
166
  }
122
167
  const records = [];
123
168
  for (const count of [
@@ -126,14 +171,11 @@ function parseMdnsMessage(buf) {
126
171
  extra
127
172
  ]) {
128
173
  const read = readRecords(buf, pos, count);
129
- if (read === null) return [];
174
+ if (read === null) return out;
130
175
  records.push(...read.records);
131
176
  pos = read.next;
132
177
  }
133
- const ptrs = [];
134
- const srv = /* @__PURE__ */ new Map();
135
- const txt = /* @__PURE__ */ new Map();
136
- const addresses = /* @__PURE__ */ new Map();
178
+ const { ptrs, srv, txt, addresses } = out;
137
179
  for (const rec of records) {
138
180
  const key = rec.name.toLowerCase();
139
181
  if (rec.type === PTR) {
@@ -151,6 +193,11 @@ function parseMdnsMessage(buf) {
151
193
  } else if (rec.type === TXT) txt.set(key, parseTxt(buf, rec.dataOffset, rec.dataLength));
152
194
  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]}`);
153
195
  }
196
+ return out;
197
+ }
198
+ /** The services advertised on one mDNS message; a malformed packet yields none. */
199
+ function parseMdnsMessage(buf) {
200
+ const { ptrs, srv, txt, addresses } = parseMdnsRecords(buf);
154
201
  const out = [];
155
202
  for (const { serviceType, instance } of ptrs) {
156
203
  const service = srv.get(instance.toLowerCase());
@@ -167,4 +214,4 @@ function parseMdnsMessage(buf) {
167
214
  return out;
168
215
  }
169
216
  //#endregion
170
- export { parseMdnsMessage as a, normalizeServiceType as i, MDNS_PORT as n, buildPtrQuery as r, MDNS_GROUP as t };
217
+ export { emptyMdnsRecords as a, parseMdnsMessage as c, buildRecordQuery as i, parseMdnsRecords as l, MDNS_PORT as n, mergeMdnsRecords as o, buildPtrQuery as r, normalizeServiceType as s, MDNS_GROUP as t };
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-CfKeIQAG.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-BaPMwUtL.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-Dw7rplkv.mjs";
1
+ import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-CgHJ7XTw.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-qO48FNMZ.js");
2
+ const require_dist = require("./dist-DDl6NKUe.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
- const require_agent_https = require("./agent-https-DKMO-__h.js");
4
+ const require_agent_https = require("./agent-https-DEmi-YQ_.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { Hs as userError } from "./dist-C_cZ9rGK.mjs";
2
+ import { Hs as userError } from "./dist-SXRVvbkS.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
4
- import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-CDtAIEne.mjs";
4
+ import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-DGp4gFzH.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { mkdir, writeFile } from "node:fs/promises";
@@ -141,6 +141,7 @@ export type { ClusterNodeHistoryBody, ClusterNodeTombstoneBody } from "./builtin
141
141
  export { storageOrchestratorRecordKinds, STORAGE_DRAIN_STATE_LEGACY } from "./builtins/storage-orchestrator/record-kinds.js";
142
142
  export { backupOrchestratorRecordKinds, backupRecordStoresOf, type BackupRecordStores } from "./builtins/backup-orchestrator/record-kinds.js";
143
143
  export { readAllRows } from "./records/read-all-rows.js";
144
+ export { clearNodeSettings } from "./kernel/addon-settings-store.js";
144
145
  export { RecordsEngine, type RecordsEngineOptions } from "./builtins/sqlite-storage/records/records-engine.js";
145
146
  export { type EnsureAddonNativePrebuildsOptions, ensureAddonNativePrebuilds, type NativeEnsureOutcome, type NativeEnsureResult } from "./kernel/deps/ensure-addon-natives.js";
146
147
  export { type EnsureNativePrebuildsOptions, ensureNativePrebuilds, hasDotNode, NATIVE_SCAN_DEPTH, type PrebuildFetchFn, type PrebuildTarget, TRADITIONAL_NATIVE_PACKAGES } from "./kernel/deps/ensure-native-prebuilds.js";