@camstack/server 1.2.922 → 1.2.924
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/package.json +17 -15
- package/system/dist/addon-utils.mjs +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 +3 -3
- 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 +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- 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 +4 -4
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -4
- 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 +104 -21
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +104 -21
- package/system/dist/builtins/device-manager/state-refresh-scheduler.d.ts +34 -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 +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- 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.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- 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 +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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/{capture-engine-BrJrd7NK.js → capture-engine-C5SdmaKz.js} +1 -1
- package/system/dist/{capture-engine-BgTJUDGZ.mjs → capture-engine-DWria-z2.mjs} +1 -1
- package/system/dist/{composition-sources-5pex0zor.js → composition-sources-D7lvBXc8.js} +1 -1
- package/system/dist/{composition-sources-DcylO7sC.mjs → composition-sources-DheiqGa9.mjs} +1 -1
- package/system/dist/{constants-BKGG2usb.mjs → constants-BVlI9ZGT.mjs} +1 -1
- package/system/dist/{constants-DSkgpC0i.js → constants-D3b9Y_CL.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-CcN_j34c.mjs → device-ca-CN76DeJT.mjs} +1 -1
- package/system/dist/{device-ca-B3cBsh5J.js → device-ca-DXPcZMMj.js} +1 -1
- package/system/dist/{device-row-store-SolcTRe_.mjs → device-row-store-C7JBjEgX.mjs} +1 -1
- package/system/dist/{device-row-store-Dk7ifbgt.js → device-row-store-taOeGSj6.js} +1 -1
- package/system/dist/{dist-ByMqgbCg.js → dist-CISneIO7.js} +22 -3
- package/system/dist/{dist-_fOmkvGL.mjs → dist-DmqSc6J1.mjs} +22 -3
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-C0N_7llq.mjs → hub-identity-BC_IXmWZ.mjs} +10 -10
- package/system/dist/{hub-identity-C91XSJ8N.js → hub-identity-CK65JBwk.js} +1 -1
- package/system/dist/{hub-mdns-ciao-BoJCqA6I.mjs → hub-mdns-ciao-CHwLEof0.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DhSpytH9.js → hub-mdns-ciao-DyDtfN7-.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +217 -217
- package/system/dist/{legacy-integration-rows-door-Dm-zbWmk.mjs → legacy-integration-rows-door-BCtYMhm9.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-Boz5f4qq.js → legacy-integration-rows-door-Ckvx-mil.js} +1 -1
- package/system/dist/{rename-composition-block-D4v-Khq3.js → rename-composition-block-c7bj9EWu.js} +1 -1
- package/system/dist/{rename-composition-block-BUbupDAu.mjs → rename-composition-block-uFu4-kFk.mjs} +1 -1
- package/system/dist/{restore-archive-D7sy-vk9.mjs → restore-archive-BQNTXuId.mjs} +94 -94
- package/system/dist/{restore-archive-Cx4I93jb.js → restore-archive-JVHCUYE9.js} +1 -1
- package/system/dist/{wal-maintenance-jK9K7Ob8.js → wal-maintenance-96iOS2pz.js} +0 -0
- package/system/dist/{wal-maintenance-CHfhvqyV.mjs → wal-maintenance-CmzAxnVz.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as ConditionMirror, Bl as isDeviceConfigCap, Bo as runtimeStatePolicyFor, Ca as mergeIdentifiers, Ci as formatMinutes, Du as DeviceRole, Ei as generateDeviceAlias, Eu as DeviceFeature, Fa as normalizeTags, Gl as isSecretClear, Go as searchRank, Ia as normalizeUnit, Io as resolveTemplateRef, Is as workloadCapability, J as DEVICE_TEMPLATE_FILTERS, Ji as isEmptyIdentifiers, Jl as isSecretMarkerLike, Kr as deviceExtensionCapability, Ls as workloadTransition, Mi as identifierStrength, Ml as expandCapMethods$1, Mn as WORKLOAD_TRANSITION_CATEGORY, Ni as identityLinkId, Nn as WorkloadStateSchema, Nr as createDeviceExtensionProvider, Ou as DeviceType$1, Pi as identityLinkSidesRefusal, Q as DEVICE_TEMPLATE_VALUES_CAP, R as DAY_NAMES, Rl as isCommand$1, Su as vocabActionIdFor, U as DEVICE_IDENTIFIER_KEYS, Ua as parseStreamParamsFormPatch, Ul as isKeychainStoredField, Vo as sameIdentifiers, Vr as defineExtensionSlotProvider, X as DEVICE_TEMPLATE_MAX_OUTPUT, Xi as isKernelDerivedFeature, Xr as deviceOffersActions, Xt as PUSH_CONFIRM_WINDOW_MS, Y as DEVICE_TEMPLATE_MAX_LENGTH, Yo as settleDeviceFeatures, Yr as deviceManagerCapability, Zs as capAppliesToDeviceKind, _r as commandBurstOffsets, aa as legacyAutoLinkIds, ai as enumerateSchemaFields, at as DeviceStatusSchema, bt as FieldClaimSchema, bu as transformSecretWrite, co as reconcileReportedFeatures, da as locationIconKey, dc as implementedMethodsOf$1, dt as ExportNameRefusedError, ei as deviceStateCapability, el as SECRET_CLEAR, gu as sleep$2, ii as enumerateItemArrayFields, ju as EventCategory$1, ku as errMsg$1, lu as resolveSecretMarkers, nr as buildStreamParamsConfigSchema, ol as WELL_KNOWN_TAB_MAP, or as canonicalIconKey, pi as extractSourceInfoFromMetadata, pl as auditedFields, pn as STREAM_PROFILE_META, pu as secretTreeFromPaths, ql as isSecretMarker, ri as effectiveRefreshIntervalMs, rt as DeviceIdentifiersSchema, s as ALL_CAPABILITY_DEFINITIONS, ta as isWorkloadSettled, ti as deviceStatusCapability, ts as siteZoneKey, ui as expandContainer, ur as checkDeviceAlias, vl as collectZodSecretPaths$1, wc as BaseAddon, wo as resolveCommandHold, x as CAP_NAMES_WITH_STATUS, xu as userError, y as CAMERA_SWITCH_ORDER, yl as commandEffect, yt as FieldClaimModeSchema, yu as toSecretFieldView, zo as runtimeFieldUnit, zt as MINUTES_PER_DAY } from "../../dist-
|
|
1
|
+
import { A as ConditionMirror, Bl as isDeviceConfigCap, Bo as runtimeStatePolicyFor, Ca as mergeIdentifiers, Ci as formatMinutes, Du as DeviceRole, Ei as generateDeviceAlias, Eu as DeviceFeature, Fa as normalizeTags, Gl as isSecretClear, Go as searchRank, Ia as normalizeUnit, Io as resolveTemplateRef, Is as workloadCapability, J as DEVICE_TEMPLATE_FILTERS, Ji as isEmptyIdentifiers, Jl as isSecretMarkerLike, Kr as deviceExtensionCapability, Ls as workloadTransition, Mi as identifierStrength, Ml as expandCapMethods$1, Mn as WORKLOAD_TRANSITION_CATEGORY, Ni as identityLinkId, Nn as WorkloadStateSchema, Nr as createDeviceExtensionProvider, Ou as DeviceType$1, Pi as identityLinkSidesRefusal, Q as DEVICE_TEMPLATE_VALUES_CAP, R as DAY_NAMES, Rl as isCommand$1, Su as vocabActionIdFor, U as DEVICE_IDENTIFIER_KEYS, Ua as parseStreamParamsFormPatch, Ul as isKeychainStoredField, Vo as sameIdentifiers, Vr as defineExtensionSlotProvider, X as DEVICE_TEMPLATE_MAX_OUTPUT, Xi as isKernelDerivedFeature, Xr as deviceOffersActions, Xt as PUSH_CONFIRM_WINDOW_MS, Y as DEVICE_TEMPLATE_MAX_LENGTH, Yo as settleDeviceFeatures, Yr as deviceManagerCapability, Zs as capAppliesToDeviceKind, _r as commandBurstOffsets, aa as legacyAutoLinkIds, ai as enumerateSchemaFields, at as DeviceStatusSchema, bt as FieldClaimSchema, bu as transformSecretWrite, co as reconcileReportedFeatures, da as locationIconKey, dc as implementedMethodsOf$1, dt as ExportNameRefusedError, ei as deviceStateCapability, el as SECRET_CLEAR, gu as sleep$2, ii as enumerateItemArrayFields, ju as EventCategory$1, ku as errMsg$1, lu as resolveSecretMarkers, nr as buildStreamParamsConfigSchema, ol as WELL_KNOWN_TAB_MAP, or as canonicalIconKey, pi as extractSourceInfoFromMetadata, pl as auditedFields, pn as STREAM_PROFILE_META, pu as secretTreeFromPaths, ql as isSecretMarker, ri as effectiveRefreshIntervalMs, rt as DeviceIdentifiersSchema, s as ALL_CAPABILITY_DEFINITIONS, ta as isWorkloadSettled, ti as deviceStatusCapability, ts as siteZoneKey, ui as expandContainer, ur as checkDeviceAlias, vl as collectZodSecretPaths$1, wc as BaseAddon, wo as resolveCommandHold, x as CAP_NAMES_WITH_STATUS, xu as userError, y as CAMERA_SWITCH_ORDER, yl as commandEffect, yt as FieldClaimModeSchema, yu as toSecretFieldView, zo as runtimeFieldUnit, zt as MINUTES_PER_DAY } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { a as redactLogText, i as redactLogMeta, n as isSecretArgumentKey } from "../../log-redactor-XLDrPzOi.mjs";
|
|
4
|
-
import { n as renameCompositionBlock, t as composedBlockIdOf } from "../../rename-composition-block-
|
|
4
|
+
import { n as renameCompositionBlock, t as composedBlockIdOf } from "../../rename-composition-block-uFu4-kFk.mjs";
|
|
5
5
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
6
6
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
7
7
|
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
8
|
-
import { a as MigrationRefusedError, i as deviceManagerRecordKinds, n as DeviceRowStore, r as deviceRowBackendOf } from "../../device-row-store-
|
|
8
|
+
import { a as MigrationRefusedError, i as deviceManagerRecordKinds, n as DeviceRowStore, r as deviceRowBackendOf } from "../../device-row-store-C7JBjEgX.mjs";
|
|
9
9
|
import { n as isRenderResponse, r as analyzeTemplate } from "../../template-protocol-SgPDx3Hw.mjs";
|
|
10
10
|
import { s as normalizeServiceType } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
@@ -13106,6 +13106,17 @@ function __resetStateRefreshPolicyRegistryForTests() {
|
|
|
13106
13106
|
*/
|
|
13107
13107
|
/** The longest a command waits for a read already in flight on its device. */
|
|
13108
13108
|
var COMMAND_WAIT_BOUND_MS = 5e3;
|
|
13109
|
+
/** The longest a device that keeps failing waits between two scheduled reads. */
|
|
13110
|
+
var FAILURE_BACKOFF_CAP_MS = 3e5;
|
|
13111
|
+
/**
|
|
13112
|
+
* The wait before the next scheduled read of a device that failed `failures`
|
|
13113
|
+
* reads in a row: the interval doubled per failure, capped, and never below
|
|
13114
|
+
* the interval itself.
|
|
13115
|
+
*/
|
|
13116
|
+
function failureBackoffMs(intervalMs, failures) {
|
|
13117
|
+
if (failures <= 0) return intervalMs;
|
|
13118
|
+
return Math.max(intervalMs, Math.min(FAILURE_BACKOFF_CAP_MS, intervalMs * 2 ** failures));
|
|
13119
|
+
}
|
|
13109
13120
|
function groupKeyOf(entry) {
|
|
13110
13121
|
return `${entry.addonId}::${entry.policy.integrationId}`;
|
|
13111
13122
|
}
|
|
@@ -13116,6 +13127,8 @@ var StateRefreshScheduler = class {
|
|
|
13116
13127
|
deps;
|
|
13117
13128
|
devices = /* @__PURE__ */ new Map();
|
|
13118
13129
|
groups = /* @__PURE__ */ new Map();
|
|
13130
|
+
/** The latest connection epoch seen per integration, kept while its group is gone. */
|
|
13131
|
+
epochs = /* @__PURE__ */ new Map();
|
|
13119
13132
|
unsubscribe;
|
|
13120
13133
|
disposed = false;
|
|
13121
13134
|
constructor(deps) {
|
|
@@ -13165,6 +13178,7 @@ var StateRefreshScheduler = class {
|
|
|
13165
13178
|
for (const group of this.groups.values()) this.clearGroupTimers(group);
|
|
13166
13179
|
this.devices.clear();
|
|
13167
13180
|
this.groups.clear();
|
|
13181
|
+
this.epochs.clear();
|
|
13168
13182
|
}
|
|
13169
13183
|
reconcile() {
|
|
13170
13184
|
if (this.disposed) return;
|
|
@@ -13187,7 +13201,8 @@ var StateRefreshScheduler = class {
|
|
|
13187
13201
|
inFlight: null,
|
|
13188
13202
|
scheduledInFlight: null,
|
|
13189
13203
|
burst: [],
|
|
13190
|
-
pushWindow: null
|
|
13204
|
+
pushWindow: null,
|
|
13205
|
+
failures: 0
|
|
13191
13206
|
});
|
|
13192
13207
|
else {
|
|
13193
13208
|
if (effectiveRefreshIntervalMs(existing.entry.policy) !== interval) existing.dueAt = now + interval;
|
|
@@ -13201,16 +13216,24 @@ var StateRefreshScheduler = class {
|
|
|
13201
13216
|
this.refreshGroup(key, "schedule");
|
|
13202
13217
|
}
|
|
13203
13218
|
}
|
|
13204
|
-
/**
|
|
13219
|
+
/**
|
|
13220
|
+
* Track an integration's connection epoch; `true` when it CHANGED. Any change
|
|
13221
|
+
* is a reconnect, a restart that comes back with a lower value included (a
|
|
13222
|
+
* provider's counter restarts with its process while this scheduler keeps
|
|
13223
|
+
* running). The first registration and an unchanged epoch read nothing.
|
|
13224
|
+
*
|
|
13225
|
+
* The value is kept across a gap on purpose, and NOT dropped when the last
|
|
13226
|
+
* device of an integration leaves: a provider re-registers its cap to publish
|
|
13227
|
+
* the new epoch, which removes the device for a moment, and the comparison
|
|
13228
|
+
* must still see the epoch from before. It is forgotten in `dispose()`.
|
|
13229
|
+
*/
|
|
13205
13230
|
noteEpoch(entry) {
|
|
13206
13231
|
const epoch = entry.policy.connectionEpoch;
|
|
13207
13232
|
if (epoch === void 0) return false;
|
|
13208
13233
|
const key = groupKeyOf(entry);
|
|
13209
|
-
const
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
if (previous === void 0 || epoch > previous) group.epoch = epoch;
|
|
13213
|
-
return previous !== void 0 && epoch > previous;
|
|
13234
|
+
const previous = this.epochs.get(key);
|
|
13235
|
+
this.epochs.set(key, epoch);
|
|
13236
|
+
return previous !== void 0 && epoch !== previous;
|
|
13214
13237
|
}
|
|
13215
13238
|
rebuildGroups(now) {
|
|
13216
13239
|
const members = /* @__PURE__ */ new Map();
|
|
@@ -13237,8 +13260,7 @@ var StateRefreshScheduler = class {
|
|
|
13237
13260
|
intervalMs,
|
|
13238
13261
|
scheduleTimer: null,
|
|
13239
13262
|
heartbeatTimer: null,
|
|
13240
|
-
lastReportAt: now
|
|
13241
|
-
epoch: first?.entry.policy.connectionEpoch
|
|
13263
|
+
lastReportAt: now
|
|
13242
13264
|
});
|
|
13243
13265
|
} else {
|
|
13244
13266
|
existing.devices = devices;
|
|
@@ -13437,15 +13459,10 @@ var StateRefreshScheduler = class {
|
|
|
13437
13459
|
busy.push(deviceId);
|
|
13438
13460
|
prior.push(tail);
|
|
13439
13461
|
}
|
|
13440
|
-
const settled = this.afterPrior(prior, busy, waitBoundMs).then(
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
reason,
|
|
13445
|
-
error: errorMessage$1(err)
|
|
13446
|
-
}
|
|
13447
|
-
});
|
|
13448
|
-
}).finally(() => {
|
|
13462
|
+
const settled = this.afterPrior(prior, busy, waitBoundMs).then(async () => {
|
|
13463
|
+
await this.deps.refresh(route, deviceIds, reason);
|
|
13464
|
+
this.noteSuccess(deviceIds);
|
|
13465
|
+
}).catch((err) => this.noteFailure(deviceIds, reason, err)).finally(() => {
|
|
13449
13466
|
for (const deviceId of deviceIds) {
|
|
13450
13467
|
const device = this.devices.get(deviceId);
|
|
13451
13468
|
if (device !== void 0 && device.inFlight === settled) device.inFlight = null;
|
|
@@ -13457,6 +13474,72 @@ var StateRefreshScheduler = class {
|
|
|
13457
13474
|
}
|
|
13458
13475
|
await settled;
|
|
13459
13476
|
}
|
|
13477
|
+
/**
|
|
13478
|
+
* A read that succeeded ends a backoff: the device is due at the declared
|
|
13479
|
+
* interval from now, whichever read (schedule, command, burst) proved it.
|
|
13480
|
+
*/
|
|
13481
|
+
noteSuccess(deviceIds) {
|
|
13482
|
+
const now = Date.now();
|
|
13483
|
+
const keys = /* @__PURE__ */ new Set();
|
|
13484
|
+
for (const deviceId of deviceIds) {
|
|
13485
|
+
const device = this.devices.get(deviceId);
|
|
13486
|
+
if (device === void 0 || device.failures === 0) continue;
|
|
13487
|
+
this.deps.logger.info("state refresh recovered: back to the declared interval", {
|
|
13488
|
+
tags: { deviceId },
|
|
13489
|
+
meta: { failedReads: device.failures }
|
|
13490
|
+
});
|
|
13491
|
+
device.failures = 0;
|
|
13492
|
+
const intervalMs = effectiveRefreshIntervalMs(device.entry.policy);
|
|
13493
|
+
if (!device.entry.policy.batch) device.dueAt = now + intervalMs;
|
|
13494
|
+
keys.add(groupKeyOf(device.entry));
|
|
13495
|
+
}
|
|
13496
|
+
for (const key of keys) {
|
|
13497
|
+
const group = this.groups.get(key);
|
|
13498
|
+
const policy = group === void 0 ? void 0 : this.groupPolicy(group);
|
|
13499
|
+
if (group !== void 0 && policy?.batch === true) group.dueAt = now + effectiveRefreshIntervalMs(policy);
|
|
13500
|
+
this.armSchedule(key);
|
|
13501
|
+
}
|
|
13502
|
+
}
|
|
13503
|
+
/**
|
|
13504
|
+
* A failed read is a warn per device. Only a SCHEDULED read that failed backs
|
|
13505
|
+
* the device off (doubling from the interval, capped, reset by the next
|
|
13506
|
+
* success): a command or burst read has its own cadence and says nothing
|
|
13507
|
+
* about the scheduled one. A batched group backs off only when the failed
|
|
13508
|
+
* read covered the whole group.
|
|
13509
|
+
*/
|
|
13510
|
+
noteFailure(deviceIds, reason, err) {
|
|
13511
|
+
const now = Date.now();
|
|
13512
|
+
const scheduled = reason === "schedule";
|
|
13513
|
+
const keys = /* @__PURE__ */ new Set();
|
|
13514
|
+
let groupFailures = 0;
|
|
13515
|
+
for (const deviceId of deviceIds) {
|
|
13516
|
+
const device = this.devices.get(deviceId);
|
|
13517
|
+
if (device === void 0) continue;
|
|
13518
|
+
if (scheduled) device.failures += 1;
|
|
13519
|
+
groupFailures = Math.max(groupFailures, device.failures);
|
|
13520
|
+
const retryInMs = failureBackoffMs(effectiveRefreshIntervalMs(device.entry.policy), device.failures);
|
|
13521
|
+
if (scheduled && !device.entry.policy.batch) device.dueAt = Math.max(device.dueAt, now + retryInMs);
|
|
13522
|
+
keys.add(groupKeyOf(device.entry));
|
|
13523
|
+
this.deps.logger.warn("state refresh failed", {
|
|
13524
|
+
tags: { deviceId },
|
|
13525
|
+
meta: {
|
|
13526
|
+
reason,
|
|
13527
|
+
error: errorMessage$1(err),
|
|
13528
|
+
consecutiveFailures: device.failures,
|
|
13529
|
+
retryInMs: scheduled && device.entry.policy.push !== "full" ? retryInMs : void 0
|
|
13530
|
+
}
|
|
13531
|
+
});
|
|
13532
|
+
}
|
|
13533
|
+
if (!scheduled) return;
|
|
13534
|
+
for (const key of keys) {
|
|
13535
|
+
const group = this.groups.get(key);
|
|
13536
|
+
const policy = group === void 0 ? void 0 : this.groupPolicy(group);
|
|
13537
|
+
if (group !== void 0 && policy?.batch === true) {
|
|
13538
|
+
if ([...group.devices].every((id) => deviceIds.includes(id))) group.dueAt = Math.max(group.dueAt, now + failureBackoffMs(effectiveRefreshIntervalMs(policy), groupFailures));
|
|
13539
|
+
}
|
|
13540
|
+
this.armSchedule(key);
|
|
13541
|
+
}
|
|
13542
|
+
}
|
|
13460
13543
|
/** Resolves when every `prior` read ended, or after `waitBoundMs` (logged per busy device). */
|
|
13461
13544
|
async afterPrior(prior, busy, waitBoundMs) {
|
|
13462
13545
|
if (prior.length === 0) return;
|
|
@@ -51,10 +51,20 @@ export interface StateRefreshSchedulerDeps {
|
|
|
51
51
|
}
|
|
52
52
|
/** The longest a command waits for a read already in flight on its device. */
|
|
53
53
|
export declare const COMMAND_WAIT_BOUND_MS = 5e3;
|
|
54
|
+
/** The longest a device that keeps failing waits between two scheduled reads. */
|
|
55
|
+
export declare const FAILURE_BACKOFF_CAP_MS = 3e5;
|
|
56
|
+
/**
|
|
57
|
+
* The wait before the next scheduled read of a device that failed `failures`
|
|
58
|
+
* reads in a row: the interval doubled per failure, capped, and never below
|
|
59
|
+
* the interval itself.
|
|
60
|
+
*/
|
|
61
|
+
export declare function failureBackoffMs(intervalMs: number, failures: number): number;
|
|
54
62
|
export declare class StateRefreshScheduler {
|
|
55
63
|
private readonly deps;
|
|
56
64
|
private readonly devices;
|
|
57
65
|
private readonly groups;
|
|
66
|
+
/** The latest connection epoch seen per integration, kept while its group is gone. */
|
|
67
|
+
private readonly epochs;
|
|
58
68
|
private readonly unsubscribe;
|
|
59
69
|
private disposed;
|
|
60
70
|
constructor(deps: StateRefreshSchedulerDeps);
|
|
@@ -64,7 +74,17 @@ export declare class StateRefreshScheduler {
|
|
|
64
74
|
onReport(deviceId: number): void;
|
|
65
75
|
dispose(): void;
|
|
66
76
|
private reconcile;
|
|
67
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Track an integration's connection epoch; `true` when it CHANGED. Any change
|
|
79
|
+
* is a reconnect, a restart that comes back with a lower value included (a
|
|
80
|
+
* provider's counter restarts with its process while this scheduler keeps
|
|
81
|
+
* running). The first registration and an unchanged epoch read nothing.
|
|
82
|
+
*
|
|
83
|
+
* The value is kept across a gap on purpose, and NOT dropped when the last
|
|
84
|
+
* device of an integration leaves: a provider re-registers its cap to publish
|
|
85
|
+
* the new epoch, which removes the device for a moment, and the comparison
|
|
86
|
+
* must still see the epoch from before. It is forgotten in `dispose()`.
|
|
87
|
+
*/
|
|
68
88
|
private noteEpoch;
|
|
69
89
|
private rebuildGroups;
|
|
70
90
|
private groupPolicy;
|
|
@@ -90,6 +110,19 @@ export declare class StateRefreshScheduler {
|
|
|
90
110
|
* still busy). The read becomes the devices' new tail.
|
|
91
111
|
*/
|
|
92
112
|
private runRefresh;
|
|
113
|
+
/**
|
|
114
|
+
* A read that succeeded ends a backoff: the device is due at the declared
|
|
115
|
+
* interval from now, whichever read (schedule, command, burst) proved it.
|
|
116
|
+
*/
|
|
117
|
+
private noteSuccess;
|
|
118
|
+
/**
|
|
119
|
+
* A failed read is a warn per device. Only a SCHEDULED read that failed backs
|
|
120
|
+
* the device off (doubling from the interval, capped, reset by the next
|
|
121
|
+
* success): a command or burst read has its own cadence and says nothing
|
|
122
|
+
* about the scheduled one. A batched group backs off only when the failed
|
|
123
|
+
* read covered the whole group.
|
|
124
|
+
*/
|
|
125
|
+
private noteFailure;
|
|
93
126
|
/** Resolves when every `prior` read ended, or after `waitBoundMs` (logged per busy device). */
|
|
94
127
|
private afterPrior;
|
|
95
128
|
private clearGroupTimers;
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ma as logDestinationCapability, wc as BaseAddon } from "../../dist-
|
|
1
|
+
import { ma as logDestinationCapability, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-DXPcZMMj.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
10
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-Ckvx-mil.js");
|
|
10
|
+
const require_constants = require("../../constants-D3b9Y_CL.js");
|
|
11
11
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
13
13
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { El as defineRecordKinds, Mt as KEYCHAIN_RESET_TRIGGER_ACTOR, Nl as formatSecretScope, Nt as KeychainAuditEntrySchema, Pt as KeychainResetRecordSchema, au as parseSecretRef, ia as keychainCapability, ju as EventCategory, ra as keychainAdminCapability, tu as normalizeSecretOwner, wc as BaseAddon } from "../../dist-
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { El as defineRecordKinds, Mt as KEYCHAIN_RESET_TRIGGER_ACTOR, Nl as formatSecretScope, Nt as KeychainAuditEntrySchema, Pt as KeychainResetRecordSchema, au as parseSecretRef, ia as keychainCapability, ju as EventCategory, ra as keychainAdminCapability, tu as normalizeSecretOwner, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-CN76DeJT.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-
|
|
5
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-BCtYMhm9.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-BVlI9ZGT.mjs";
|
|
6
6
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { in as RECORDING_SOURCE_CAMSTACK_ADDON, ju as EventCategory, ku as errMsg, sn as RecordingStatusSchema, wc as BaseAddon, xl as createEvent, ya as mayWriteToLocation } from "../../dist-
|
|
1
|
+
import { in as RECORDING_SOURCE_CAMSTACK_ADDON, ju as EventCategory, ku as errMsg, sn as RecordingStatusSchema, wc as BaseAddon, xl as createEvent, ya as mayWriteToLocation } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
9
|
-
const require_device_ca = require("../../device-ca-
|
|
9
|
+
const require_device_ca = require("../../device-ca-DXPcZMMj.js");
|
|
10
10
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $n as buildDeviceEnrollmentLink, D as CREDENTIAL_TOKEN_AUDIENCE, El as defineRecordKinds, G as DEVICE_NONCE_TTL_MS, Gr as deviceCredentialsCapability, Jt as PREFERENCES_MAX_VALUE_BYTES, Ki as isCredentialTokenPayload, N as CredentialTokenClaimsSchema, Si as formatDeviceRevoker, Ts as userManagementCapability, V as DEVICE_ENROLLMENT_TTL_MS, Xl as makeSecretMarker, _n as ScopedTokenSchema, bn as SsoBridgeClaimsSchema, en as PreferenceDeviceIdSchema, er as buildDeviceSignatureMessage, jn as UserRecordSchema, kn as TokenScopeSchema, nn as PreferenceValueSchema, ql as isSecretMarker, qn as authProviderCapability, tn as PreferenceNamespaceSchema, wc as BaseAddon, xu as userError } from "../../dist-
|
|
2
|
+
import { $n as buildDeviceEnrollmentLink, D as CREDENTIAL_TOKEN_AUDIENCE, El as defineRecordKinds, G as DEVICE_NONCE_TTL_MS, Gr as deviceCredentialsCapability, Jt as PREFERENCES_MAX_VALUE_BYTES, Ki as isCredentialTokenPayload, N as CredentialTokenClaimsSchema, Si as formatDeviceRevoker, Ts as userManagementCapability, V as DEVICE_ENROLLMENT_TTL_MS, Xl as makeSecretMarker, _n as ScopedTokenSchema, bn as SsoBridgeClaimsSchema, en as PreferenceDeviceIdSchema, er as buildDeviceSignatureMessage, jn as UserRecordSchema, kn as TokenScopeSchema, nn as PreferenceValueSchema, ql as isSecretMarker, qn as authProviderCapability, tn as PreferenceNamespaceSchema, wc as BaseAddon, xu as userError } from "../../dist-DmqSc6J1.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-CN76DeJT.mjs";
|
|
6
6
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import * as crypto$1 from "node:crypto";
|
|
9
9
|
import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
10
10
|
import nodeCrypto from "crypto";
|
|
11
|
-
import * as fs from "node:fs";
|
|
11
|
+
import * as fs$1 from "node:fs";
|
|
12
12
|
import * as path$1 from "node:path";
|
|
13
13
|
//#region ../../node_modules/bcryptjs/index.js
|
|
14
14
|
/**
|
|
@@ -11925,8 +11925,8 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
11925
11925
|
users: this.userManager,
|
|
11926
11926
|
dataDir: this.ctx.nodeDataDir,
|
|
11927
11927
|
fs: {
|
|
11928
|
-
exists: (filePath) => fs.existsSync(filePath),
|
|
11929
|
-
remove: (filePath) => fs.rmSync(filePath, { force: true })
|
|
11928
|
+
exists: (filePath) => fs$1.existsSync(filePath),
|
|
11929
|
+
remove: (filePath) => fs$1.rmSync(filePath, { force: true })
|
|
11930
11930
|
},
|
|
11931
11931
|
logger: this.ctx.logger
|
|
11932
11932
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_identity = require("../../hub-identity-
|
|
6
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_identity = require("../../hub-identity-CK65JBwk.js");
|
|
6
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DyDtfN7-.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_net = require("node:net");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $o as shortHostname, Cl as defineAddonMigrations, Ds as validateCustomAddress, Gt as NetworkTunnelStartedDataSchema, Hi as isAppLinkBase, Ka as pickAppLinkHub, Mo as resolveNotificationTapAddress, Oo as resolveHubAddressRoles, Qa as preconditionOf, So as resolveAppConnections, Tt as HUB_MDNS_TXT_KEYS, b as CAMSTACK_APP_LINK_ORIGIN, dr as checkRoleAddress, ju as EventCategory, ku as errMsg, qi as isDefaultAppConnectionEndpoint, ua as localNetworkCapability, wc as BaseAddon, wt as HUB_MDNS_SERVICE_TYPE } from "../../dist-
|
|
1
|
+
import { $o as shortHostname, Cl as defineAddonMigrations, Ds as validateCustomAddress, Gt as NetworkTunnelStartedDataSchema, Hi as isAppLinkBase, Ka as pickAppLinkHub, Mo as resolveNotificationTapAddress, Oo as resolveHubAddressRoles, Qa as preconditionOf, So as resolveAppConnections, Tt as HUB_MDNS_TXT_KEYS, b as CAMSTACK_APP_LINK_ORIGIN, dr as checkRoleAddress, ju as EventCategory, ku as errMsg, qi as isDefaultAppConnectionEndpoint, ua as localNetworkCapability, wc as BaseAddon, wt as HUB_MDNS_SERVICE_TYPE } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
3
|
-
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-
|
|
4
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
3
|
+
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-BC_IXmWZ.mjs";
|
|
4
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-CHwLEof0.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $c as RevConflictError, $i as isSameAddonId, Cl as defineAddonMigrations, Hl as isInstanceOn, Ii as integrationInstancesCapability, Jc as RecordIntegrationInstances, Kl as isSecretFieldView, Qa as preconditionOf, Tl as defineEntryKind, Yn as bareAddonId, ma as logDestinationCapability, ql as isSecretMarker, wc as BaseAddon } from "../../dist-
|
|
1
|
+
import { $c as RevConflictError, $i as isSameAddonId, Cl as defineAddonMigrations, Hl as isInstanceOn, Ii as integrationInstancesCapability, Jc as RecordIntegrationInstances, Kl as isSecretFieldView, Qa as preconditionOf, Tl as defineEntryKind, Yn as bareAddonId, ma as logDestinationCapability, ql as isSecretMarker, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as UNATTRIBUTED_BUCKET_KEY, Co as resolveBucketMs, Ea as metricsProviderCapability, do as reducePoints, ju as EventCategory, ku as errMsg, on as ROOT_BUCKET_KEY, wc as BaseAddon, xi as foldSnapshotByFunction, xl as createEvent } from "../../dist-
|
|
2
|
-
import * as fs from "node:fs";
|
|
1
|
+
import { An as UNATTRIBUTED_BUCKET_KEY, Co as resolveBucketMs, Ea as metricsProviderCapability, do as reducePoints, ju as EventCategory, ku as errMsg, on as ROOT_BUCKET_KEY, wc as BaseAddon, xi as foldSnapshotByFunction, xl as createEvent } from "../../dist-DmqSc6J1.mjs";
|
|
2
|
+
import * as fs$1 from "node:fs";
|
|
3
3
|
import { constants, readFileSync } from "node:fs";
|
|
4
4
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
5
5
|
import { promisify } from "node:util";
|
|
@@ -1686,7 +1686,7 @@ var NativeMetricsProvider = class {
|
|
|
1686
1686
|
let swapUsedBytes = 0;
|
|
1687
1687
|
let swapTotalBytes = 0;
|
|
1688
1688
|
if (IS_LINUX) try {
|
|
1689
|
-
const meminfo = fs.readFileSync("/proc/meminfo", "utf-8");
|
|
1689
|
+
const meminfo = fs$1.readFileSync("/proc/meminfo", "utf-8");
|
|
1690
1690
|
const availKb = meminfo.match(/MemAvailable:\s+(\d+)/)?.[1];
|
|
1691
1691
|
if (availKb !== void 0) available = parseInt(availKb, 10) * 1024;
|
|
1692
1692
|
const swapTotal = parseInt(meminfo.match(/SwapTotal:\s+(\d+)/)?.[1] ?? "0", 10) * 1024;
|
|
@@ -1779,7 +1779,7 @@ async function sampleMacMemory(provider) {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
function getDiskSpaceInternal(dirPath) {
|
|
1781
1781
|
return new Promise((resolve, reject) => {
|
|
1782
|
-
fs.statfs(dirPath, (err, stats) => {
|
|
1782
|
+
fs$1.statfs(dirPath, (err, stats) => {
|
|
1783
1783
|
if (err) return reject(err);
|
|
1784
1784
|
const totalBytes = stats.blocks * stats.bsize;
|
|
1785
1785
|
const availableBytes = stats.bavail * stats.bsize;
|
|
@@ -1797,7 +1797,7 @@ function getDiskSpaceInternal(dirPath) {
|
|
|
1797
1797
|
async function takeDiskIoSnapshot() {
|
|
1798
1798
|
const now = Date.now();
|
|
1799
1799
|
if (IS_LINUX) try {
|
|
1800
|
-
const data = fs.readFileSync("/proc/diskstats", "utf-8");
|
|
1800
|
+
const data = fs$1.readFileSync("/proc/diskstats", "utf-8");
|
|
1801
1801
|
let readOps = 0, readBytes = 0, writeOps = 0, writeBytes = 0;
|
|
1802
1802
|
for (const line of data.split("\n")) {
|
|
1803
1803
|
const parts = line.trim().split(/\s+/);
|
|
@@ -1828,7 +1828,7 @@ async function takeDiskIoSnapshot() {
|
|
|
1828
1828
|
async function takeNetworkIoSnapshot() {
|
|
1829
1829
|
const now = Date.now();
|
|
1830
1830
|
if (IS_LINUX) try {
|
|
1831
|
-
const data = fs.readFileSync("/proc/net/dev", "utf-8");
|
|
1831
|
+
const data = fs$1.readFileSync("/proc/net/dev", "utf-8");
|
|
1832
1832
|
let rxBytes = 0, txBytes = 0, rxPackets = 0, txPackets = 0, rxErrors = 0, txErrors = 0;
|
|
1833
1833
|
for (const line of data.split("\n")) {
|
|
1834
1834
|
const match = line.match(/^\s*(\w+):\s+(.+)$/);
|
|
@@ -1889,7 +1889,7 @@ async function takeNetworkIoSnapshot() {
|
|
|
1889
1889
|
}
|
|
1890
1890
|
async function getCpuTemperatureInternal() {
|
|
1891
1891
|
if (IS_LINUX) for (const p of ["/sys/class/thermal/thermal_zone0/temp", "/sys/class/hwmon/hwmon0/temp1_input"]) try {
|
|
1892
|
-
const raw = fs.readFileSync(p, "utf-8").trim();
|
|
1892
|
+
const raw = fs$1.readFileSync(p, "utf-8").trim();
|
|
1893
1893
|
const millideg = parseInt(raw, 10);
|
|
1894
1894
|
if (!isNaN(millideg)) return Math.round(millideg / 100) / 10;
|
|
1895
1895
|
} catch {
|
|
@@ -1940,10 +1940,10 @@ function getProcessResources() {
|
|
|
1940
1940
|
let threadCount = 0;
|
|
1941
1941
|
if (IS_LINUX) {
|
|
1942
1942
|
try {
|
|
1943
|
-
openFds = fs.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1943
|
+
openFds = fs$1.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1944
1944
|
} catch {}
|
|
1945
1945
|
try {
|
|
1946
|
-
const match = fs.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
|
|
1946
|
+
const match = fs$1.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
|
|
1947
1947
|
if (match) threadCount = parseInt(match[1], 10);
|
|
1948
1948
|
} catch {}
|
|
1949
1949
|
}
|
|
@@ -1958,7 +1958,7 @@ function getProcessResources() {
|
|
|
1958
1958
|
function getPressure(resource) {
|
|
1959
1959
|
if (!IS_LINUX) return null;
|
|
1960
1960
|
try {
|
|
1961
|
-
const data = fs.readFileSync(`/proc/pressure/${resource}`, "utf-8");
|
|
1961
|
+
const data = fs$1.readFileSync(`/proc/pressure/${resource}`, "utf-8");
|
|
1962
1962
|
const parseLine = (prefix) => {
|
|
1963
1963
|
const match = data.match(new RegExp(`${prefix} avg10=(\\d+\\.\\d+) avg60=(\\d+\\.\\d+) avg300=(\\d+\\.\\d+)`));
|
|
1964
1964
|
if (!match) return null;
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Dl as describeNvidia, Ja as platformProbeCapability, Va as parseAcceleratorFactsJson, fu as scoreRuntimes, jl as enumerateInferenceDevices, ju as EventCategory, kl as emitReadiness, ku as errMsg, wc as BaseAddon } from "../../dist-
|
|
3
|
-
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-
|
|
4
|
-
import * as fs from "node:fs";
|
|
2
|
+
import { Dl as describeNvidia, Ja as platformProbeCapability, Va as parseAcceleratorFactsJson, fu as scoreRuntimes, jl as enumerateInferenceDevices, ju as EventCategory, kl as emitReadiness, ku as errMsg, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
3
|
+
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import * as os$1 from "node:os";
|
|
@@ -501,14 +501,14 @@ var PlatformScorer = class {
|
|
|
501
501
|
nvidiaProbe = await this.probeNvidiaSmi();
|
|
502
502
|
const listRenderNodes = () => {
|
|
503
503
|
try {
|
|
504
|
-
return fs.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
|
|
504
|
+
return fs$1.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
|
|
505
505
|
} catch {
|
|
506
506
|
return [];
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
const readDrmAttr = (node, attr) => {
|
|
510
510
|
try {
|
|
511
|
-
return fs.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
|
|
511
|
+
return fs$1.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
|
|
512
512
|
} catch {
|
|
513
513
|
return "";
|
|
514
514
|
}
|
|
@@ -534,12 +534,12 @@ var PlatformScorer = class {
|
|
|
534
534
|
}
|
|
535
535
|
const listDir = (p) => {
|
|
536
536
|
try {
|
|
537
|
-
return fs.readdirSync(p);
|
|
537
|
+
return fs$1.readdirSync(p);
|
|
538
538
|
} catch {
|
|
539
539
|
return [];
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
|
-
const exists = (p) => fs.existsSync(p);
|
|
542
|
+
const exists = (p) => fs$1.existsSync(p);
|
|
543
543
|
if (!npu) {
|
|
544
544
|
const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
|
|
545
545
|
npu = classifyIntelNpu({
|
|
@@ -567,7 +567,7 @@ var PlatformScorer = class {
|
|
|
567
567
|
exists,
|
|
568
568
|
readFile: (p) => {
|
|
569
569
|
try {
|
|
570
|
-
return fs.readFileSync(p, "utf8");
|
|
570
|
+
return fs$1.readFileSync(p, "utf8");
|
|
571
571
|
} catch {
|
|
572
572
|
return "";
|
|
573
573
|
}
|
|
@@ -871,7 +871,7 @@ function jsonValue(text) {
|
|
|
871
871
|
function readPublishedAcceleratorFacts(filePath) {
|
|
872
872
|
let text;
|
|
873
873
|
try {
|
|
874
|
-
text = fs.readFileSync(filePath, "utf8");
|
|
874
|
+
text = fs$1.readFileSync(filePath, "utf8");
|
|
875
875
|
} catch {
|
|
876
876
|
return null;
|
|
877
877
|
}
|
|
@@ -886,7 +886,7 @@ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
|
|
|
886
886
|
const candidates = [];
|
|
887
887
|
if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
888
888
|
candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
889
|
-
for (const candidate of candidates) if (fs.existsSync(candidate)) return candidate;
|
|
889
|
+
for (const candidate of candidates) if (fs$1.existsSync(candidate)) return candidate;
|
|
890
890
|
return null;
|
|
891
891
|
}
|
|
892
892
|
async function defaultExec(command, args, timeoutMs) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fc as InvalidRecordError, hu as secretViewsOf, il as UnknownRecordKindError, lo as recordEntriesCapability, wc as BaseAddon } from "../../dist-
|
|
1
|
+
import { Fc as InvalidRecordError, hu as secretViewsOf, il as UnknownRecordKindError, lo as recordEntriesCapability, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
9
9
|
/**
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ju as EventCategory, wc as BaseAddon } from "../../dist-
|
|
1
|
+
import { ju as EventCategory, wc as BaseAddon } from "../../dist-DmqSc6J1.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CISneIO7.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|