@camstack/server 1.2.892 → 1.2.894
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 +12 -0
- package/dist/api/core/api-catalog.js +93 -0
- package/dist/api/core/api-catalog.router.js +74 -0
- package/dist/api/trpc/generated-cap-routers.js +10 -0
- package/dist/api/trpc/trpc.middleware.js +17 -0
- package/dist/api/trpc/trpc.router.js +10 -3
- package/package.json +16 -29
- 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 +1 -1
- 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 +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- 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 +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- 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-identity-index.d.ts +73 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +308 -17
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +308 -17
- package/system/dist/builtins/device-manager/device-provider-context.d.ts +5 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +4 -1
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +10 -0
- package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +20 -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 +2 -2
- 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 +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- 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 +1 -1
- 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 +284 -284
- 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-sl6e9f9S.mjs → capture-engine-6UsbHfRF.mjs} +1 -1
- package/system/dist/{capture-engine-DHmlkW_d.js → capture-engine-DhqkkOfH.js} +1 -1
- package/system/dist/{composition-sources-PqcZfe3j.js → composition-sources-AbyhP_uF.js} +1 -1
- package/system/dist/{composition-sources-CznD85Ri.mjs → composition-sources-DmDAqBqM.mjs} +1 -1
- package/system/dist/{constants-_2SOk0By.js → constants-CLyC9O9i.js} +1 -1
- package/system/dist/{constants-CHwj_mIM.mjs → constants-DMeh8SL7.mjs} +1 -1
- package/system/dist/{device-ca-D2H1EMUY.mjs → device-ca-BJ714blt.mjs} +1 -1
- package/system/dist/{device-ca-WIEO5ZcE.js → device-ca-C4odTE-a.js} +1 -1
- package/system/dist/{dist-yx2KHo3b.js → dist-BDciHA-9.js} +207 -25
- package/system/dist/{dist-DbAhCrHy.mjs → dist-DLp5CYDy.mjs} +196 -26
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-Buegac-w.js → hub-identity-BLkehzWw.js} +1 -1
- package/system/dist/{hub-identity-BcvZqT0L.mjs → hub-identity-C6c6E6Xn.mjs} +1 -1
- package/system/dist/{hub-mdns-ciao-DcNPj7WJ.js → hub-mdns-ciao-ByOblmkT.js} +2 -2
- package/system/dist/{hub-mdns-ciao-B6K_dO2s.mjs → hub-mdns-ciao-oQtUklUf.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-BsZyVNiR.js → legacy-integration-rows-door-CVwsY9u6.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-DHOJeDPG.mjs → legacy-integration-rows-door-D_FBo1b1.mjs} +1 -1
- package/system/dist/{rename-composition-block-DcVS1LuC.mjs → rename-composition-block-CnA_Dslb.mjs} +1 -1
- package/system/dist/{rename-composition-block-BXMor7MR.js → rename-composition-block-_LotNQv9.js} +1 -1
- package/system/dist/{restore-archive-BURufVQd.js → restore-archive-CXPBPM61.js} +1 -1
- package/system/dist/{restore-archive-BG8VJ8Ar.mjs → restore-archive-WMuoi9Ve.mjs} +82 -82
- package/system/dist/{wal-maintenance-B4wGD6QR.mjs → wal-maintenance-COXWd5qA.mjs} +0 -0
- package/system/dist/{wal-maintenance-CeaJyKNT.js → wal-maintenance-h2cm6gDJ.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $ as DEVICE_TEMPLATE_VALUES_CAP, $s as implementedMethodsOf$1, Bi as isKernelDerivedFeature, Br as deviceExtensionCapability, Ca as normalizeTags, Dn as WORKLOAD_TRANSITION_CATEGORY, Do as sameIdentifiers, Dr as createDeviceExtensionProvider, El as isDeviceConfigCap, Eo as runtimeStatePolicyFor, Fr as defineExtensionSlotProvider, Gi as isWorkloadSettled, Hc as SECRET_CLEAR, Ho as siteZoneKey, Hr as deviceManagerCapability, Io as settleDeviceFeatures, It as MINUTES_PER_DAY, Jc as WELL_KNOWN_TAB_MAP, Jl as resolveSecretMarkers, Kr as deviceStateCapability, Mo as searchRank, Nl as isSecretMarker, On as WorkloadStateSchema, Pl as isSecretMarkerLike, Qn as buildStreamParamsConfigSchema, Ri as isEmptyIdentifiers, Rs as canonicalStoredDeviceType, S as CAP_NAMES_WITH_STATUS, So as resolveTemplateRef, To as runtimeFieldUnit, Ts as workloadTransition, Ur as deviceOffersActions, W as DEVICE_IDENTIFIER_KEYS, X as DEVICE_TEMPLATE_MAX_LENGTH, Xa as reconcileReportedFeatures, Xr as enumerateItemArrayFields, Y as DEVICE_TEMPLATE_FILTERS, Yi as legacyAutoLinkIds, Z as DEVICE_TEMPLATE_MAX_OUTPUT, Zl as secretTreeFromPaths, Zr as enumerateSchemaFields, ai as extractSourceInfoFromMetadata, at as DeviceStatusSchema, au as vocabActionIdFor, b as CAMERA_SWITCH_ORDER, bt as FieldClaimSchema, cn as STREAM_PROFILE_META, dt as ExportNameRefusedError, du as DeviceType$1, eu as sleep$2, fa as mergeIdentifiers, fc as BaseAddon, fu as errMsg$1, hi as formatMinutes, iu as userError, j as ConditionMirror, ja as parseStreamParamsFormPatch, jl as isSecretClear, kl as isKeychainStoredField, lu as DeviceFeature, ml as defineRecordKinds, mu as EventCategory$1, ni as expandContainer, nr as canonicalIconKey, nu as toSecretFieldView, ol as collectZodSecretPaths$1, or as checkDeviceAlias, ot as DeviceTombstoneSchema, qr as deviceStatusCapability, rt as DeviceIdentifiersSchema, ru as transformSecretWrite, s as ALL_CAPABILITY_DEFINITIONS, sl as commandEffect, st as DiscoveryProposalBodySchema, ta as locationIconKey, tl as auditedFields, uu as DeviceRole, vi as generateDeviceAlias, vl as expandCapMethods$1, wa as normalizeUnit, wi as identifierStrength, wl as isCommand$1, ws as workloadCapability, yt as FieldClaimModeSchema, z as DAY_NAMES, zs as capAppliesToDeviceKind } from "../../dist-DLp5CYDy.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-CnA_Dslb.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";
|
|
@@ -4738,7 +4738,7 @@ function compareUnranked(a, b) {
|
|
|
4738
4738
|
if (a[2] !== b[2]) return a[2] < b[2] ? -1 : 1;
|
|
4739
4739
|
return a[3] - b[3];
|
|
4740
4740
|
}
|
|
4741
|
-
function compareKeys(a, b) {
|
|
4741
|
+
function compareKeys$1(a, b) {
|
|
4742
4742
|
if (a.length === 5 && b.length === 5) {
|
|
4743
4743
|
if (a[0] !== b[0]) return a[0] - b[0];
|
|
4744
4744
|
return compareUnranked([
|
|
@@ -4913,14 +4913,14 @@ async function searchDevices(deps, input) {
|
|
|
4913
4913
|
const keyed = listed.map((c) => ({
|
|
4914
4914
|
c,
|
|
4915
4915
|
key: sortKeyOf(c)
|
|
4916
|
-
})).sort((a, b) => compareKeys(a.key, b.key));
|
|
4916
|
+
})).sort((a, b) => compareKeys$1(a.key, b.key));
|
|
4917
4917
|
const limit = Math.min(input.limit ?? 50, 200);
|
|
4918
4918
|
let start = 0;
|
|
4919
4919
|
if (input.cursor !== void 0 && input.cursor !== null) {
|
|
4920
4920
|
const after = decodeCursor(input.cursor);
|
|
4921
4921
|
if (after === null) deps.logger.warn("deviceManager.search: undecodable cursor — restarting from the first page");
|
|
4922
4922
|
else {
|
|
4923
|
-
const next = keyed.findIndex((k) => compareKeys(k.key, after) > 0);
|
|
4923
|
+
const next = keyed.findIndex((k) => compareKeys$1(k.key, after) > 0);
|
|
4924
4924
|
start = next === -1 ? keyed.length : next;
|
|
4925
4925
|
}
|
|
4926
4926
|
}
|
|
@@ -8320,8 +8320,7 @@ async function loadRuntimeState(pctx, input) {
|
|
|
8320
8320
|
const { deviceId } = input;
|
|
8321
8321
|
if (!await pctx.metaStore.resolvePersistedById(deviceId)) return {};
|
|
8322
8322
|
const data = await pctx.settings.readDeviceRuntimeState(deviceId);
|
|
8323
|
-
pctx.host.
|
|
8324
|
-
return splitRuntimeBlob(data).native;
|
|
8323
|
+
return splitRuntimeBlob(pctx.host.seedMirrorFromRow(deviceId, data, pctx.settings)).native;
|
|
8325
8324
|
}
|
|
8326
8325
|
/**
|
|
8327
8326
|
* Union of (1) operator-curated location registry and (2) labels
|
|
@@ -8892,6 +8891,214 @@ async function setIdentifiers(pctx, input) {
|
|
|
8892
8891
|
});
|
|
8893
8892
|
}
|
|
8894
8893
|
//#endregion
|
|
8894
|
+
//#region src/builtins/device-manager/device-identity-index.ts
|
|
8895
|
+
/**
|
|
8896
|
+
* The identifier INDEX (planning#593): identifier key → devices, so the
|
|
8897
|
+
* device-manager can say which devices of DIFFERENT integrations share
|
|
8898
|
+
* provider-declared identifiers (D1059) without reading the fleet per question.
|
|
8899
|
+
*
|
|
8900
|
+
* It is a PROJECTION of the device rows, never an authority: it holds, per
|
|
8901
|
+
* device, only what the pair rule needs — owning addon, integration instance and
|
|
8902
|
+
* the declared identifiers — and it moves with the rows, as the
|
|
8903
|
+
* {@link DeviceRowObserver} of the one `DeviceRowStore`. Every write of a row
|
|
8904
|
+
* passes through that store (`upsert`, `upsertRegistration`, `patch`, `remove`;
|
|
8905
|
+
* `swapIds` is built of them), so a row that changes reaches the index on the
|
|
8906
|
+
* same statement. A deleted device leaves the index on its row's DELETE — the
|
|
8907
|
+
* statement `removeDevice` runs right before it records the tombstone (D865) —
|
|
8908
|
+
* not on an event or on absence from a listing.
|
|
8909
|
+
*
|
|
8910
|
+
* It loads once, from the fleet listing the device-manager already reads at
|
|
8911
|
+
* boot ({@link seed}). Until then it answers `unknown` (D315), never `[]`; a row
|
|
8912
|
+
* write that lands while the snapshot is in flight is buffered and replayed over
|
|
8913
|
+
* it, so the seed can never roll a newer write back.
|
|
8914
|
+
*
|
|
8915
|
+
* Read-only: it finds candidates, it links nothing (that is step 3).
|
|
8916
|
+
*/
|
|
8917
|
+
/** The `kind=value` keys of one declaration. */
|
|
8918
|
+
function keysOf(identifiers) {
|
|
8919
|
+
if (identifiers === null) return [];
|
|
8920
|
+
const out = [];
|
|
8921
|
+
for (const kind of DEVICE_IDENTIFIER_KEYS) {
|
|
8922
|
+
const entry = identifiers[kind];
|
|
8923
|
+
if (entry === void 0) continue;
|
|
8924
|
+
for (const e of [entry].flat()) out.push(`${kind}=${e.value}`);
|
|
8925
|
+
}
|
|
8926
|
+
return out;
|
|
8927
|
+
}
|
|
8928
|
+
function isIdentifierKind(value) {
|
|
8929
|
+
return DEVICE_IDENTIFIER_KEYS.some((k) => k === value);
|
|
8930
|
+
}
|
|
8931
|
+
function parseKey(key) {
|
|
8932
|
+
const at = key.indexOf("=");
|
|
8933
|
+
const kind = key.slice(0, at);
|
|
8934
|
+
return isIdentifierKind(kind) ? {
|
|
8935
|
+
key: kind,
|
|
8936
|
+
value: key.slice(at + 1)
|
|
8937
|
+
} : null;
|
|
8938
|
+
}
|
|
8939
|
+
/**
|
|
8940
|
+
* Same integration? The same instance when both carry one; otherwise — one side
|
|
8941
|
+
* was never stamped — the same addon. In doubt, the same: no candidate.
|
|
8942
|
+
*/
|
|
8943
|
+
function sameIntegration(a, b) {
|
|
8944
|
+
if (a.integrationId !== null && b.integrationId !== null) return a.integrationId === b.integrationId;
|
|
8945
|
+
return a.addonId === b.addonId;
|
|
8946
|
+
}
|
|
8947
|
+
function sideOf(d) {
|
|
8948
|
+
return {
|
|
8949
|
+
deviceId: d.deviceId,
|
|
8950
|
+
addonId: d.addonId,
|
|
8951
|
+
integrationId: d.integrationId
|
|
8952
|
+
};
|
|
8953
|
+
}
|
|
8954
|
+
function compareKeys(x, y) {
|
|
8955
|
+
if (x.key !== y.key) return x.key < y.key ? -1 : 1;
|
|
8956
|
+
return x.value < y.value ? -1 : x.value > y.value ? 1 : 0;
|
|
8957
|
+
}
|
|
8958
|
+
/**
|
|
8959
|
+
* Grade the keys two devices share. `null` when they are no candidate at all
|
|
8960
|
+
* (no strong key matched).
|
|
8961
|
+
*
|
|
8962
|
+
* | Matched keys | Confidence |
|
|
8963
|
+
* | ----------------------------------------- | ------------ |
|
|
8964
|
+
* | two strong KINDS (e.g. `mac` + `serial`) | `auto` |
|
|
8965
|
+
* | `mac` + `ip` | `auto` |
|
|
8966
|
+
* | exactly one strong kind | `proposal` |
|
|
8967
|
+
* | weak keys only (`hostname`, `ip`) | no candidate |
|
|
8968
|
+
*
|
|
8969
|
+
* Strength counts distinct KINDS, not values: two MACs of one device matching
|
|
8970
|
+
* the other's two MACs are one kind of evidence, so a proposal.
|
|
8971
|
+
*/
|
|
8972
|
+
function classifyIdentityMatch(keys) {
|
|
8973
|
+
const kinds = new Set(keys.map((k) => k.key));
|
|
8974
|
+
const strongKinds = [...kinds].filter((kind) => identifierStrength(kind) === "strong");
|
|
8975
|
+
if (strongKinds.length === 0) return null;
|
|
8976
|
+
if (strongKinds.length >= 2) return "auto";
|
|
8977
|
+
if (kinds.has("mac") && kinds.has("ip")) return "auto";
|
|
8978
|
+
return "proposal";
|
|
8979
|
+
}
|
|
8980
|
+
var DeviceIdentityIndex = class {
|
|
8981
|
+
devices = /* @__PURE__ */ new Map();
|
|
8982
|
+
byKey = /* @__PURE__ */ new Map();
|
|
8983
|
+
/** `null` once seeded; until then, the writes to replay over the snapshot. */
|
|
8984
|
+
pending = [];
|
|
8985
|
+
/** Load from a fleet snapshot, then replay every write that landed meanwhile. */
|
|
8986
|
+
seed(rows) {
|
|
8987
|
+
const buffered = this.pending ?? [];
|
|
8988
|
+
this.pending = null;
|
|
8989
|
+
this.devices.clear();
|
|
8990
|
+
this.byKey.clear();
|
|
8991
|
+
for (const row of rows) this.rowWritten(row.meta);
|
|
8992
|
+
for (const write of buffered) write(this);
|
|
8993
|
+
}
|
|
8994
|
+
rowWritten(meta) {
|
|
8995
|
+
if (this.buffer((i) => i.rowWritten(meta))) return;
|
|
8996
|
+
this.put({
|
|
8997
|
+
deviceId: meta.id,
|
|
8998
|
+
addonId: meta.addonId,
|
|
8999
|
+
integrationId: meta.integrationId ?? null,
|
|
9000
|
+
identifiers: meta.identifiers ?? null
|
|
9001
|
+
});
|
|
9002
|
+
}
|
|
9003
|
+
registrationWritten(row) {
|
|
9004
|
+
if (this.buffer((i) => i.registrationWritten(row))) return;
|
|
9005
|
+
const existing = this.devices.get(row.deviceId);
|
|
9006
|
+
this.put({
|
|
9007
|
+
deviceId: row.deviceId,
|
|
9008
|
+
addonId: row.addonId,
|
|
9009
|
+
integrationId: existing?.integrationId ?? null,
|
|
9010
|
+
identifiers: existing?.identifiers ?? null
|
|
9011
|
+
});
|
|
9012
|
+
}
|
|
9013
|
+
rowPatched(deviceId, patch) {
|
|
9014
|
+
if (patch.identifiers === void 0 && patch.integrationId === void 0) return;
|
|
9015
|
+
if (this.buffer((i) => i.rowPatched(deviceId, patch))) return;
|
|
9016
|
+
const existing = this.devices.get(deviceId);
|
|
9017
|
+
if (existing === void 0) return;
|
|
9018
|
+
this.put({
|
|
9019
|
+
...existing,
|
|
9020
|
+
...patch.identifiers !== void 0 ? { identifiers: patch.identifiers } : {},
|
|
9021
|
+
...patch.integrationId !== void 0 ? { integrationId: patch.integrationId } : {}
|
|
9022
|
+
});
|
|
9023
|
+
}
|
|
9024
|
+
rowRemoved(deviceId) {
|
|
9025
|
+
if (this.buffer((i) => i.rowRemoved(deviceId))) return;
|
|
9026
|
+
this.drop(deviceId);
|
|
9027
|
+
}
|
|
9028
|
+
/**
|
|
9029
|
+
* Every cross-integration candidate pair, graded by `classifyIdentityMatch`,
|
|
9030
|
+
* plus the devices whose identity is unknown (nothing declared).
|
|
9031
|
+
*/
|
|
9032
|
+
candidates() {
|
|
9033
|
+
if (this.pending !== null) return {
|
|
9034
|
+
status: "unknown",
|
|
9035
|
+
reason: "the identifier index has not loaded yet"
|
|
9036
|
+
};
|
|
9037
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9038
|
+
const pairs = [];
|
|
9039
|
+
for (const [key, members] of this.byKey) {
|
|
9040
|
+
const parsed = parseKey(key);
|
|
9041
|
+
if (parsed === null || identifierStrength(parsed.key) !== "strong") continue;
|
|
9042
|
+
if (members.size < 2) continue;
|
|
9043
|
+
const sorted = [...members].sort((x, y) => x - y);
|
|
9044
|
+
for (let i = 0; i < sorted.length; i++) for (let j = i + 1; j < sorted.length; j++) {
|
|
9045
|
+
const pair = this.pairOf(sorted[i], sorted[j], seen);
|
|
9046
|
+
if (pair !== null) pairs.push(pair);
|
|
9047
|
+
}
|
|
9048
|
+
}
|
|
9049
|
+
pairs.sort((x, y) => x.a.deviceId - y.a.deviceId || x.b.deviceId - y.b.deviceId);
|
|
9050
|
+
return {
|
|
9051
|
+
status: "answered",
|
|
9052
|
+
pairs,
|
|
9053
|
+
undeclaredDeviceIds: [...this.devices.values()].filter((d) => d.identifiers === null).map((d) => d.deviceId).sort((x, y) => x - y)
|
|
9054
|
+
};
|
|
9055
|
+
}
|
|
9056
|
+
pairOf(idA, idB, seen) {
|
|
9057
|
+
if (idA === void 0 || idB === void 0) return null;
|
|
9058
|
+
const tag = `${idA}/${idB}`;
|
|
9059
|
+
if (seen.has(tag)) return null;
|
|
9060
|
+
seen.add(tag);
|
|
9061
|
+
const a = this.devices.get(idA);
|
|
9062
|
+
const b = this.devices.get(idB);
|
|
9063
|
+
if (a === void 0 || b === void 0 || sameIntegration(a, b)) return null;
|
|
9064
|
+
const bKeys = new Set(keysOf(b.identifiers));
|
|
9065
|
+
const keys = keysOf(a.identifiers).filter((k) => bKeys.has(k)).map(parseKey).filter((k) => k !== null).sort(compareKeys);
|
|
9066
|
+
const confidence = classifyIdentityMatch(keys);
|
|
9067
|
+
return confidence === null ? null : {
|
|
9068
|
+
a: sideOf(a),
|
|
9069
|
+
b: sideOf(b),
|
|
9070
|
+
keys,
|
|
9071
|
+
confidence
|
|
9072
|
+
};
|
|
9073
|
+
}
|
|
9074
|
+
/** True when the write was buffered for replay over a seed still in flight. */
|
|
9075
|
+
buffer(write) {
|
|
9076
|
+
if (this.pending === null) return false;
|
|
9077
|
+
this.pending.push(write);
|
|
9078
|
+
return true;
|
|
9079
|
+
}
|
|
9080
|
+
put(device) {
|
|
9081
|
+
this.drop(device.deviceId);
|
|
9082
|
+
this.devices.set(device.deviceId, device);
|
|
9083
|
+
for (const key of keysOf(device.identifiers)) {
|
|
9084
|
+
const members = this.byKey.get(key) ?? /* @__PURE__ */ new Set();
|
|
9085
|
+
members.add(device.deviceId);
|
|
9086
|
+
this.byKey.set(key, members);
|
|
9087
|
+
}
|
|
9088
|
+
}
|
|
9089
|
+
drop(deviceId) {
|
|
9090
|
+
const existing = this.devices.get(deviceId);
|
|
9091
|
+
if (existing === void 0) return;
|
|
9092
|
+
this.devices.delete(deviceId);
|
|
9093
|
+
for (const key of keysOf(existing.identifiers)) {
|
|
9094
|
+
const members = this.byKey.get(key);
|
|
9095
|
+
if (members === void 0) continue;
|
|
9096
|
+
members.delete(deviceId);
|
|
9097
|
+
if (members.size === 0) this.byKey.delete(key);
|
|
9098
|
+
}
|
|
9099
|
+
}
|
|
9100
|
+
};
|
|
9101
|
+
//#endregion
|
|
8895
9102
|
//#region src/builtins/device-manager/linked-devices-manual-backfill.ts
|
|
8896
9103
|
var LINKED_MANUAL_BACKFILL_MARKER_KEY = "_linkedDevicesManualBackfillVersion";
|
|
8897
9104
|
function planManualBackfill(params) {
|
|
@@ -10645,6 +10852,7 @@ function encodeDeviceRowPatch(patch) {
|
|
|
10645
10852
|
var DeviceRowStore = class {
|
|
10646
10853
|
backend;
|
|
10647
10854
|
logger;
|
|
10855
|
+
observer;
|
|
10648
10856
|
declared = null;
|
|
10649
10857
|
/** Call-site attribution for fleet reads. Armed only by
|
|
10650
10858
|
* `CAMSTACK_FLEET_READ_CENSUS_MS`; see `fleet-read-census.ts`. */
|
|
@@ -10659,9 +10867,10 @@ var DeviceRowStore = class {
|
|
|
10659
10867
|
get censusArmed() {
|
|
10660
10868
|
return this.census.armed;
|
|
10661
10869
|
}
|
|
10662
|
-
constructor(backend, logger, census) {
|
|
10870
|
+
constructor(backend, logger, census, observer) {
|
|
10663
10871
|
this.backend = backend;
|
|
10664
10872
|
this.logger = logger;
|
|
10873
|
+
this.observer = observer;
|
|
10665
10874
|
this.census = census ?? new FleetReadCensus(process.env["CAMSTACK_FLEET_READ_CENSUS_MS"], Date.now());
|
|
10666
10875
|
if (this.census.armed) {
|
|
10667
10876
|
const startedAt = Date.now();
|
|
@@ -10936,6 +11145,7 @@ var DeviceRowStore = class {
|
|
|
10936
11145
|
key: String(meta.id),
|
|
10937
11146
|
value: encodeDeviceRow(meta, extra)
|
|
10938
11147
|
});
|
|
11148
|
+
this.observer?.rowWritten(meta);
|
|
10939
11149
|
}
|
|
10940
11150
|
/**
|
|
10941
11151
|
* Write the named columns of an EXISTING row and nothing else.
|
|
@@ -10957,10 +11167,14 @@ var DeviceRowStore = class {
|
|
|
10957
11167
|
filter: { where: { id: String(deviceId) } },
|
|
10958
11168
|
data: columns
|
|
10959
11169
|
});
|
|
10960
|
-
if (updated === 0)
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
11170
|
+
if (updated === 0) {
|
|
11171
|
+
this.logger.warn("device row patch matched no row — the device was removed under it", {
|
|
11172
|
+
tags: { deviceId },
|
|
11173
|
+
meta: { columns: Object.keys(columns) }
|
|
11174
|
+
});
|
|
11175
|
+
return;
|
|
11176
|
+
}
|
|
11177
|
+
this.observer?.rowPatched(deviceId, patch);
|
|
10964
11178
|
}
|
|
10965
11179
|
/**
|
|
10966
11180
|
* Insert-or-update the registration columns. See {@link DeviceRegistrationRow}
|
|
@@ -10986,6 +11200,7 @@ var DeviceRowStore = class {
|
|
|
10986
11200
|
exportFingerprint: row.exportFingerprint
|
|
10987
11201
|
}
|
|
10988
11202
|
});
|
|
11203
|
+
this.observer?.registrationWritten(row);
|
|
10989
11204
|
}
|
|
10990
11205
|
/** Drop the device's row. Idempotent. */
|
|
10991
11206
|
/**
|
|
@@ -11085,6 +11300,7 @@ var DeviceRowStore = class {
|
|
|
11085
11300
|
collection: DEVICE_ROWS_COLLECTION,
|
|
11086
11301
|
key: String(deviceId)
|
|
11087
11302
|
});
|
|
11303
|
+
this.observer?.rowRemoved(deviceId);
|
|
11088
11304
|
}
|
|
11089
11305
|
/**
|
|
11090
11306
|
* The retirement door for the three blobs this collection replaced.
|
|
@@ -11369,17 +11585,62 @@ function persistableBlob(blob, policyFor) {
|
|
|
11369
11585
|
/**
|
|
11370
11586
|
* The part of a `restored` slice that may live on disk (D1024). A cap that
|
|
11371
11587
|
* names `restoredFields` keeps only those; every other restored cap keeps the
|
|
11372
|
-
* whole slice. One function for both directions — what is written and what the
|
|
11588
|
+
* whole slice; a renamed field is read under its new name. One function for both directions — what is written and what the
|
|
11373
11589
|
* boot seed reads back — so the two cannot drift.
|
|
11374
11590
|
*/
|
|
11375
11591
|
function restoredPart(slice, policy) {
|
|
11592
|
+
const current = withRenamedFields(slice, policy.renamedFields);
|
|
11376
11593
|
const names = policy.restoredFields;
|
|
11377
|
-
if (names === void 0) return
|
|
11594
|
+
if (names === void 0) return current;
|
|
11378
11595
|
const out = {};
|
|
11379
|
-
for (const name of names) if (name in
|
|
11596
|
+
for (const name of names) if (name in current) out[name] = current[name];
|
|
11380
11597
|
return out;
|
|
11381
11598
|
}
|
|
11382
11599
|
/**
|
|
11600
|
+
* A field the cap renamed (`restoredFieldRenames`, #459): a row persisted
|
|
11601
|
+
* before the rename carries the OLD key. It is read once into the new name —
|
|
11602
|
+
* only when the new one is absent, a value under the new name always wins — and
|
|
11603
|
+
* dropped, so no reader of the mirror ever meets the old key.
|
|
11604
|
+
*/
|
|
11605
|
+
function withRenamedFields(slice, renames) {
|
|
11606
|
+
const out = { ...slice };
|
|
11607
|
+
if (renames === void 0) return out;
|
|
11608
|
+
for (const [from, to] of Object.entries(renames)) {
|
|
11609
|
+
if (!(from in out)) continue;
|
|
11610
|
+
if (!(to in out)) out[to] = out[from];
|
|
11611
|
+
delete out[from];
|
|
11612
|
+
}
|
|
11613
|
+
return out;
|
|
11614
|
+
}
|
|
11615
|
+
/**
|
|
11616
|
+
* Read a whole stored row under the current field names (`restoredFieldRenames`).
|
|
11617
|
+
* Only the renames are applied — nothing is trimmed — so the worker that loads
|
|
11618
|
+
* the row is handed the same fields it would have got, under their new names.
|
|
11619
|
+
* `renamed` names the slices that still carry an old key on disk: the row must
|
|
11620
|
+
* be rewritten once, or the rename could never be retired.
|
|
11621
|
+
*/
|
|
11622
|
+
function upgradeRenamedFields(row, policyFor) {
|
|
11623
|
+
const blob = { ...row };
|
|
11624
|
+
const renamed = [];
|
|
11625
|
+
for (const [capName, slice] of Object.entries(row)) {
|
|
11626
|
+
if (capName === "$owned" || !isPlainRecord(slice)) continue;
|
|
11627
|
+
const renames = policyFor(capName).renamedFields;
|
|
11628
|
+
if (renames === void 0) continue;
|
|
11629
|
+
const legacy = {};
|
|
11630
|
+
for (const from of Object.keys(renames)) if (from in slice) legacy[from] = slice[from];
|
|
11631
|
+
if (Object.keys(legacy).length === 0) continue;
|
|
11632
|
+
blob[capName] = withRenamedFields(slice, renames);
|
|
11633
|
+
renamed.push({
|
|
11634
|
+
capName,
|
|
11635
|
+
legacy
|
|
11636
|
+
});
|
|
11637
|
+
}
|
|
11638
|
+
return {
|
|
11639
|
+
blob,
|
|
11640
|
+
renamed
|
|
11641
|
+
};
|
|
11642
|
+
}
|
|
11643
|
+
/**
|
|
11383
11644
|
* Are two slices the same, ignoring the fields the cap declared volatile?
|
|
11384
11645
|
*
|
|
11385
11646
|
* A volatile field is still WRITTEN — it simply does not, on its own, justify
|
|
@@ -12209,7 +12470,7 @@ var DeviceStateMirror = class {
|
|
|
12209
12470
|
const read = (async () => {
|
|
12210
12471
|
try {
|
|
12211
12472
|
const row = await settings.readDeviceRuntimeState(deviceId);
|
|
12212
|
-
this.
|
|
12473
|
+
this.seedMirrorFromRow(deviceId, row, settings);
|
|
12213
12474
|
this.seedRefusalLogged.delete(deviceId);
|
|
12214
12475
|
} catch (err) {
|
|
12215
12476
|
if (!this.seedRefusalLogged.has(deviceId)) {
|
|
@@ -12329,6 +12590,32 @@ var DeviceStateMirror = class {
|
|
|
12329
12590
|
this.writer.markPersisted(deviceId, persistableBlob(joinRuntimeBlob(split.native, split.owned, this.policyFor), this.policyFor));
|
|
12330
12591
|
}
|
|
12331
12592
|
/**
|
|
12593
|
+
* Seed from the device's STORED row (`fill`), and return the row read under
|
|
12594
|
+
* the current field names. A row that still carries a field under its
|
|
12595
|
+
* pre-rename name (`restoredFieldRenames`) is rewritten once: the baseline
|
|
12596
|
+
* keeps the old key — that is what disk holds — so the write is not skipped
|
|
12597
|
+
* as already persisted, and a write is armed even if nothing else changes.
|
|
12598
|
+
* Without it the old key would stay on disk and the rename could never be
|
|
12599
|
+
* retired.
|
|
12600
|
+
*/
|
|
12601
|
+
seedMirrorFromRow(deviceId, row, settings) {
|
|
12602
|
+
const upgraded = upgradeRenamedFields(row, this.policyFor);
|
|
12603
|
+
this.seedMirror(deviceId, this.withResetSessionProbe(upgraded.blob));
|
|
12604
|
+
if (upgraded.renamed.length === 0) return upgraded.blob;
|
|
12605
|
+
const baseline = { ...this.writer.persisted(deviceId) };
|
|
12606
|
+
for (const { capName, legacy } of upgraded.renamed) baseline[capName] = {
|
|
12607
|
+
...baseline[capName],
|
|
12608
|
+
...legacy
|
|
12609
|
+
};
|
|
12610
|
+
this.writer.markPersisted(deviceId, baseline);
|
|
12611
|
+
this.ctx.logger.info("stored runtime state carries a renamed field — rewriting the row once", {
|
|
12612
|
+
tags: { deviceId },
|
|
12613
|
+
meta: { caps: upgraded.renamed.map((r) => r.capName) }
|
|
12614
|
+
});
|
|
12615
|
+
this.writer.armOrHold(deviceId, settings);
|
|
12616
|
+
return upgraded.blob;
|
|
12617
|
+
}
|
|
12618
|
+
/**
|
|
12332
12619
|
* The hub mirror's `feature-probe.lastProbedAt` is a PER-SESSION liveness
|
|
12333
12620
|
* signal — it means "this worker process completed a probe THIS session".
|
|
12334
12621
|
* Persisted runtime state carries the PRE-RESTART timestamp, which is stale
|
|
@@ -13784,6 +14071,7 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
13784
14071
|
},
|
|
13785
14072
|
remoteNativeCaps: this.remoteNativeCaps,
|
|
13786
14073
|
seedMirror: (deviceId, blob, mode) => this.stateMirror.seedMirror(deviceId, blob, mode),
|
|
14074
|
+
seedMirrorFromRow: (deviceId, row, settings) => this.stateMirror.seedMirrorFromRow(deviceId, row, settings),
|
|
13787
14075
|
withResetSessionProbe: (blob) => this.stateMirror.withResetSessionProbe(blob),
|
|
13788
14076
|
get fieldClaims() {
|
|
13789
14077
|
return fieldClaims();
|
|
@@ -14021,7 +14309,8 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
14021
14309
|
};
|
|
14022
14310
|
const settingsStoreApi = this.ctx.api?.settingsStore;
|
|
14023
14311
|
if (!settingsStoreApi) throw new Error("[device-manager] settings-store API not available — refusing to serve a fleet it cannot persist");
|
|
14024
|
-
const
|
|
14312
|
+
const identityIndex = new DeviceIdentityIndex();
|
|
14313
|
+
const deviceRows = new DeviceRowStore(deviceRowBackendOf(settingsStoreApi), this.ctx.logger.child("rows"), void 0, identityIndex);
|
|
14025
14314
|
await deviceRows.declare();
|
|
14026
14315
|
this.deviceRows = deviceRows;
|
|
14027
14316
|
const records = this.ctx.records;
|
|
@@ -14084,6 +14373,7 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
14084
14373
|
const idToAddonId = metaStore.idToAddonId;
|
|
14085
14374
|
const bootRows = await deviceRows.listAll();
|
|
14086
14375
|
for (const row of bootRows) idToAddonId.set(row.meta.id, row.meta.addonId);
|
|
14376
|
+
identityIndex.seed(bootRows);
|
|
14087
14377
|
const stampIntegrationId$1 = (deviceId, integrationId) => stampIntegrationId(metaStore, this.ctx, deviceId, integrationId);
|
|
14088
14378
|
const templates = this.makeTemplateActions();
|
|
14089
14379
|
const pctx = {
|
|
@@ -14169,6 +14459,7 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
14169
14459
|
setRole: (input) => setRole(pctx, input),
|
|
14170
14460
|
setDisplay: (input) => setDisplay(pctx, input),
|
|
14171
14461
|
setIdentifiers: (input) => setIdentifiers(pctx, input),
|
|
14462
|
+
listIdentityCandidates: async () => identityIndex.candidates(),
|
|
14172
14463
|
getRoleDisplayDefaults: (input) => getRoleDisplayDefaults(pctx, input),
|
|
14173
14464
|
setRoleDisplayDefaults: (input) => setRoleDisplayDefaults(pctx, input),
|
|
14174
14465
|
applyInitialMeta: (input) => applyInitialMeta(pctx, input),
|
|
@@ -49,6 +49,11 @@ export interface ProviderHost {
|
|
|
49
49
|
*/
|
|
50
50
|
seedMirror(deviceId: number, blob: Record<string, unknown>, mode?: SeedMode): void;
|
|
51
51
|
/**
|
|
52
|
+
* Seed the mirror from a device's STORED row and return the row under the
|
|
53
|
+
* current field names; a row carrying a renamed field is rewritten once.
|
|
54
|
+
*/
|
|
55
|
+
seedMirrorFromRow(deviceId: number, row: Record<string, unknown>, settings: DeviceManagerSettings): Record<string, unknown>;
|
|
56
|
+
/**
|
|
52
57
|
* Drain the mirror's debounced writer on these devices and hold it off their
|
|
53
58
|
* rows until `release` — a migration swapping the rows must not race a write
|
|
54
59
|
* that read the pre-swap hardware's blob (D663).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChildLayout, CollectionColumn, CollectionIndex, DeviceDisplayOverride, DeviceIdentifiers, IScopedLogger, MutationFilter, QueryFilter, SettingsRecord, SettingsStoreClient } from "@camstack/types";
|
|
2
2
|
import type { RetiredRowStore } from "../sqlite-storage/retired-settings-keys.js";
|
|
3
3
|
import type { PersistedDeviceMeta } from "./device-meta-types.js";
|
|
4
|
+
import type { DeviceRowObserver } from "./device-identity-index.js";
|
|
4
5
|
import { FleetReadCensus } from "./fleet-read-census.js";
|
|
5
6
|
/**
|
|
6
7
|
* @durable class=ledger owner=device-manager
|
|
@@ -217,6 +218,8 @@ export declare function encodeDeviceRowPatch(patch: DeviceRowPatch): Record<stri
|
|
|
217
218
|
export declare class DeviceRowStore {
|
|
218
219
|
private readonly backend;
|
|
219
220
|
private readonly logger;
|
|
221
|
+
/** Told of every row write after it succeeded — the identifier index (planning#593). */
|
|
222
|
+
private readonly observer?;
|
|
220
223
|
private declared;
|
|
221
224
|
/** Call-site attribution for fleet reads. Armed only by
|
|
222
225
|
* `CAMSTACK_FLEET_READ_CENSUS_MS`; see `fleet-read-census.ts`. */
|
|
@@ -229,7 +232,7 @@ export declare class DeviceRowStore {
|
|
|
229
232
|
* zero cost while disarmed.
|
|
230
233
|
*/
|
|
231
234
|
get censusArmed(): boolean;
|
|
232
|
-
constructor(backend: DeviceRowBackend, logger: IScopedLogger, census?: FleetReadCensus);
|
|
235
|
+
constructor(backend: DeviceRowBackend, logger: IScopedLogger, census?: FleetReadCensus, observer?: DeviceRowObserver);
|
|
233
236
|
/**
|
|
234
237
|
* Lazy, idempotent `declareCollection`, memoised on the PROMISE so N
|
|
235
238
|
* concurrent first-callers issue one declaration rather than N. A rejection
|
|
@@ -199,6 +199,16 @@ export declare class DeviceStateMirror {
|
|
|
199
199
|
*/
|
|
200
200
|
seedMirror(deviceId: number, blob: Record<string, unknown>, mode?: SeedMode): void;
|
|
201
201
|
/**
|
|
202
|
+
* Seed from the device's STORED row (`fill`), and return the row read under
|
|
203
|
+
* the current field names. A row that still carries a field under its
|
|
204
|
+
* pre-rename name (`restoredFieldRenames`) is rewritten once: the baseline
|
|
205
|
+
* keeps the old key — that is what disk holds — so the write is not skipped
|
|
206
|
+
* as already persisted, and a write is armed even if nothing else changes.
|
|
207
|
+
* Without it the old key would stay on disk and the rename could never be
|
|
208
|
+
* retired.
|
|
209
|
+
*/
|
|
210
|
+
seedMirrorFromRow(deviceId: number, row: Record<string, unknown>, settings: DeviceManagerSettings): Record<string, unknown>;
|
|
211
|
+
/**
|
|
202
212
|
* The hub mirror's `feature-probe.lastProbedAt` is a PER-SESSION liveness
|
|
203
213
|
* signal — it means "this worker process completed a probe THIS session".
|
|
204
214
|
* Persisted runtime state carries the PRE-RESTART timestamp, which is stale
|
|
@@ -50,10 +50,29 @@ export declare function persistableBlob(blob: RuntimeStateBlob, policyFor: Runti
|
|
|
50
50
|
/**
|
|
51
51
|
* The part of a `restored` slice that may live on disk (D1024). A cap that
|
|
52
52
|
* names `restoredFields` keeps only those; every other restored cap keeps the
|
|
53
|
-
* whole slice. One function for both directions — what is written and what the
|
|
53
|
+
* whole slice; a renamed field is read under its new name. One function for both directions — what is written and what the
|
|
54
54
|
* boot seed reads back — so the two cannot drift.
|
|
55
55
|
*/
|
|
56
56
|
export declare function restoredPart(slice: Readonly<Record<string, unknown>>, policy: RuntimeStatePolicy): Record<string, unknown>;
|
|
57
|
+
/** A slice of a stored row that carried a field under its pre-rename name. */
|
|
58
|
+
export interface RenamedSlice {
|
|
59
|
+
readonly capName: string;
|
|
60
|
+
/** The old keys exactly as the row held them — what is still on disk. */
|
|
61
|
+
readonly legacy: Readonly<Record<string, unknown>>;
|
|
62
|
+
}
|
|
63
|
+
/** A stored row with every renamed field read under its new name. */
|
|
64
|
+
export interface UpgradedRow {
|
|
65
|
+
readonly blob: Record<string, unknown>;
|
|
66
|
+
readonly renamed: readonly RenamedSlice[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Read a whole stored row under the current field names (`restoredFieldRenames`).
|
|
70
|
+
* Only the renames are applied — nothing is trimmed — so the worker that loads
|
|
71
|
+
* the row is handed the same fields it would have got, under their new names.
|
|
72
|
+
* `renamed` names the slices that still carry an old key on disk: the row must
|
|
73
|
+
* be rewritten once, or the rename could never be retired.
|
|
74
|
+
*/
|
|
75
|
+
export declare function upgradeRenamedFields(row: Readonly<Record<string, unknown>>, policyFor: RuntimeStatePolicyLookup): UpgradedRow;
|
|
57
76
|
/**
|
|
58
77
|
* Are two slices the same, ignoring the fields the cap declared volatile?
|
|
59
78
|
*
|
|
@@ -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-BDciHA-9.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 {
|
|
1
|
+
import { fc as BaseAddon, ia as logDestinationCapability } from "../../dist-DLp5CYDy.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-BDciHA-9.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-C4odTE-a.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-CVwsY9u6.js");
|
|
10
|
+
const require_constants = require("../../constants-CLyC9O9i.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 { At as
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { At as KEYCHAIN_RESET_TRIGGER_ACTOR, Ji as keychainCapability, Mt as KeychainResetRecordSchema, Vl as normalizeSecretOwner, Wl as parseSecretRef, fc as BaseAddon, jt as KeychainAuditEntrySchema, ml as defineRecordKinds, mu as EventCategory, qi as keychainAdminCapability, yl as formatSecretScope } from "../../dist-DLp5CYDy.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-BJ714blt.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-D_FBo1b1.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-DMeh8SL7.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-BDciHA-9.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 {
|
|
1
|
+
import { $t as RECORDING_SOURCE_CAMSTACK_ADDON, ca as mayWriteToLocation, fc as BaseAddon, fu as errMsg, ll as createEvent, mu as EventCategory, nn as RecordingStatusSchema } from "../../dist-DLp5CYDy.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-BDciHA-9.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-C4odTE-a.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");
|