@camstack/server 1.2.752 → 1.2.754
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 +16 -0
- package/dist/api/trpc/generated-cap-routers.js +10 -0
- package/dist/core/moleculer/moleculer.service.js +13 -1
- package/package.json +8 -8
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-Oc0Go3Gs.js → agent-https-B0bjQVfy.js} +1 -1
- package/system/dist/{agent-https-DoGV9jKg.mjs → agent-https-cxghRfum.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 +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +18 -22
- package/system/dist/builtins/composer/composer.addon.mjs +17 -21
- 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/composition-api.d.ts +4 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +232 -15
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +232 -15
- package/system/dist/builtins/core-blocks/running-proposal.d.ts +32 -0
- package/system/dist/builtins/device-history/device-history.addon.js +24 -23
- package/system/dist/builtins/device-history/device-history.addon.mjs +3 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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 +5 -1
- package/system/dist/builtins/snapshot/index.mjs +5 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +285 -285
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{retention-C-lijsmN.mjs → capture-engine-CfJdhMTH.mjs} +2 -246
- package/system/dist/{retention-WjI-Op7G.js → capture-engine-eRAebXP1.js} +1 -305
- package/system/dist/{composition-sources-Bxahhz4f.js → composition-sources-BvDYLpw_.js} +1 -1
- package/system/dist/{composition-sources-CzRiSzCV.mjs → composition-sources-ChtkMq1Q.mjs} +1 -1
- package/system/dist/{constants-uI6uXyjP.mjs → constants-CYNsr0lM.mjs} +1 -1
- package/system/dist/{constants-0rC5QY6i.js → constants-DkC9-VOa.js} +1 -1
- package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
- package/system/dist/{custom-action-registry-oHl1xltx.mjs → custom-action-registry-BIJZBObd.mjs} +37 -37
- package/system/dist/{device-ca-CL_Arugd.js → device-ca-BxInMpK2.js} +1 -1
- package/system/dist/{device-ca-D7TyMlsS.mjs → device-ca-CQg3PTnE.mjs} +1 -1
- package/system/dist/{dist-Iq3vrBOE.mjs → dist-C5eIFTMo.mjs} +752 -554
- package/system/dist/{dist-CYnRCUzN.js → dist-DFWnAzAY.js} +775 -553
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CNLYSVyJ.js → hub-mdns-ciao-BQDdPkPO.js} +2 -2
- package/system/dist/{hub-mdns-ciao-CvMKderb.mjs → hub-mdns-ciao-DW_g42El.mjs} +2 -2
- package/system/dist/index.js +9 -8
- package/system/dist/index.mjs +220 -219
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +10 -0
- package/system/dist/{restore-archive-vzWYLf6p.mjs → restore-archive-D8ZIN10X.mjs} +150 -150
- package/system/dist/{restore-archive-Dw04PiG5.js → restore-archive-DRjYgh6D.js} +1 -1
- package/system/dist/retention-B9l9TnGE.mjs +245 -0
- package/system/dist/retention-BNONb5X_.js +304 -0
- package/system/dist/{wal-maintenance-DQXiTaph.js → wal-maintenance-D0zSmIwJ.js} +0 -0
- package/system/dist/{wal-maintenance-BzTHorT2.mjs → wal-maintenance-xYk-FpJW.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -3,8 +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-
|
|
7
|
-
const
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-eRAebXP1.js");
|
|
8
|
+
const require_retention = require("../../retention-BNONb5X_.js");
|
|
8
9
|
let node_crypto = require("node:crypto");
|
|
9
10
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
10
11
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -191,7 +192,7 @@ var ProducerIngest = class {
|
|
|
191
192
|
}
|
|
192
193
|
/** A purged series leaves no rate-limit state behind. */
|
|
193
194
|
forgetSeries(series) {
|
|
194
|
-
this.lastAccepted.delete(
|
|
195
|
+
this.lastAccepted.delete(require_capture_engine.identityOf(series.key, series.subject, series.scope));
|
|
195
196
|
}
|
|
196
197
|
async declareSeries(callerAddonId, input) {
|
|
197
198
|
if (callerAddonId === null) throw new Error("declareSeries: the caller addon could not be identified");
|
|
@@ -220,7 +221,7 @@ var ProducerIngest = class {
|
|
|
220
221
|
if (subject.kind === "device") {
|
|
221
222
|
if (this.deps.optedOut().has(subject.deviceId)) return "opted-out";
|
|
222
223
|
const type = await this.deps.directory.ensure(subject.deviceId);
|
|
223
|
-
if (type === void 0 || !
|
|
224
|
+
if (type === void 0 || !require_capture_engine.isRealDeviceType(type)) return "not-a-real-device";
|
|
224
225
|
}
|
|
225
226
|
return null;
|
|
226
227
|
}
|
|
@@ -242,7 +243,7 @@ var ProducerIngest = class {
|
|
|
242
243
|
counters.refuse("out-of-range");
|
|
243
244
|
continue;
|
|
244
245
|
}
|
|
245
|
-
const identity =
|
|
246
|
+
const identity = require_capture_engine.identityOf(point.key, require_capture_engine.subjectIdOf(point.subject), point.scope);
|
|
246
247
|
const slot = this.lastAccepted.get(identity);
|
|
247
248
|
if (slot !== void 0 && point.ts >= slot.lastTs && point.ts < slot.nextDue - 1e3) {
|
|
248
249
|
addRefusal(refusals, point.key, "rate");
|
|
@@ -462,15 +463,15 @@ var BUCKET_MS = {
|
|
|
462
463
|
/** A key with more scopes than this is cut (a zone x class matrix, not a chart). */
|
|
463
464
|
var MAX_SCOPES = 50;
|
|
464
465
|
/** The power-meter series the energy key is derived from, meter first. */
|
|
465
|
-
var ENERGY_METER_KEY =
|
|
466
|
-
var ENERGY_POWER_KEY =
|
|
466
|
+
var ENERGY_METER_KEY = require_capture_engine.capSeriesKey("power-meter", "energy");
|
|
467
|
+
var ENERGY_POWER_KEY = require_capture_engine.capSeriesKey("power-meter", "power");
|
|
467
468
|
/**
|
|
468
469
|
* Series whose quantity is chosen per device (D944). Weather is not here:
|
|
469
470
|
* each weather field has its own quantity on the capability, and the catalog
|
|
470
471
|
* unit is that base. A past weather point stored in another unit cannot be
|
|
471
472
|
* rescaled — the unit at sample time was not kept.
|
|
472
473
|
*/
|
|
473
|
-
var DEVICE_QUANTITY_KEYS = new Set([
|
|
474
|
+
var DEVICE_QUANTITY_KEYS = new Set([require_capture_engine.capSeriesKey("numeric-sensor", "value"), require_capture_engine.capSeriesKey("meter", "value")]);
|
|
474
475
|
function retentionMsOf(tier, policy) {
|
|
475
476
|
if (tier === "raw") return policy.rawDays * require_retention.DAY_MS;
|
|
476
477
|
if (tier === "5m") return policy.fiveMinuteDays * require_retention.DAY_MS;
|
|
@@ -557,7 +558,7 @@ var HistoryQuery = class {
|
|
|
557
558
|
return out;
|
|
558
559
|
}
|
|
559
560
|
seriesOf(input) {
|
|
560
|
-
return this.deps.registry.forKeyAndSubject(input.key,
|
|
561
|
+
return this.deps.registry.forKeyAndSubject(input.key, require_capture_engine.subjectIdOf(input.subject)).filter((s) => input.scope === void 0 || s.scope === input.scope).toSorted((a, b) => a.scope.localeCompare(b.scope)).slice(0, MAX_SCOPES);
|
|
561
562
|
}
|
|
562
563
|
/** The tier to answer from and its reads. `noRaw`: the series has no raw rows to read. */
|
|
563
564
|
async choose(input, wanted, noRaw) {
|
|
@@ -629,7 +630,7 @@ var HistoryQuery = class {
|
|
|
629
630
|
/** The series energy is derived from for a device: the meter when it has one, else its power. */
|
|
630
631
|
energySource(subject) {
|
|
631
632
|
if (subject.kind !== "device") return null;
|
|
632
|
-
const subjectId =
|
|
633
|
+
const subjectId = require_capture_engine.subjectIdOf(subject);
|
|
633
634
|
const meter = this.deps.registry.find(ENERGY_METER_KEY, subjectId, "");
|
|
634
635
|
if (meter !== void 0) return {
|
|
635
636
|
series: meter,
|
|
@@ -678,7 +679,7 @@ var HistoryQuery = class {
|
|
|
678
679
|
const { registry } = this.deps;
|
|
679
680
|
const slices = /* @__PURE__ */ new Map();
|
|
680
681
|
const infos = [];
|
|
681
|
-
for (const s of registry.forSubject(
|
|
682
|
+
for (const s of registry.forSubject(require_capture_engine.subjectIdOf(subject))) {
|
|
682
683
|
const metric = registry.metric(s.key);
|
|
683
684
|
if (metric === void 0) continue;
|
|
684
685
|
const item = this.itemFields.get(s.key);
|
|
@@ -716,7 +717,7 @@ var HistoryQuery = class {
|
|
|
716
717
|
*/
|
|
717
718
|
async itemNaming(deviceId, item, scope, fixed, slices) {
|
|
718
719
|
const slice = await this.sliceOf(deviceId, item.capName, slices);
|
|
719
|
-
const list = slice === null ? void 0 :
|
|
720
|
+
const list = slice === null ? void 0 : require_capture_engine.readPath(slice, item.items.path);
|
|
720
721
|
const entry = Array.isArray(list) ? list.find((e) => isObject(e) && e[item.items.key] === scope) : void 0;
|
|
721
722
|
const rawLabel = entry !== void 0 && item.items.label !== void 0 ? entry[item.items.label] : void 0;
|
|
722
723
|
const label = typeof rawLabel === "string" && rawLabel.length > 0 ? rawLabel : scope;
|
|
@@ -726,7 +727,7 @@ var HistoryQuery = class {
|
|
|
726
727
|
};
|
|
727
728
|
return {
|
|
728
729
|
label,
|
|
729
|
-
unit: entry === void 0 ? null :
|
|
730
|
+
unit: entry === void 0 ? null : require_capture_engine.readUnit(entry, item.spec.unitFrom)
|
|
730
731
|
};
|
|
731
732
|
}
|
|
732
733
|
sliceOf(deviceId, capName, slices) {
|
|
@@ -744,9 +745,9 @@ var HistoryQuery = class {
|
|
|
744
745
|
}
|
|
745
746
|
const spec = this.specOf(series.key);
|
|
746
747
|
if (spec?.unitFrom === void 0) return null;
|
|
747
|
-
const capName = series.key.slice(
|
|
748
|
+
const capName = series.key.slice(require_capture_engine.CAP_KEY_PREFIX.length, series.key.indexOf("."));
|
|
748
749
|
const slice = await this.sliceOf(subject.deviceId, capName, slices);
|
|
749
|
-
return slice === null ? null :
|
|
750
|
+
return slice === null ? null : require_capture_engine.readUnit(slice, spec.unitFrom);
|
|
750
751
|
}
|
|
751
752
|
quantityOf(deviceId) {
|
|
752
753
|
const pending = this.quantities.get(deviceId);
|
|
@@ -758,7 +759,7 @@ var HistoryQuery = class {
|
|
|
758
759
|
}
|
|
759
760
|
quantities = /* @__PURE__ */ new Map();
|
|
760
761
|
specOf(key) {
|
|
761
|
-
const body = key.slice(
|
|
762
|
+
const body = key.slice(require_capture_engine.CAP_KEY_PREFIX.length);
|
|
762
763
|
const dot = body.indexOf(".");
|
|
763
764
|
if (dot < 0) return void 0;
|
|
764
765
|
return this.deps.catalog[body.slice(0, dot)]?.[body.slice(dot + 1)];
|
|
@@ -769,7 +770,7 @@ function isObject(value) {
|
|
|
769
770
|
}
|
|
770
771
|
/** Series key → keyed-item field, for every item field of the catalog. */
|
|
771
772
|
function itemFieldsByKey(itemCatalog) {
|
|
772
|
-
return new Map(Object.entries(itemCatalog).flatMap(([capName, items]) => Object.entries(items.fields).map(([field, spec]) => [
|
|
773
|
+
return new Map(Object.entries(itemCatalog).flatMap(([capName, items]) => Object.entries(items.fields).map(([field, spec]) => [require_capture_engine.capItemSeriesKey(capName, items, field), {
|
|
773
774
|
capName,
|
|
774
775
|
items,
|
|
775
776
|
spec
|
|
@@ -2270,8 +2271,8 @@ var HistoryRuntime = class {
|
|
|
2270
2271
|
const { logger, clock, catalog, itemCatalog } = deps;
|
|
2271
2272
|
this.startedAt = clock();
|
|
2272
2273
|
this.store = new HistoryStore(deps.door);
|
|
2273
|
-
this.registry = new
|
|
2274
|
-
this.directory = new
|
|
2274
|
+
this.registry = new require_capture_engine.SeriesRegistry(this.store);
|
|
2275
|
+
this.directory = new require_capture_engine.DeviceDirectory(deps.deviceSource, this.counters, logger, clock);
|
|
2275
2276
|
this.rollup = new RollupEngine({
|
|
2276
2277
|
store: this.store,
|
|
2277
2278
|
registry: this.registry,
|
|
@@ -2289,7 +2290,7 @@ var HistoryRuntime = class {
|
|
|
2289
2290
|
onDropped: (dropped) => this.capture.forget(dropped)
|
|
2290
2291
|
});
|
|
2291
2292
|
const optedOut = () => this.optedOutDevices;
|
|
2292
|
-
this.capture = new
|
|
2293
|
+
this.capture = new require_capture_engine.CaptureEngine({
|
|
2293
2294
|
catalog,
|
|
2294
2295
|
itemCatalog,
|
|
2295
2296
|
registry: this.registry,
|
|
@@ -2348,7 +2349,7 @@ var HistoryRuntime = class {
|
|
|
2348
2349
|
registry: this.registry,
|
|
2349
2350
|
departures: this.departures,
|
|
2350
2351
|
retention: this.retentionJob,
|
|
2351
|
-
declaredCapKeys: new Set(
|
|
2352
|
+
declaredCapKeys: new Set(require_capture_engine.catalogMetrics(catalog, itemCatalog, 0).map((m) => m.key)),
|
|
2352
2353
|
logger,
|
|
2353
2354
|
clock
|
|
2354
2355
|
});
|
|
@@ -2356,7 +2357,7 @@ var HistoryRuntime = class {
|
|
|
2356
2357
|
async prepare() {
|
|
2357
2358
|
await this.store.declare();
|
|
2358
2359
|
await this.registry.load();
|
|
2359
|
-
for (const metric of
|
|
2360
|
+
for (const metric of require_capture_engine.catalogMetrics(this.deps.catalog, this.deps.itemCatalog, this.deps.clock())) await this.registry.declareMetric(metric);
|
|
2360
2361
|
this.optedOutDevices = await this.store.loadOptOuts();
|
|
2361
2362
|
await this.departures.load();
|
|
2362
2363
|
await this.directory.refresh();
|
|
@@ -2390,7 +2391,7 @@ var HistoryRuntime = class {
|
|
|
2390
2391
|
}
|
|
2391
2392
|
async scaleMatching(key, deviceId, factor, legacyMax, migrationId) {
|
|
2392
2393
|
if (await this.store.scaleApplied(migrationId)) return;
|
|
2393
|
-
const subject = deviceId === void 0 ? void 0 :
|
|
2394
|
+
const subject = deviceId === void 0 ? void 0 : require_capture_engine.subjectIdOf({
|
|
2394
2395
|
kind: "device",
|
|
2395
2396
|
deviceId
|
|
2396
2397
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Co as wattMillisecondsToKwh, Es as historyUnitFor, Ms as isReadingQuantity, ar as deviceHistoryCapability, cr as deviceRunsCapability, ct as HISTORY_CATALOG, dc as EventCategory, hn as armRemovalReconcile, lc as DeviceType, lt as HISTORY_ITEM_CATALOG, q as DeviceRunSchema, sr as deviceRemovalHookCapability, wo as BaseAddon, xs as emitReadiness, ys as defineRecordKinds, z as DEVICE_HISTORY_ENERGY_KEY } from "../../dist-C5eIFTMo.mjs";
|
|
2
|
+
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-CfJdhMTH.mjs";
|
|
3
|
+
import { a as FIVE_MINUTES_MS, c as bucketEndOf, i as DAY_MS, l as bucketStartOf, n as RetentionJob, o as HOUR_MS, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo } from "../../retention-B9l9TnGE.mjs";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
4
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
5
6
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -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-DFWnAzAY.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dr as formatMinutes, F as DAY_NAMES, Fs as isSecretMarker, Is as isSecretMarkerLike, J as DeviceStatusSchema, Kn as createDeviceExtensionProvider, Ns as isSecretClear, Oi as parseStreamParamsFormPatch, On as canonicalIconKey, Qo as SECRET_CLEAR, Qs as secretTreeFromPaths, Tn as buildStreamParamsConfigSchema, Ut as STREAM_PROFILE_META, X as DiscoveryProposalBodySchema, Xs as resolveSecretMarkers, Y as DeviceTombstoneSchema, Yr as legacyAutoLinkIds, _r as expandContainer, aa as runtimeStatePolicyFor, ac as userError, at as FieldClaimModeSchema, cc as DeviceRole, dc as EventCategory, ei as locationIconKey, er as defineExtensionSlotProvider, fr as enumerateItemArrayFields, g as CAMERA_SWITCH_ORDER, ga as siteZoneKey, ic as transformSecretWrite, ir as deviceExtensionCapability, js as isKeychainStoredField, ks as isDeviceConfigCap, lc as DeviceType, lr as deviceStateCapability, o as ALL_CAPABILITY_DEFINITIONS, or as deviceManagerCapability, ot as FieldClaimSchema, pr as enumerateSchemaFields, ps as collectZodSecretPaths, rc as toSecretFieldView, rs as WELL_KNOWN_TAB_MAP, sc as DeviceFeature, tc as sleep$1, uc as errMsg, ur as deviceStatusCapability, v as CAP_NAMES_WITH_STATUS, wo as BaseAddon, xi as normalizeUnit, xt as MINUTES_PER_DAY, ys as defineRecordKinds } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
@@ -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-DFWnAzAY.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 { ri as logDestinationCapability, wo as BaseAddon } from "../../dist-C5eIFTMo.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,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-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-BxInMpK2.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_constants = require("../../constants-DkC9-VOa.js");
|
|
10
10
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
11
11
|
let node_crypto = require("node:crypto");
|
|
12
12
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { Cs as formatSecretScope, Jr as keychainCapability, Ks as parseSecretRef, Us as normalizeSecretOwner, _t as KeychainResetRecordSchema, dc as EventCategory, gt as KeychainAuditEntrySchema, ht as KEYCHAIN_RESET_TRIGGER_ACTOR, qr as keychainAdminCapability, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-C5eIFTMo.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-CQg3PTnE.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-CYNsr0lM.mjs";
|
|
5
5
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
6
6
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
7
7
|
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-DFWnAzAY.js");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Pt as RECORDING_SOURCE_CAMSTACK_ADDON, Rt as RecordingStatusSchema, dc as EventCategory, ms as createEvent, si as mayWriteToLocation, uc as errMsg, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import * as fsp from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { constants } from "node:fs";
|
|
@@ -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-DFWnAzAY.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-BxInMpK2.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,15 +1,15 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { A as CredentialTokenClaimsSchema,
|
|
2
|
+
import { A as CredentialTokenClaimsSchema, At as PreferenceDeviceIdSchema, Cn as buildDeviceEnrollmentLink, Dt as PREFERENCES_MAX_VALUE_BYTES, Er as formatDeviceRevoker, Fs as isSecretMarker, Jt as SsoBridgeClaimsSchema, Kt as ScopedTokenSchema, Ma as userManagementCapability, Mt as PreferenceValueSchema, R as DEVICE_ENROLLMENT_TTL_MS, Rs as makeSecretMarker, V as DEVICE_NONCE_TTL_MS, ac as userError, gn as authProviderCapability, jt as PreferenceNamespaceSchema, rn as UserRecordSchema, rr as deviceCredentialsCapability, tn as TokenScopeSchema, w as CREDENTIAL_TOKEN_AUDIENCE, wn as buildDeviceSignatureMessage, wo as BaseAddon, ys as defineRecordKinds, zr as isCredentialTokenPayload } from "../../dist-C5eIFTMo.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-CQg3PTnE.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
11
|
import * as path$1 from "node:path";
|
|
12
|
-
import * as fs
|
|
12
|
+
import * as fs from "node:fs";
|
|
13
13
|
//#region ../../node_modules/bcryptjs/index.js
|
|
14
14
|
/**
|
|
15
15
|
* The random implementation to use as a fallback.
|
|
@@ -11912,8 +11912,8 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
11912
11912
|
users: this.userManager,
|
|
11913
11913
|
dataDir: this.ctx.nodeDataDir,
|
|
11914
11914
|
fs: {
|
|
11915
|
-
exists: (filePath) => fs
|
|
11916
|
-
remove: (filePath) => fs
|
|
11915
|
+
exists: (filePath) => fs.existsSync(filePath),
|
|
11916
|
+
remove: (filePath) => fs.rmSync(filePath, { force: true })
|
|
11917
11917
|
},
|
|
11918
11918
|
logger: this.ctx.logger
|
|
11919
11919
|
});
|
|
@@ -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-DFWnAzAY.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-BQDdPkPO.js");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
let node_net = require("node:net");
|
|
8
8
|
let node_os = require("node:os");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $r as localNetworkCapability, Br as isDefaultAppConnectionEndpoint, Et as NetworkTunnelStartedDataSchema, Ir as isAppLinkBase, Ki as resolveAppConnections, Pa as validateCustomAddress, Pi as preconditionOf, Xi as resolveHubAddressRoles, _ as CAMSTACK_APP_LINK_ORIGIN, dc as EventCategory, dt as HUB_MDNS_TXT_KEYS, ea as resolveNotificationTapAddress, gs as defineAddonMigrations, jn as checkRoleAddress, ki as pickAppLinkHub, ma as shortHostname, uc as errMsg, ut as HUB_MDNS_SERVICE_TYPE, wo as BaseAddon } from "../../dist-C5eIFTMo.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 { 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 { 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-DW_g42El.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isIP } from "node:net";
|
|
6
6
|
import * as os$1 from "node:os";
|
|
@@ -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-DFWnAzAY.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 {
|
|
1
|
+
import { Fs as isSecretMarker, Lt as RecordIntegrationInstances, Pi as preconditionOf, Ps as isSecretFieldView, Wr as isSameAddonId, Zo as RevConflictError, gs as defineAddonMigrations, jr as integrationInstancesCapability, ri as logDestinationCapability, vn as bareAddonId, vs as defineEntryKind, wo as BaseAddon } from "../../dist-C5eIFTMo.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-DFWnAzAY.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as ROOT_BUCKET_KEY, Tr as foldSnapshotByFunction, Vi as reducePoints, dc as EventCategory, fi as metricsProviderCapability, ms as createEvent, nn as UNATTRIBUTED_BUCKET_KEY, qi as resolveBucketMs, uc as errMsg, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as os$1 from "node:os";
|
|
5
5
|
import { platform } from "node:os";
|
|
6
|
-
import * as fs
|
|
6
|
+
import * as fs from "node:fs";
|
|
7
7
|
import { constants, readFileSync } from "node:fs";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
//#region src/builtins/native-metrics/cgroup-memory.ts
|
|
@@ -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
|
|
1689
|
+
const meminfo = fs.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
|
|
1782
|
+
fs.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
|
|
1800
|
+
const data = fs.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
|
|
1831
|
+
const data = fs.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
|
|
1892
|
+
const raw = fs.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
|
|
1943
|
+
openFds = fs.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1944
1944
|
} catch {}
|
|
1945
1945
|
try {
|
|
1946
|
-
const match = fs
|
|
1946
|
+
const match = fs.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
|
|
1961
|
+
const data = fs.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-DFWnAzAY.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-
|
|
2
|
+
import { Ei as parseAcceleratorFactsJson, dc as EventCategory, dr as enumerateInferenceDevices, ji as platformProbeCapability, la as scoreRuntimes, uc as errMsg, wo as BaseAddon, xs as emitReadiness } from "../../dist-C5eIFTMo.mjs";
|
|
3
|
+
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-BW3OcrLD.mjs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
6
|
import * as os$1 from "node:os";
|
|
7
|
-
import * as fs
|
|
7
|
+
import * as fs from "node:fs";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
//#region src/builtins/platform-probe/accelerator-reprobe.ts
|
|
10
10
|
/**
|
|
@@ -492,14 +492,14 @@ var PlatformScorer = class {
|
|
|
492
492
|
if (nvidia) gpu = nvidia;
|
|
493
493
|
const listRenderNodes = () => {
|
|
494
494
|
try {
|
|
495
|
-
return fs
|
|
495
|
+
return fs.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
|
|
496
496
|
} catch {
|
|
497
497
|
return [];
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
500
|
const readDrmAttr = (node, attr) => {
|
|
501
501
|
try {
|
|
502
|
-
return fs
|
|
502
|
+
return fs.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
|
|
503
503
|
} catch {
|
|
504
504
|
return "";
|
|
505
505
|
}
|
|
@@ -525,12 +525,12 @@ var PlatformScorer = class {
|
|
|
525
525
|
}
|
|
526
526
|
const listDir = (p) => {
|
|
527
527
|
try {
|
|
528
|
-
return fs
|
|
528
|
+
return fs.readdirSync(p);
|
|
529
529
|
} catch {
|
|
530
530
|
return [];
|
|
531
531
|
}
|
|
532
532
|
};
|
|
533
|
-
const exists = (p) => fs
|
|
533
|
+
const exists = (p) => fs.existsSync(p);
|
|
534
534
|
if (!npu) {
|
|
535
535
|
const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
|
|
536
536
|
npu = classifyIntelNpu({
|
|
@@ -558,7 +558,7 @@ var PlatformScorer = class {
|
|
|
558
558
|
exists,
|
|
559
559
|
readFile: (p) => {
|
|
560
560
|
try {
|
|
561
|
-
return fs
|
|
561
|
+
return fs.readFileSync(p, "utf8");
|
|
562
562
|
} catch {
|
|
563
563
|
return "";
|
|
564
564
|
}
|
|
@@ -844,7 +844,7 @@ function jsonValue(text) {
|
|
|
844
844
|
function readPublishedAcceleratorFacts(filePath) {
|
|
845
845
|
let text;
|
|
846
846
|
try {
|
|
847
|
-
text = fs
|
|
847
|
+
text = fs.readFileSync(filePath, "utf8");
|
|
848
848
|
} catch {
|
|
849
849
|
return null;
|
|
850
850
|
}
|
|
@@ -859,7 +859,7 @@ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
|
|
|
859
859
|
const candidates = [];
|
|
860
860
|
if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
861
861
|
candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
862
|
-
for (const candidate of candidates) if (fs
|
|
862
|
+
for (const candidate of candidates) if (fs.existsSync(candidate)) return candidate;
|
|
863
863
|
return null;
|
|
864
864
|
}
|
|
865
865
|
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-DFWnAzAY.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 {
|
|
1
|
+
import { Po as InvalidRecordError, ec as secretViewsOf, ns as UnknownRecordKindError, wo as BaseAddon, zi as recordEntriesCapability } from "../../dist-C5eIFTMo.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-DFWnAzAY.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dc as EventCategory, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -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-DFWnAzAY.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");
|
|
@@ -1840,6 +1840,10 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
|
|
|
1840
1840
|
meta: { ageMs }
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
|
+
log.info("snapshot: soft miss — serving the cached frame", {
|
|
1844
|
+
tags: { deviceId },
|
|
1845
|
+
meta: { ageMs }
|
|
1846
|
+
});
|
|
1843
1847
|
return hit.data;
|
|
1844
1848
|
}
|
|
1845
1849
|
return null;
|