@camstack/server 1.2.868 → 1.2.870
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/dist/api/trpc/generated-cap-mounts.js +2 -1
- package/dist/api/trpc/generated-cap-routers.js +79 -1
- package/package.json +12 -9
- 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 +9 -4
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +9 -4
- package/system/dist/builtins/core-blocks/remote-service.d.ts +5 -1
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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/drain-ratchet.d.ts +8 -0
- package/system/dist/builtins/storage-orchestrator/storage-drain-event-monitor.d.ts +63 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +14 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +152 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +152 -2
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- 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-BLvsM_9n.mjs → capture-engine-4BFlpvJV.mjs} +1 -1
- package/system/dist/{capture-engine-CZAoDA8f.js → capture-engine-DvcUjBD4.js} +1 -1
- package/system/dist/{composition-sources-cHTw-yaK.js → composition-sources-CWKwokvg.js} +1 -1
- package/system/dist/{composition-sources-C-JTlA-Z.mjs → composition-sources-DU-LtoTH.mjs} +1 -1
- package/system/dist/{constants-Ja04pgXN.js → constants-BHEbtnlN.js} +1 -1
- package/system/dist/{constants-z053G1cz.mjs → constants-C7shrFbd.mjs} +1 -1
- package/system/dist/{device-ca-CBH-uKco.js → device-ca-CRIb8o13.js} +1 -1
- package/system/dist/{device-ca-CenGkhrx.mjs → device-ca-DN7M71Qy.mjs} +1 -1
- package/system/dist/{dist-DxpO7T7_.mjs → dist-C_8yolmP.mjs} +706 -29
- package/system/dist/{dist-4s3KGwmo.js → dist-Co_TBjrT.js} +706 -29
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-DBlEsrOj.mjs → hub-identity-BoelHayw.mjs} +1 -1
- package/system/dist/{hub-identity-L6pLf8b7.js → hub-identity-D6YKdl9L.js} +1 -1
- package/system/dist/{hub-mdns-ciao-UkoNqaH4.js → hub-mdns-ciao-C7vrLh6K.js} +2 -2
- package/system/dist/{hub-mdns-ciao-Kd4Vk9zo.mjs → hub-mdns-ciao-CFIA6g7n.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-7TugpMtZ.js → legacy-integration-rows-door-D3JEzzQB.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-BZknuVEL.mjs → legacy-integration-rows-door-uKx33PTT.mjs} +1 -1
- package/system/dist/{rename-composition-block-B_E0FaEf.js → rename-composition-block-Bqk6u7Q6.js} +1 -1
- package/system/dist/{rename-composition-block-C0sgZZyJ.mjs → rename-composition-block-CvevOCur.mjs} +1 -1
- package/system/dist/{restore-archive-CyGsqv6W.mjs → restore-archive-BZ45H1RA.mjs} +1 -1
- package/system/dist/{restore-archive-QZmJfXLn.js → restore-archive-eHXLFCxW.js} +1 -1
- package/system/dist/{wal-maintenance-DvcEWip3.js → wal-maintenance-BHFm-B-H.js} +0 -0
- package/system/dist/{wal-maintenance-CJaRdr0b.mjs → wal-maintenance-D80Zkary.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-
|
|
1
|
+
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-C_8yolmP.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -4077,7 +4077,8 @@ function drainProgressOf(state, usedBytes, nowMs) {
|
|
|
4077
4077
|
startBytes: state.startBytes,
|
|
4078
4078
|
bytesRemaining,
|
|
4079
4079
|
drained: bytesRemaining <= 0,
|
|
4080
|
-
estimatedEmptyAtMs: rateBytesPerMs === null || bytesRemaining <= 0 ? null : nowMs + Math.ceil(bytesRemaining / rateBytesPerMs)
|
|
4080
|
+
estimatedEmptyAtMs: rateBytesPerMs === null || bytesRemaining <= 0 ? null : nowMs + Math.ceil(bytesRemaining / rateBytesPerMs),
|
|
4081
|
+
rateBytesPerMs
|
|
4081
4082
|
};
|
|
4082
4083
|
}
|
|
4083
4084
|
//#endregion
|
|
@@ -4456,6 +4457,91 @@ var StorageLocationBandMonitor = class {
|
|
|
4456
4457
|
}
|
|
4457
4458
|
};
|
|
4458
4459
|
//#endregion
|
|
4460
|
+
//#region src/builtins/storage-orchestrator/storage-drain-event-monitor.ts
|
|
4461
|
+
/**
|
|
4462
|
+
* StorageDrainEventMonitor — the operator-facing cadence for a drain's
|
|
4463
|
+
* progress (#538).
|
|
4464
|
+
*
|
|
4465
|
+
* A `drain` location (D385) and the pruning eviction that paces it (D386) ran
|
|
4466
|
+
* with no signal at all: an operator who put a disk into drain had to poll
|
|
4467
|
+
* `storage.listDrainProgress` by hand to learn it was still moving. This
|
|
4468
|
+
* decides WHEN a system event fires, not what it says — the sweep already
|
|
4469
|
+
* computed the figures (`drainProgressOf`); this only throttles them to the
|
|
4470
|
+
* cadence an operator can read without being paged every sweep.
|
|
4471
|
+
*
|
|
4472
|
+
* Two rules, no operator knob:
|
|
4473
|
+
*
|
|
4474
|
+
* - PROGRESS fires once immediately (drain start, or this process's first
|
|
4475
|
+
* sweep after a restart) and then at most once per `cadenceMs` — the named
|
|
4476
|
+
* constant {@link DRAIN_PROGRESS_EVENT_INTERVAL_MS}, 15 minutes.
|
|
4477
|
+
* - COMPLETE fires exactly once, the first sweep that reports the location
|
|
4478
|
+
* drained — never again for the same location until it drains again.
|
|
4479
|
+
*
|
|
4480
|
+
* A sweep whose occupancy read failed is NOT skipped: the sample's bytes/
|
|
4481
|
+
* rate/ETA are `null` (D393 — never folded to 0) and the cadence still
|
|
4482
|
+
* applies, so the operator sees "still draining, figures unknown" rather than
|
|
4483
|
+
* silence that reads as "the drain stopped reporting".
|
|
4484
|
+
*
|
|
4485
|
+
* Pure except for the injected clock — same shape as
|
|
4486
|
+
* `StorageLocationBandMonitor`, stateful across `observe()` calls, one
|
|
4487
|
+
* transition per sweep.
|
|
4488
|
+
*/
|
|
4489
|
+
/** No operator-facing rate knob (#538): the cadence is this one constant. */
|
|
4490
|
+
var DRAIN_PROGRESS_EVENT_INTERVAL_MS = 15 * 6e4;
|
|
4491
|
+
function toEvent(kind, sample) {
|
|
4492
|
+
return {
|
|
4493
|
+
kind,
|
|
4494
|
+
locationId: sample.locationId,
|
|
4495
|
+
locationName: sample.locationName,
|
|
4496
|
+
...sample.nodeId !== void 0 ? { nodeId: sample.nodeId } : {},
|
|
4497
|
+
bytesRemaining: sample.bytesRemaining,
|
|
4498
|
+
rateBytesPerMs: sample.rateBytesPerMs,
|
|
4499
|
+
estimatedEmptyAtMs: sample.estimatedEmptyAtMs
|
|
4500
|
+
};
|
|
4501
|
+
}
|
|
4502
|
+
var StorageDrainEventMonitor = class {
|
|
4503
|
+
cadenceMs;
|
|
4504
|
+
now;
|
|
4505
|
+
state = /* @__PURE__ */ new Map();
|
|
4506
|
+
constructor(cadenceMs = DRAIN_PROGRESS_EVENT_INTERVAL_MS, now = Date.now) {
|
|
4507
|
+
this.cadenceMs = cadenceMs;
|
|
4508
|
+
this.now = now;
|
|
4509
|
+
}
|
|
4510
|
+
/**
|
|
4511
|
+
* Observe one sweep of draining locations. A location missing from `samples`
|
|
4512
|
+
* (switched back to `readonly`/`active`, or deleted) drops its schedule
|
|
4513
|
+
* silently: a later re-drain starts a fresh "begin" event rather than
|
|
4514
|
+
* resuming the old cadence clock.
|
|
4515
|
+
*/
|
|
4516
|
+
observe(samples) {
|
|
4517
|
+
const nowMs = this.now();
|
|
4518
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4519
|
+
const out = [];
|
|
4520
|
+
for (const sample of samples) {
|
|
4521
|
+
seen.add(sample.locationId);
|
|
4522
|
+
const previous = this.state.get(sample.locationId);
|
|
4523
|
+
if (sample.drained) {
|
|
4524
|
+
if (previous?.completedEmitted !== true) {
|
|
4525
|
+
this.state.set(sample.locationId, {
|
|
4526
|
+
lastEmittedAtMs: nowMs,
|
|
4527
|
+
completedEmitted: true
|
|
4528
|
+
});
|
|
4529
|
+
out.push(toEvent("complete", sample));
|
|
4530
|
+
}
|
|
4531
|
+
continue;
|
|
4532
|
+
}
|
|
4533
|
+
if (!(previous === void 0 || nowMs - previous.lastEmittedAtMs >= this.cadenceMs)) continue;
|
|
4534
|
+
this.state.set(sample.locationId, {
|
|
4535
|
+
lastEmittedAtMs: nowMs,
|
|
4536
|
+
completedEmitted: false
|
|
4537
|
+
});
|
|
4538
|
+
out.push(toEvent("progress", sample));
|
|
4539
|
+
}
|
|
4540
|
+
for (const id of this.state.keys()) if (!seen.has(id)) this.state.delete(id);
|
|
4541
|
+
return out;
|
|
4542
|
+
}
|
|
4543
|
+
};
|
|
4544
|
+
//#endregion
|
|
4459
4545
|
//#region src/builtins/storage-orchestrator/location-history-recorder.ts
|
|
4460
4546
|
var LOCATION_HISTORY_NAMES = {
|
|
4461
4547
|
usedPercent: "location-used-percent",
|
|
@@ -4607,6 +4693,8 @@ var StorageOrchestratorAddon = class extends BaseAddon {
|
|
|
4607
4693
|
service = null;
|
|
4608
4694
|
pressureManager = null;
|
|
4609
4695
|
locationBandMonitor = new StorageLocationBandMonitor();
|
|
4696
|
+
/** Drain progress/completion cadence (#538) — a named constant, no operator knob. */
|
|
4697
|
+
drainEventMonitor = new StorageDrainEventMonitor();
|
|
4610
4698
|
/**
|
|
4611
4699
|
* How much of each location CamStack itself holds (D388).
|
|
4612
4700
|
*
|
|
@@ -5180,6 +5268,7 @@ var StorageOrchestratorAddon = class extends BaseAddon {
|
|
|
5180
5268
|
try {
|
|
5181
5269
|
await this.pressureManager.sweep();
|
|
5182
5270
|
await this.emitLocationBandEvents();
|
|
5271
|
+
this.emitDrainEvents();
|
|
5183
5272
|
} catch (err) {
|
|
5184
5273
|
this.ctxIfReady?.logger.warn("storage pressure sweep failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
5185
5274
|
} finally {
|
|
@@ -5350,6 +5439,67 @@ var StorageOrchestratorAddon = class extends BaseAddon {
|
|
|
5350
5439
|
return this.pressureManager?.drainProgressSnapshot() ?? [];
|
|
5351
5440
|
}
|
|
5352
5441
|
/**
|
|
5442
|
+
* Regular system events for drain and pruning progress (#538) — a progress
|
|
5443
|
+
* ping on the named cadence (plus on drain start), and the completion
|
|
5444
|
+
* event once a location empties.
|
|
5445
|
+
*
|
|
5446
|
+
* The sample set is the drain PLAN (`resolveDrainPlan`, which locations the
|
|
5447
|
+
* operator put into `drain`), not the progress snapshot: a sweep whose
|
|
5448
|
+
* occupancy read failed for a location is still draining and must still be
|
|
5449
|
+
* sampled, with `null` figures (D393 — never folded to 0), so the cadence
|
|
5450
|
+
* clock keeps ticking instead of restarting as if the drain had just begun.
|
|
5451
|
+
*/
|
|
5452
|
+
emitDrainEvents() {
|
|
5453
|
+
const svc = this.service;
|
|
5454
|
+
const ctx = this.ctxIfReady;
|
|
5455
|
+
if (!svc || !ctx) return;
|
|
5456
|
+
const plan = this.resolveDrainPlan();
|
|
5457
|
+
if (plan.length === 0) return;
|
|
5458
|
+
const byId = new Map(svc.listLocations().map((loc) => [loc.id, loc]));
|
|
5459
|
+
const progressById = new Map(this.drainProgress().map((p) => [p.locationId, p]));
|
|
5460
|
+
const samples = plan.map((entry) => {
|
|
5461
|
+
const loc = byId.get(entry.locationId);
|
|
5462
|
+
const progress = progressById.get(entry.locationId);
|
|
5463
|
+
if (progress === void 0) ctx.logger.debug("storage drain: no progress figures from this sweep — reporting unknown rather than 0", { meta: { locationId: entry.locationId } });
|
|
5464
|
+
return {
|
|
5465
|
+
locationId: entry.locationId,
|
|
5466
|
+
locationName: loc?.displayName ?? entry.locationId,
|
|
5467
|
+
...loc?.nodeId !== void 0 ? { nodeId: loc.nodeId } : {},
|
|
5468
|
+
bytesRemaining: progress?.bytesRemaining ?? null,
|
|
5469
|
+
rateBytesPerMs: progress?.rateBytesPerMs ?? null,
|
|
5470
|
+
estimatedEmptyAtMs: progress?.estimatedEmptyAtMs ?? null,
|
|
5471
|
+
drained: progress?.drained ?? false
|
|
5472
|
+
};
|
|
5473
|
+
});
|
|
5474
|
+
for (const event of this.drainEventMonitor.observe(samples)) {
|
|
5475
|
+
const category = event.kind === "complete" ? EventCategory.StorageDrainComplete : EventCategory.StorageDrainProgress;
|
|
5476
|
+
ctx.logger.info("storage drain: event", { meta: {
|
|
5477
|
+
locationId: event.locationId,
|
|
5478
|
+
kind: event.kind,
|
|
5479
|
+
bytesRemaining: event.bytesRemaining,
|
|
5480
|
+
rateBytesPerMs: event.rateBytesPerMs,
|
|
5481
|
+
estimatedEmptyAtMs: event.estimatedEmptyAtMs
|
|
5482
|
+
} });
|
|
5483
|
+
ctx.eventBus.emit({
|
|
5484
|
+
id: randomUUID(),
|
|
5485
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
5486
|
+
source: {
|
|
5487
|
+
type: "addon",
|
|
5488
|
+
id: this.ctx.id
|
|
5489
|
+
},
|
|
5490
|
+
category,
|
|
5491
|
+
data: {
|
|
5492
|
+
locationId: event.locationId,
|
|
5493
|
+
locationName: event.locationName,
|
|
5494
|
+
...event.nodeId !== void 0 ? { nodeId: event.nodeId } : {},
|
|
5495
|
+
bytesRemaining: event.bytesRemaining,
|
|
5496
|
+
rateBytesPerMs: event.rateBytesPerMs,
|
|
5497
|
+
estimatedEmptyAtMs: event.estimatedEmptyAtMs
|
|
5498
|
+
}
|
|
5499
|
+
});
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
/**
|
|
5353
5503
|
* What the provider's own schema declared secret, or `undefined` when this
|
|
5354
5504
|
* node has never heard from that provider. The distinction is the whole
|
|
5355
5505
|
* point — see `secretKeysForConfig`, which fails CLOSED on `undefined`.
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-Co_TBjrT.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_hub_identity = require("../../hub-identity-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-D6YKdl9L.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-BHEbtnlN.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-
|
|
2
|
+
import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-C_8yolmP.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
5
|
-
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
5
|
+
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-BoelHayw.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-C7shrFbd.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -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-Co_TBjrT.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-C_8yolmP.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-
|
|
1
|
+
import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-C_8yolmP.mjs";
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-Co_TBjrT.js");
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Il as errMsg, _s as compositionSourceKey } from "./dist-
|
|
1
|
+
import { Il as errMsg, _s as compositionSourceKey } from "./dist-C_8yolmP.mjs";
|
|
2
2
|
//#region src/builtins/shared/device-state-changed.ts
|
|
3
3
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
4
4
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-Co_TBjrT.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-
|
|
1
|
+
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-C_8yolmP.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|