@camstack/system 1.2.456 → 1.2.457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +96 -10
- package/dist/addon-runner.mjs +96 -10
- package/dist/{agent-https-fm4AR8XL.mjs → agent-https-CK9Z4sSR.mjs} +2 -2
- package/dist/{agent-https-yjxdfJDA.js → agent-https-CoyOZ3pC.js} +2 -2
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +2 -2
- package/dist/builtins/alerts/alerts.addon.mjs +2 -2
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/console-destination.d.ts +1 -2
- package/dist/builtins/console-logging/index.js +1 -4
- package/dist/builtins/console-logging/index.mjs +1 -4
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/capture/capture-engine.d.ts +6 -0
- package/dist/builtins/device-history/device-history.addon.js +441 -83
- package/dist/builtins/device-history/device-history.addon.mjs +441 -83
- package/dist/builtins/device-history/query/history-query.d.ts +35 -9
- package/dist/builtins/device-history/query/point-shape.d.ts +33 -0
- package/dist/builtins/device-history/retention/retention.d.ts +1 -1
- package/dist/builtins/device-history/rollup/rollup-engine.d.ts +2 -0
- package/dist/builtins/device-history/rollup/rollup-math.d.ts +6 -0
- package/dist/builtins/device-history/store/history-store.d.ts +7 -0
- package/dist/builtins/device-history/store/series-registry.d.ts +26 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +1 -2
- package/dist/builtins/hub-forwarder/index.js +1 -4
- package/dist/builtins/hub-forwarder/index.mjs +1 -4
- package/dist/builtins/keychain/index.js +4 -4
- package/dist/builtins/keychain/index.mjs +4 -4
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +3 -3
- package/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +323 -7
- package/dist/builtins/loki-logging/index.mjs +323 -7
- package/dist/builtins/loki-logging/loki-destination.d.ts +20 -3
- package/dist/builtins/loki-logging/loki-read.d.ts +51 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js +290 -112
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +290 -112
- package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +106 -35
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/dist/builtins/storage-orchestrator/location-history-recorder.d.ts +76 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +9 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +144 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +144 -1
- package/dist/builtins/system-config/system-config.addon.js +3 -3
- package/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/dist/builtins/winston-logging/index.js +165 -3
- package/dist/builtins/winston-logging/index.mjs +165 -3
- package/dist/builtins/winston-logging/log-file-cursor.d.ts +12 -0
- package/dist/builtins/winston-logging/log-file-index-store.d.ts +11 -0
- package/dist/builtins/winston-logging/log-file-index.d.ts +77 -0
- package/dist/builtins/winston-logging/log-file-read-client.d.ts +44 -0
- package/dist/builtins/winston-logging/log-file-read-protocol.d.ts +41 -0
- package/dist/builtins/winston-logging/log-file-read-worker.d.ts +1 -0
- package/dist/builtins/winston-logging/log-file-reader.d.ts +51 -0
- package/dist/builtins/winston-logging/winston-destination.d.ts +20 -2
- package/dist/{composition-sources-Ds0Vr6eD.mjs → composition-sources-B_jeZDRJ.mjs} +1 -1
- package/dist/{composition-sources-gB4coDJR.js → composition-sources-qKyvMAvc.js} +1 -1
- package/dist/{constants-CavyKfHZ.js → constants-B_X9cWEK.js} +1 -1
- package/dist/{constants-i5oD_gLB.mjs → constants-cxKcZRMi.mjs} +1 -1
- package/dist/{device-ca-qz1Pmeu1.mjs → device-ca-BB6nHAL5.mjs} +1 -1
- package/dist/{device-ca-bpoEr0zG.js → device-ca-CVK3YcR_.js} +1 -1
- package/dist/{dist-BpqA2CT0.js → dist-C89nqNnn.js} +471 -47
- package/dist/{dist-BSF_C8W2.mjs → dist-Dhux90yB.mjs} +454 -48
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-CHaGDzyz.mjs → hub-mdns-ciao-B8olZqqd.mjs} +2 -2
- package/dist/{hub-mdns-ciao-CZlZRxxA.js → hub-mdns-ciao-DB1Y9agt.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +135 -20
- package/dist/index.mjs +129 -21
- package/dist/kernel/config-schema.d.ts +5 -0
- package/dist/kernel/moleculer/accessory-prune-gate.d.ts +55 -0
- package/dist/log-file-read-protocol-B7M3X3bT.mjs +785 -0
- package/dist/log-file-read-protocol-D0WcLbIV.js +817 -0
- package/dist/log-file-read-worker.js +64 -0
- package/dist/log-file-read-worker.mjs +64 -0
- package/dist/log-read-filter-Bi066jwU.js +134 -0
- package/dist/log-read-filter-D7Ev3zm-.mjs +93 -0
- package/dist/logging/log-manager.d.ts +10 -6
- package/dist/logging/log-read-filter.d.ts +43 -0
- package/dist/{phase6-declare-gate-n-IZRklX.js → phase6-declare-gate-BO-_jLh_.js} +1 -1
- package/dist/{phase6-declare-gate-B4yfsf2n.mjs → phase6-declare-gate-x9ZCbQJP.mjs} +1 -1
- package/dist/{restore-archive-B4QG7XmX.js → restore-archive-4DOUR5Gu.js} +1 -1
- package/dist/{restore-archive-BGUM4FKf.mjs → restore-archive-DyOaPeAr.mjs} +1 -1
- package/dist/{wal-maintenance-AerF4XE6.mjs → wal-maintenance-BMiX6UIa.mjs} +0 -0
- package/dist/{wal-maintenance-CNEs_I94.js → wal-maintenance-DVN-DiVP.js} +0 -0
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -5467,6 +5467,67 @@ function createChildrenBatchLoader(opts) {
|
|
|
5467
5467
|
} };
|
|
5468
5468
|
}
|
|
5469
5469
|
//#endregion
|
|
5470
|
+
//#region src/kernel/moleculer/accessory-prune-gate.ts
|
|
5471
|
+
function isSpecList(answer) {
|
|
5472
|
+
return Array.isArray(answer);
|
|
5473
|
+
}
|
|
5474
|
+
function classifyAccessoryRead(answer, ctx) {
|
|
5475
|
+
if (isSpecList(answer)) {
|
|
5476
|
+
if (!ctx.online) return {
|
|
5477
|
+
kind: "unknown",
|
|
5478
|
+
reason: "parent offline",
|
|
5479
|
+
children: answer
|
|
5480
|
+
};
|
|
5481
|
+
if (ctx.probedAt === 0) return {
|
|
5482
|
+
kind: "unknown",
|
|
5483
|
+
reason: "probe not yet completed",
|
|
5484
|
+
children: answer
|
|
5485
|
+
};
|
|
5486
|
+
return {
|
|
5487
|
+
kind: "successful",
|
|
5488
|
+
children: answer
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5491
|
+
if (answer.kind === "unknown") return {
|
|
5492
|
+
kind: "unknown",
|
|
5493
|
+
reason: answer.reason,
|
|
5494
|
+
children: answer.known ?? []
|
|
5495
|
+
};
|
|
5496
|
+
return {
|
|
5497
|
+
kind: "successful",
|
|
5498
|
+
children: answer.children
|
|
5499
|
+
};
|
|
5500
|
+
}
|
|
5501
|
+
/** One per parent registration; in-memory on purpose (a restart starts over — the safe direction). */
|
|
5502
|
+
var AccessoryShrinkGate = class {
|
|
5503
|
+
/** childId → the probe (`lastProbedAt`) of the first successful read that lacked it. */
|
|
5504
|
+
#firstMissing = /* @__PURE__ */ new Map();
|
|
5505
|
+
/**
|
|
5506
|
+
* `missing` = the managed children a SUCCESSFUL read no longer lists. Never
|
|
5507
|
+
* call this for an unknown read.
|
|
5508
|
+
*/
|
|
5509
|
+
decide(missing, probedAt) {
|
|
5510
|
+
const missingSet = new Set(missing);
|
|
5511
|
+
for (const id of [...this.#firstMissing.keys()]) if (!missingSet.has(id)) this.#firstMissing.delete(id);
|
|
5512
|
+
const prune = [];
|
|
5513
|
+
const deferred = [];
|
|
5514
|
+
for (const id of missing) {
|
|
5515
|
+
const first = this.#firstMissing.get(id);
|
|
5516
|
+
if (first !== void 0 && probedAt > first) {
|
|
5517
|
+
prune.push(id);
|
|
5518
|
+
this.#firstMissing.delete(id);
|
|
5519
|
+
continue;
|
|
5520
|
+
}
|
|
5521
|
+
if (first === void 0) this.#firstMissing.set(id, probedAt);
|
|
5522
|
+
deferred.push(id);
|
|
5523
|
+
}
|
|
5524
|
+
return {
|
|
5525
|
+
prune,
|
|
5526
|
+
deferred
|
|
5527
|
+
};
|
|
5528
|
+
}
|
|
5529
|
+
};
|
|
5530
|
+
//#endregion
|
|
5470
5531
|
//#region src/kernel/moleculer/runtime-state-load.ts
|
|
5471
5532
|
/** A device build refused because its runtime state could not be loaded. */
|
|
5472
5533
|
var RuntimeStateLoadError = class extends Error {
|
|
@@ -6200,6 +6261,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6200
6261
|
throw err;
|
|
6201
6262
|
}
|
|
6202
6263
|
const lifecycleHost = device;
|
|
6264
|
+
const shrinkGate = new AccessoryShrinkGate();
|
|
6203
6265
|
const runReconcile = async () => {
|
|
6204
6266
|
try {
|
|
6205
6267
|
await callDeviceManager(api, "registerDevice", {
|
|
@@ -6223,7 +6285,12 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6223
6285
|
});
|
|
6224
6286
|
}
|
|
6225
6287
|
if (typeof lifecycleHost.getAccessoryChildren !== "function") return;
|
|
6226
|
-
const
|
|
6288
|
+
const probedAt = device.runtimeState?.getCapState("feature-probe")?.lastProbedAt ?? 0;
|
|
6289
|
+
const read = classifyAccessoryRead(lifecycleHost.getAccessoryChildren(), {
|
|
6290
|
+
online: device.online,
|
|
6291
|
+
probedAt
|
|
6292
|
+
});
|
|
6293
|
+
const specs = read.children;
|
|
6227
6294
|
const expected = new Set(specs.map((s) => `${device.stableId}-${s.stableIdSuffix}`));
|
|
6228
6295
|
await runBounded(specs, ACCESSORY_SPAWN_CONCURRENCY, async (spec) => {
|
|
6229
6296
|
try {
|
|
@@ -6241,24 +6308,42 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6241
6308
|
});
|
|
6242
6309
|
}
|
|
6243
6310
|
});
|
|
6244
|
-
if (
|
|
6245
|
-
opts.logger.
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6311
|
+
if (read.kind === "unknown") {
|
|
6312
|
+
opts.logger.info("Accessory orphan reconciliation skipped — child list unknown", {
|
|
6313
|
+
tags: {
|
|
6314
|
+
deviceId: device.id,
|
|
6315
|
+
parentStableId: device.stableId
|
|
6316
|
+
},
|
|
6317
|
+
meta: {
|
|
6318
|
+
reason: read.reason,
|
|
6319
|
+
probedAt
|
|
6320
|
+
}
|
|
6321
|
+
});
|
|
6249
6322
|
return;
|
|
6250
6323
|
}
|
|
6251
6324
|
try {
|
|
6252
|
-
const
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6325
|
+
const missing = (await childrenLoader.load(device.id)).filter((child) => child.linkDeviceId === device.id && !expected.has(child.stableId));
|
|
6326
|
+
const decision = shrinkGate.decide(missing.map((child) => child.id), probedAt);
|
|
6327
|
+
if (decision.deferred.length > 0) opts.logger.info("Accessory children missing from a complete read — kept until a later probe agrees", {
|
|
6328
|
+
tags: {
|
|
6329
|
+
deviceId: device.id,
|
|
6330
|
+
parentStableId: device.stableId
|
|
6331
|
+
},
|
|
6332
|
+
meta: {
|
|
6333
|
+
childDeviceIds: [...decision.deferred],
|
|
6334
|
+
probedAt
|
|
6335
|
+
}
|
|
6336
|
+
});
|
|
6337
|
+
const confirmed = new Set(decision.prune);
|
|
6338
|
+
for (const child of missing) {
|
|
6339
|
+
if (!confirmed.has(child.id)) continue;
|
|
6256
6340
|
const live = registry.getById(child.id);
|
|
6257
6341
|
try {
|
|
6258
6342
|
if (live) await deviceApi.remove(child.id);
|
|
6259
6343
|
else await callDeviceManager(api, "removeDevice", { deviceId: child.id });
|
|
6260
6344
|
opts.logger.info("Removed orphan accessory child no longer in parent specs", {
|
|
6261
6345
|
tags: {
|
|
6346
|
+
deviceId: child.id,
|
|
6262
6347
|
parentDeviceId: device.id,
|
|
6263
6348
|
parentStableId: device.stableId
|
|
6264
6349
|
},
|
|
@@ -6271,6 +6356,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6271
6356
|
} catch (err) {
|
|
6272
6357
|
opts.logger.warn("Failed to remove orphan accessory child", {
|
|
6273
6358
|
tags: {
|
|
6359
|
+
deviceId: child.id,
|
|
6274
6360
|
parentDeviceId: device.id,
|
|
6275
6361
|
parentStableId: device.stableId,
|
|
6276
6362
|
childDeviceId: child.id
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -5443,6 +5443,67 @@ function createChildrenBatchLoader(opts) {
|
|
|
5443
5443
|
} };
|
|
5444
5444
|
}
|
|
5445
5445
|
//#endregion
|
|
5446
|
+
//#region src/kernel/moleculer/accessory-prune-gate.ts
|
|
5447
|
+
function isSpecList(answer) {
|
|
5448
|
+
return Array.isArray(answer);
|
|
5449
|
+
}
|
|
5450
|
+
function classifyAccessoryRead(answer, ctx) {
|
|
5451
|
+
if (isSpecList(answer)) {
|
|
5452
|
+
if (!ctx.online) return {
|
|
5453
|
+
kind: "unknown",
|
|
5454
|
+
reason: "parent offline",
|
|
5455
|
+
children: answer
|
|
5456
|
+
};
|
|
5457
|
+
if (ctx.probedAt === 0) return {
|
|
5458
|
+
kind: "unknown",
|
|
5459
|
+
reason: "probe not yet completed",
|
|
5460
|
+
children: answer
|
|
5461
|
+
};
|
|
5462
|
+
return {
|
|
5463
|
+
kind: "successful",
|
|
5464
|
+
children: answer
|
|
5465
|
+
};
|
|
5466
|
+
}
|
|
5467
|
+
if (answer.kind === "unknown") return {
|
|
5468
|
+
kind: "unknown",
|
|
5469
|
+
reason: answer.reason,
|
|
5470
|
+
children: answer.known ?? []
|
|
5471
|
+
};
|
|
5472
|
+
return {
|
|
5473
|
+
kind: "successful",
|
|
5474
|
+
children: answer.children
|
|
5475
|
+
};
|
|
5476
|
+
}
|
|
5477
|
+
/** One per parent registration; in-memory on purpose (a restart starts over — the safe direction). */
|
|
5478
|
+
var AccessoryShrinkGate = class {
|
|
5479
|
+
/** childId → the probe (`lastProbedAt`) of the first successful read that lacked it. */
|
|
5480
|
+
#firstMissing = /* @__PURE__ */ new Map();
|
|
5481
|
+
/**
|
|
5482
|
+
* `missing` = the managed children a SUCCESSFUL read no longer lists. Never
|
|
5483
|
+
* call this for an unknown read.
|
|
5484
|
+
*/
|
|
5485
|
+
decide(missing, probedAt) {
|
|
5486
|
+
const missingSet = new Set(missing);
|
|
5487
|
+
for (const id of [...this.#firstMissing.keys()]) if (!missingSet.has(id)) this.#firstMissing.delete(id);
|
|
5488
|
+
const prune = [];
|
|
5489
|
+
const deferred = [];
|
|
5490
|
+
for (const id of missing) {
|
|
5491
|
+
const first = this.#firstMissing.get(id);
|
|
5492
|
+
if (first !== void 0 && probedAt > first) {
|
|
5493
|
+
prune.push(id);
|
|
5494
|
+
this.#firstMissing.delete(id);
|
|
5495
|
+
continue;
|
|
5496
|
+
}
|
|
5497
|
+
if (first === void 0) this.#firstMissing.set(id, probedAt);
|
|
5498
|
+
deferred.push(id);
|
|
5499
|
+
}
|
|
5500
|
+
return {
|
|
5501
|
+
prune,
|
|
5502
|
+
deferred
|
|
5503
|
+
};
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
//#endregion
|
|
5446
5507
|
//#region src/kernel/moleculer/runtime-state-load.ts
|
|
5447
5508
|
/** A device build refused because its runtime state could not be loaded. */
|
|
5448
5509
|
var RuntimeStateLoadError = class extends Error {
|
|
@@ -6176,6 +6237,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6176
6237
|
throw err;
|
|
6177
6238
|
}
|
|
6178
6239
|
const lifecycleHost = device;
|
|
6240
|
+
const shrinkGate = new AccessoryShrinkGate();
|
|
6179
6241
|
const runReconcile = async () => {
|
|
6180
6242
|
try {
|
|
6181
6243
|
await callDeviceManager(api, "registerDevice", {
|
|
@@ -6199,7 +6261,12 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6199
6261
|
});
|
|
6200
6262
|
}
|
|
6201
6263
|
if (typeof lifecycleHost.getAccessoryChildren !== "function") return;
|
|
6202
|
-
const
|
|
6264
|
+
const probedAt = device.runtimeState?.getCapState("feature-probe")?.lastProbedAt ?? 0;
|
|
6265
|
+
const read = classifyAccessoryRead(lifecycleHost.getAccessoryChildren(), {
|
|
6266
|
+
online: device.online,
|
|
6267
|
+
probedAt
|
|
6268
|
+
});
|
|
6269
|
+
const specs = read.children;
|
|
6203
6270
|
const expected = new Set(specs.map((s) => `${device.stableId}-${s.stableIdSuffix}`));
|
|
6204
6271
|
await runBounded(specs, ACCESSORY_SPAWN_CONCURRENCY, async (spec) => {
|
|
6205
6272
|
try {
|
|
@@ -6217,24 +6284,42 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6217
6284
|
});
|
|
6218
6285
|
}
|
|
6219
6286
|
});
|
|
6220
|
-
if (
|
|
6221
|
-
opts.logger.
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6287
|
+
if (read.kind === "unknown") {
|
|
6288
|
+
opts.logger.info("Accessory orphan reconciliation skipped — child list unknown", {
|
|
6289
|
+
tags: {
|
|
6290
|
+
deviceId: device.id,
|
|
6291
|
+
parentStableId: device.stableId
|
|
6292
|
+
},
|
|
6293
|
+
meta: {
|
|
6294
|
+
reason: read.reason,
|
|
6295
|
+
probedAt
|
|
6296
|
+
}
|
|
6297
|
+
});
|
|
6225
6298
|
return;
|
|
6226
6299
|
}
|
|
6227
6300
|
try {
|
|
6228
|
-
const
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6301
|
+
const missing = (await childrenLoader.load(device.id)).filter((child) => child.linkDeviceId === device.id && !expected.has(child.stableId));
|
|
6302
|
+
const decision = shrinkGate.decide(missing.map((child) => child.id), probedAt);
|
|
6303
|
+
if (decision.deferred.length > 0) opts.logger.info("Accessory children missing from a complete read — kept until a later probe agrees", {
|
|
6304
|
+
tags: {
|
|
6305
|
+
deviceId: device.id,
|
|
6306
|
+
parentStableId: device.stableId
|
|
6307
|
+
},
|
|
6308
|
+
meta: {
|
|
6309
|
+
childDeviceIds: [...decision.deferred],
|
|
6310
|
+
probedAt
|
|
6311
|
+
}
|
|
6312
|
+
});
|
|
6313
|
+
const confirmed = new Set(decision.prune);
|
|
6314
|
+
for (const child of missing) {
|
|
6315
|
+
if (!confirmed.has(child.id)) continue;
|
|
6232
6316
|
const live = registry.getById(child.id);
|
|
6233
6317
|
try {
|
|
6234
6318
|
if (live) await deviceApi.remove(child.id);
|
|
6235
6319
|
else await callDeviceManager(api, "removeDevice", { deviceId: child.id });
|
|
6236
6320
|
opts.logger.info("Removed orphan accessory child no longer in parent specs", {
|
|
6237
6321
|
tags: {
|
|
6322
|
+
deviceId: child.id,
|
|
6238
6323
|
parentDeviceId: device.id,
|
|
6239
6324
|
parentStableId: device.stableId
|
|
6240
6325
|
},
|
|
@@ -6247,6 +6332,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6247
6332
|
} catch (err) {
|
|
6248
6333
|
opts.logger.warn("Failed to remove orphan accessory child", {
|
|
6249
6334
|
tags: {
|
|
6335
|
+
deviceId: child.id,
|
|
6250
6336
|
parentDeviceId: device.id,
|
|
6251
6337
|
parentStableId: device.stableId,
|
|
6252
6338
|
childDeviceId: child.id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ki as defineRecordKinds } from "./dist-Dhux90yB.mjs";
|
|
2
2
|
import { S as backdatedNotBefore, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-DK__ETIe.mjs";
|
|
3
|
-
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-
|
|
3
|
+
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-cxKcZRMi.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-C89nqNnn.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-C4cOo48M.js");
|
|
4
|
-
const require_constants = require("./constants-
|
|
4
|
+
const require_constants = require("./constants-B_X9cWEK.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -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-C89nqNnn.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Oa as EventCategory, ni as BaseAddon, ti as errMsg, yt as addonPagesCapability } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-C89nqNnn.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Oa as EventCategory, ni as BaseAddon, ti as errMsg, xt as addonWidgetsCapability } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,9 +3,9 @@ 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-C89nqNnn.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_phase6_declare_gate = require("../../phase6-declare-gate-
|
|
8
|
+
const require_phase6_declare_gate = require("../../phase6-declare-gate-BO-_jLh_.js");
|
|
9
9
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
10
10
|
/**
|
|
11
11
|
* When does an alert open a new EPISODE, and which edge of it is announced?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as alertEpisodePayload, Hi as createEvent, Ki as defineRecordKinds, Oa as EventCategory, Sn as isAlertEpisodeSeverity, St as alertEpisodeId, i as AlertSchema, ni as BaseAddon, ti as errMsg, wt as alertsCapability, xn as isAlertEpisodeOpen } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-
|
|
3
|
+
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-x9ZCbQJP.mjs";
|
|
4
4
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
5
5
|
/**
|
|
6
6
|
* When does an alert open a new EPISODE, and which edge of it is announced?
|
|
@@ -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-C89nqNnn.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $i as isEvent, L as FIRST_LEVEL_MACRO_CLASSES, Oa as EventCategory, Ot as bareAddonId, ni as BaseAddon, rr as ptzAutotrackCapability, ti as errMsg } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,9 +3,9 @@ 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-C89nqNnn.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_restore_archive = require("../../restore-archive-
|
|
8
|
+
const require_restore_archive = require("../../restore-archive-4DOUR5Gu.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ca as toNodeId, Dt as backupCapability, Oa as EventCategory, Or as storageOccupancyCapability, Un as mayWriteToLocation, ni as BaseAddon, sa as nodePin } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-
|
|
3
|
+
import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-DyOaPeAr.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -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-C89nqNnn.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ki as defineRecordKinds, Pt as calendarsCapability, _ as CalendarPreferencesSchema, ni as BaseAddon } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.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-C89nqNnn.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ar as streamCatalogCapability, Cr as snapshotCapability, E as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ft as cameraGridLayoutCapability, Hi as createEvent, Oa as EventCategory, P as DeclaredDevices, Qr as DeviceFeature, Vr as buildFfmpegArgs, Wn as memoizePinnedFfmpeg, X as MOTION_CLOSE_AFTER_MS, Yt as declarationOwnerNodeId, Zi as hydrateSchema, ei as DeviceType, ni as BaseAddon, o as BaseDevice, qn as motionCapability, ti as errMsg } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
+
const require_dist = require("../../dist-C89nqNnn.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-qKyvMAvc.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { At as buildCapabilityLookup, Br as COMPOSER_ADDON_ID, Gr as compositionFeatureEnabled, Hi as createEvent, Hr as cloneStatefulExpressionMemory, Jr as compositionSourceKey, Kr as compositionItemFieldPath, Oa as EventCategory, P as DeclaredDevices, Rt as composerCapability, Ur as composedDeviceRef, Wr as composedDeviceStableId, Xr as disarmRoseMemory, Yr as createStatefulExpressionMemory, Zr as toExpressionValue, ei as DeviceType, er as planComposition, f as COMPOSED_ITEM_FIXED_FIELDS, ni as BaseAddon, o as BaseDevice, pn as expressionContainsBuiltinCall, qr as compositionSliceKey, r as ALL_CAPABILITY_DEFINITIONS, ti as errMsg, un as evaluateCompositionField, zt as compositionFieldKey } from "../../dist-Dhux90yB.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-B_jeZDRJ.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the rotating-file transport — ideal fallback when the Winston addon
|
|
6
6
|
* is disabled or unavailable (e.g. bare-bones agents, tests).
|
|
7
7
|
*/
|
|
8
|
-
import type { ILogDestination, LogEntry
|
|
8
|
+
import type { ILogDestination, LogEntry } from "@camstack/types";
|
|
9
9
|
interface ConsoleConfig {
|
|
10
10
|
/** Minimum log level to emit. Entries below this level are dropped. */
|
|
11
11
|
readonly level?: "debug" | "info" | "warn" | "error";
|
|
@@ -14,7 +14,6 @@ export declare class ConsoleDestination implements ILogDestination {
|
|
|
14
14
|
private minLevel;
|
|
15
15
|
initialize(config?: ConsoleConfig): Promise<void>;
|
|
16
16
|
write(entry: LogEntry): void;
|
|
17
|
-
query(_filter: LogFilter): Promise<readonly LogEntry[]>;
|
|
18
17
|
shutdown(): Promise<void>;
|
|
19
18
|
}
|
|
20
19
|
export {};
|
|
@@ -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-C89nqNnn.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -24,9 +24,6 @@ var ConsoleDestination = class {
|
|
|
24
24
|
else if (entry.level === "warn") console.warn(line);
|
|
25
25
|
else console.log(line);
|
|
26
26
|
}
|
|
27
|
-
async query(_filter) {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
27
|
async shutdown() {}
|
|
31
28
|
};
|
|
32
29
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -19,9 +19,6 @@ var ConsoleDestination = class {
|
|
|
19
19
|
else if (entry.level === "warn") console.warn(line);
|
|
20
20
|
else console.log(line);
|
|
21
21
|
}
|
|
22
|
-
async query(_filter) {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
22
|
async shutdown() {}
|
|
26
23
|
};
|
|
27
24
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
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-C89nqNnn.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-qKyvMAvc.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $t as describeComposableCaps, At as buildCapabilityLookup, Bi as collectSecretMarkerRefs, Bt as compositionSourceRefs, Gt as coreBlocksCapability, Ht as coreBlockComposition, Jn as normalizeCoreBlockWrite, Jr as compositionSourceKey, Ki as defineRecordKinds, P as DeclaredDevices, Pr as validateComposition, Ta as transformSecretWrite, Ur as composedDeviceRef, Ut as coreBlockIdFromAddonId, Vt as coreBlockAddonId, Wt as coreBlockSourceKind, Zi as hydrateSchema, dr as resolveCoreBlockFiles, er as planComposition, h as CORE_BLOCK_ADDON_PREFIX, ia as isSecretRefOwnedBy, m as CORE_BLOCKS_ADDON_ID, na as isSecretMarker, ni as BaseAddon, p as COMPOSER_RUNNER_ID, r as ALL_CAPABILITY_DEFINITIONS, sr as replacedFieldKeys, ti as errMsg, ur as resolveCoreBlockEntry, va as resolveSecretMarkers, xa as secretTreeFromSchema, y as CoreBlockSchema } from "../../dist-Dhux90yB.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
3
|
+
import { t as describeCompositionSources } from "../../composition-sources-B_jeZDRJ.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -52,6 +52,12 @@ export declare class CaptureEngine {
|
|
|
52
52
|
seed(): Promise<void>;
|
|
53
53
|
/** One `DeviceStateChanged`. Synchronous: the bus must never wait on us. */
|
|
54
54
|
handleState(deviceId: number, capName: string, slice: Readonly<Record<string, unknown>>, at: number): void;
|
|
55
|
+
/**
|
|
56
|
+
* The number a field contributes, or `null` (not a reading — never 0). An
|
|
57
|
+
* `enum` state becomes the ordinal of its value in the metric's list; a value
|
|
58
|
+
* the full list cannot take is refused and counted (`enum-overflow`).
|
|
59
|
+
*/
|
|
60
|
+
private readValue;
|
|
55
61
|
private consider;
|
|
56
62
|
private emit;
|
|
57
63
|
/** Emit every pending change whose capture floor has passed, stamped where the floor ended. */
|