@camstack/server 1.2.848 → 1.2.850
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 +18 -0
- package/dist/api/trpc/generated-cap-routers.js +9 -0
- package/package.json +15 -11
- 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/actions-service.d.ts +13 -3
- package/system/dist/builtins/core-blocks/actions-store.d.ts +13 -7
- package/system/dist/builtins/core-blocks/actions-wiring.d.ts +10 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +0 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +132 -71
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +132 -71
- package/system/dist/builtins/core-blocks/scheduler/scheduler-service.d.ts +5 -1
- package/system/dist/builtins/core-blocks/scheduler/scheduler-wiring.d.ts +2 -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-aggregation.d.ts +0 -25
- package/system/dist/builtins/device-manager/device-manager.addon.d.ts +0 -25
- package/system/dist/builtins/device-manager/device-manager.addon.js +191 -7
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +191 -7
- package/system/dist/builtins/device-manager/export-name-fields.d.ts +39 -0
- package/system/dist/builtins/device-manager/transitions/transitions-wiring.d.ts +6 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +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-CLow73VK.js → capture-engine-BM9nGdvv.js} +1 -1
- package/system/dist/{capture-engine-BDgAg1_L.mjs → capture-engine-Bshtl7Kd.mjs} +1 -1
- package/system/dist/{composition-sources-Xb2YACrP.js → composition-sources-63HlIklt.js} +1 -1
- package/system/dist/{composition-sources-PCla-eR3.mjs → composition-sources-CYpKKHtf.mjs} +1 -1
- package/system/dist/{constants-Cjv1STtI.mjs → constants-15k32igK.mjs} +1 -1
- package/system/dist/{constants-Crx9nPwX.js → constants-lHbp6u7t.js} +1 -1
- package/system/dist/{device-ca-D5bhkYRx.mjs → device-ca-BmKBCV_4.mjs} +1 -1
- package/system/dist/{device-ca-jaJY-9dh.js → device-ca-aB_rFHhZ.js} +1 -1
- package/system/dist/{dist-D9G24tL4.js → dist-DNDhIlAe.js} +2884 -2489
- package/system/dist/{dist-CUB8zpv-.mjs → dist-DY7OGObz.mjs} +2861 -2478
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-0lAqqUXZ.mjs → hub-identity-BMz4OOYu.mjs} +1 -1
- package/system/dist/{hub-identity-D6Yzg92a.js → hub-identity-dcbGnvVX.js} +1 -1
- package/system/dist/{hub-mdns-ciao-dT75vFJK.mjs → hub-mdns-ciao-BOecE4tm.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-0vZomp05.js → hub-mdns-ciao-Y7YjcHQ4.js} +2 -2
- package/system/dist/index.js +36 -2505
- package/system/dist/index.mjs +36 -2505
- package/system/dist/kernel/bootstrap-config.d.ts +1 -2
- package/system/dist/kernel/capability-registry.d.ts +6 -2
- package/system/dist/{legacy-integration-rows-door-CkwpRASZ.mjs → legacy-integration-rows-door-87W9dzLF.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-V0HNtga9.js → legacy-integration-rows-door-BQKarbeM.js} +1 -1
- package/system/dist/migrations/hub/2026-11-12-drop-retired-storage-leftovers.d.ts +16 -0
- package/system/dist/{rename-composition-block-CKO6KFN4.mjs → rename-composition-block-DOzzdV9v.mjs} +1 -1
- package/system/dist/{rename-composition-block-CmNS12Yh.js → rename-composition-block-p_8C4nY4.js} +1 -1
- package/system/dist/{restore-archive-DRyTaAb5.js → restore-archive-Bc-Xm8TB.js} +1 -1
- package/system/dist/{restore-archive-Cp8P5gxb.mjs → restore-archive-TpUr6_kg.mjs} +1 -1
- package/system/dist/{wal-maintenance-CyW12mpW.mjs → wal-maintenance-CE7-afh9.mjs} +0 -0
- package/system/dist/{wal-maintenance-EJcAHbIL.js → wal-maintenance-auHpWNP7.js} +0 -0
- package/system/package.json +1 -1
- package/system/dist/kernel/legacy-config-yaml.d.ts +0 -37
|
@@ -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-DNDhIlAe.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
|
|
9
|
-
const require_rename_composition_block = require("../../rename-composition-block-
|
|
9
|
+
const require_rename_composition_block = require("../../rename-composition-block-p_8C4nY4.js");
|
|
10
10
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
11
11
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
12
12
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
@@ -2785,6 +2785,103 @@ function parseDerivedFormSettingsPatch(builderId, patch) {
|
|
|
2785
2785
|
return reducer.parsePatch(patch);
|
|
2786
2786
|
}
|
|
2787
2787
|
//#endregion
|
|
2788
|
+
//#region src/builtins/device-manager/export-name-fields.ts
|
|
2789
|
+
/**
|
|
2790
|
+
* The "Name on <platform>" field of the device Export tab, DERIVED from the `device-export` cap
|
|
2791
|
+
* (D1049): one text field per enabled export instance, read from
|
|
2792
|
+
* `listExposedDevices().exposedName` and written through `setExposedName`. No exporter writes
|
|
2793
|
+
* this field by hand; every exporter gets it the same way.
|
|
2794
|
+
*
|
|
2795
|
+
* Field key: `export-name:<addonId>:<instanceId>`. The patch router splits these keys off before
|
|
2796
|
+
* the exporter's own `applyDeviceSettingsPatch` sees the rest.
|
|
2797
|
+
*/
|
|
2798
|
+
var EXPORT_NAME_FIELD_PREFIX = "export-name:";
|
|
2799
|
+
var fieldKey = (addonId, instanceId) => `${EXPORT_NAME_FIELD_PREFIX}${addonId}:${instanceId}`;
|
|
2800
|
+
function nameField(addonId, instance, value) {
|
|
2801
|
+
const rule = instance.nameRule === void 0 ? "" : ` ${instance.nameRule}`;
|
|
2802
|
+
return {
|
|
2803
|
+
type: "text",
|
|
2804
|
+
key: fieldKey(addonId, instance.instanceId),
|
|
2805
|
+
label: `Name on ${instance.name}`,
|
|
2806
|
+
description: `What ${instance.name} calls this device. Leave empty to use the device name.${rule} Renaming updates the same device there; it is never added again.`,
|
|
2807
|
+
placeholder: "Device name",
|
|
2808
|
+
value
|
|
2809
|
+
};
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* The section of `instanceId`: the one whose id is the instance id or ends with `:<instanceId>`
|
|
2813
|
+
* (one section per instance), else the exporter's only section (one section for every instance).
|
|
2814
|
+
* With several sections and none naming the instance, the first holds it.
|
|
2815
|
+
*/
|
|
2816
|
+
function sectionIndexFor(sections, instanceId) {
|
|
2817
|
+
const named = sections.findIndex((s) => s.id === instanceId || s.id.endsWith(`:${instanceId}`));
|
|
2818
|
+
return named >= 0 ? named : 0;
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Add one name field per enabled instance to the exporter's own contribution — exposed or not,
|
|
2822
|
+
* so the name can be set in the same save that turns Expose on (the names are applied first).
|
|
2823
|
+
* Without a contribution there is no Export panel to hold the field, so nothing is added (the
|
|
2824
|
+
* device is not exported by this addon).
|
|
2825
|
+
*/
|
|
2826
|
+
async function withExportNameFields(contribution, provider, addonId, deviceId) {
|
|
2827
|
+
if (contribution === null || contribution.sections.length === 0) return contribution;
|
|
2828
|
+
const id = String(deviceId);
|
|
2829
|
+
const instances = (await provider.listInstances()).filter((i) => i.enabled);
|
|
2830
|
+
const sections = contribution.sections.map((s) => ({
|
|
2831
|
+
...s,
|
|
2832
|
+
fields: [...s.fields]
|
|
2833
|
+
}));
|
|
2834
|
+
for (const instance of instances) {
|
|
2835
|
+
const row = (await provider.listExposedDevices({ instanceId: instance.instanceId })).find((d) => d.deviceId === id);
|
|
2836
|
+
sections[sectionIndexFor(sections, instance.instanceId)]?.fields.unshift(nameField(addonId, instance, row?.exposedName ?? ""));
|
|
2837
|
+
}
|
|
2838
|
+
return {
|
|
2839
|
+
...contribution,
|
|
2840
|
+
sections
|
|
2841
|
+
};
|
|
2842
|
+
}
|
|
2843
|
+
/**
|
|
2844
|
+
* Split the derived name keys of `addonId` from the rest of a patch. A blank string or null
|
|
2845
|
+
* clears the name; any other non-string is refused by name, never read as "clear".
|
|
2846
|
+
*/
|
|
2847
|
+
function splitExportNamePatch(addonId, patch) {
|
|
2848
|
+
const prefix = `${EXPORT_NAME_FIELD_PREFIX}${addonId}:`;
|
|
2849
|
+
const names = [];
|
|
2850
|
+
const rest = {};
|
|
2851
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
2852
|
+
if (!key.startsWith(prefix)) {
|
|
2853
|
+
rest[key] = value;
|
|
2854
|
+
continue;
|
|
2855
|
+
}
|
|
2856
|
+
const instanceId = key.slice(prefix.length);
|
|
2857
|
+
if (value !== null && typeof value !== "string") throw new require_dist.ExportNameRefusedError(instanceId, "The name must be text.");
|
|
2858
|
+
names.push({
|
|
2859
|
+
instanceId,
|
|
2860
|
+
name: value === null || value.trim().length === 0 ? null : value
|
|
2861
|
+
});
|
|
2862
|
+
}
|
|
2863
|
+
return {
|
|
2864
|
+
names,
|
|
2865
|
+
rest
|
|
2866
|
+
};
|
|
2867
|
+
}
|
|
2868
|
+
/**
|
|
2869
|
+
* Write the names through the cap, all or none: every name is checked first (`dryRun`), so one
|
|
2870
|
+
* refusal (`export-name-refused: …`) propagates before ANY is written.
|
|
2871
|
+
*/
|
|
2872
|
+
async function applyExportNames(provider, deviceId, names) {
|
|
2873
|
+
const calls = names.map((edit) => ({
|
|
2874
|
+
instanceId: edit.instanceId,
|
|
2875
|
+
deviceId: String(deviceId),
|
|
2876
|
+
name: edit.name
|
|
2877
|
+
}));
|
|
2878
|
+
for (const call of calls) await provider.setExposedName({
|
|
2879
|
+
...call,
|
|
2880
|
+
dryRun: true
|
|
2881
|
+
});
|
|
2882
|
+
for (const call of calls) await provider.setExposedName(call);
|
|
2883
|
+
}
|
|
2884
|
+
//#endregion
|
|
2788
2885
|
//#region src/builtins/device-manager/device-online-fallback.ts
|
|
2789
2886
|
/**
|
|
2790
2887
|
* The value to hand `resolveDeviceOnline` as its fallback. The mirrored
|
|
@@ -3891,6 +3988,8 @@ async function getDeviceAggregate(deps, deviceId, kind) {
|
|
|
3891
3988
|
* `seenCaps` skips any system cap that already contributed via a binding so
|
|
3892
3989
|
* its section is never duplicated.
|
|
3893
3990
|
*/
|
|
3991
|
+
/** The system collection cap whose per-device panel carries the derived exported-name fields. */
|
|
3992
|
+
var DEVICE_EXPORT_CAP = "device-export";
|
|
3894
3993
|
async function collectSystemDeviceContributions(deps, deviceId, kind, seenCaps) {
|
|
3895
3994
|
const registry = deps.capabilityRegistry;
|
|
3896
3995
|
if (!registry) return [];
|
|
@@ -3913,7 +4012,22 @@ async function collectSystemDeviceContributions(deps, deviceId, kind, seenCaps)
|
|
|
3913
4012
|
addonId,
|
|
3914
4013
|
call: async () => {
|
|
3915
4014
|
const contribution = await read({ deviceId });
|
|
3916
|
-
|
|
4015
|
+
const shape = contribution ? toWireShape(contribution) : null;
|
|
4016
|
+
if (info.name !== DEVICE_EXPORT_CAP || kind !== "settings") return shape;
|
|
4017
|
+
const exporter = registry.getProviderByAddon(info.name, addonId);
|
|
4018
|
+
if (!exporter) return shape;
|
|
4019
|
+
try {
|
|
4020
|
+
return await withExportNameFields(shape, exporter, addonId, deviceId);
|
|
4021
|
+
} catch (err) {
|
|
4022
|
+
deps.ctx.logger.warn("device-manager: exported-name fields unavailable", {
|
|
4023
|
+
tags: { deviceId },
|
|
4024
|
+
meta: {
|
|
4025
|
+
addonId,
|
|
4026
|
+
error: err instanceof Error ? err.message : String(err)
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4029
|
+
return shape;
|
|
4030
|
+
}
|
|
3917
4031
|
}
|
|
3918
4032
|
});
|
|
3919
4033
|
})());
|
|
@@ -4466,9 +4580,21 @@ async function applyGroupPatchUnmarked(deps, deviceId, group) {
|
|
|
4466
4580
|
return;
|
|
4467
4581
|
}
|
|
4468
4582
|
if (!def?.exposesDeviceSettings) throw new Error(`[device-manager] cap "${group.writerCapName}" does not expose device settings`);
|
|
4469
|
-
|
|
4583
|
+
const provider = resolveContributionProvider(registry, def, group.writerCapName, group.writerAddonId, deviceId);
|
|
4584
|
+
let patch = group.patch;
|
|
4585
|
+
if (group.writerCapName === DEVICE_EXPORT_CAP) {
|
|
4586
|
+
const split = splitExportNamePatch(group.writerAddonId, patch);
|
|
4587
|
+
if (split.names.length > 0) {
|
|
4588
|
+
const exporter = registry.getProviderByAddon(DEVICE_EXPORT_CAP, group.writerAddonId);
|
|
4589
|
+
if (!exporter) throw new Error(`[device-manager] exporter "${group.writerAddonId}" is not available`);
|
|
4590
|
+
await applyExportNames(exporter, deviceId, split.names);
|
|
4591
|
+
patch = split.rest;
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
if (Object.keys(patch).length === 0) return;
|
|
4595
|
+
await provider.applyDeviceSettingsPatch({
|
|
4470
4596
|
deviceId,
|
|
4471
|
-
patch
|
|
4597
|
+
patch
|
|
4472
4598
|
});
|
|
4473
4599
|
}
|
|
4474
4600
|
async function listWrappersForCap(deps, input) {
|
|
@@ -12721,10 +12847,33 @@ function startDeviceTransitions(deps) {
|
|
|
12721
12847
|
send: (batch) => deps.record(batch),
|
|
12722
12848
|
logger: deps.logger
|
|
12723
12849
|
});
|
|
12850
|
+
const announce = (row) => {
|
|
12851
|
+
if (deps.onCommandSettled === void 0 || row.command === void 0) return;
|
|
12852
|
+
if (row.outcome === "device") return;
|
|
12853
|
+
const action = require_dist.vocabActionIdFor(row.capName, row.command.method, row.command.args);
|
|
12854
|
+
if (action === void 0) {
|
|
12855
|
+
deps.logger.debug(`device-transitions: ${row.capName}.${row.command.method} names no single vocabulary action; not announced`, { tags: { deviceId: row.deviceId } });
|
|
12856
|
+
return;
|
|
12857
|
+
}
|
|
12858
|
+
try {
|
|
12859
|
+
deps.onCommandSettled({
|
|
12860
|
+
deviceId: row.deviceId,
|
|
12861
|
+
action,
|
|
12862
|
+
outcome: row.outcome,
|
|
12863
|
+
actor: row.actor,
|
|
12864
|
+
at: row.at
|
|
12865
|
+
});
|
|
12866
|
+
} catch (err) {
|
|
12867
|
+
deps.logger.warn(`device-transitions: announcing a settled ${row.capName}.${row.command.method} failed: ${err instanceof Error ? err.message : String(err)}`, { tags: { deviceId: row.deviceId } });
|
|
12868
|
+
}
|
|
12869
|
+
};
|
|
12724
12870
|
const correlator = new TransitionCorrelator({
|
|
12725
12871
|
now,
|
|
12726
12872
|
currentSlice: (deviceId, capName) => deps.mirror.currentSlice(deviceId, capName),
|
|
12727
|
-
emit: (row) =>
|
|
12873
|
+
emit: (row) => {
|
|
12874
|
+
sender.enqueue(row);
|
|
12875
|
+
announce(row);
|
|
12876
|
+
},
|
|
12728
12877
|
prepareArgs: createCommandArgsPreparer(inputFor)
|
|
12729
12878
|
});
|
|
12730
12879
|
deps.mirror.setTransitionTap((deviceId, capName, prior, slice) => {
|
|
@@ -13182,6 +13331,31 @@ function createRemovalFence(options = {}) {
|
|
|
13182
13331
|
}
|
|
13183
13332
|
//#endregion
|
|
13184
13333
|
//#region src/builtins/device-manager/device-manager.addon.ts
|
|
13334
|
+
/**
|
|
13335
|
+
* Device Manager addon — hub-side singleton that unifies device persistence,
|
|
13336
|
+
* live registry queries, and all management operations into a single
|
|
13337
|
+
* tRPC-routable capability.
|
|
13338
|
+
*
|
|
13339
|
+
* Persistence strategy: all device data is stored via `ctx.settings`, the same
|
|
13340
|
+
* settings API every other addon uses. No raw SQLite access.
|
|
13341
|
+
*
|
|
13342
|
+
* Addon store layout:
|
|
13343
|
+
* deviceIndex → Record<addonId, stableId[]> (which devices exist per addon)
|
|
13344
|
+
* deviceMeta → Record<numericId, DeviceMeta> (keyed by numeric device id;
|
|
13345
|
+
* addonId + stableId are FIELDS on the record)
|
|
13346
|
+
*
|
|
13347
|
+
* Device store (per-device config):
|
|
13348
|
+
* readDeviceStore(numericDeviceId) → config blob
|
|
13349
|
+
* writeDeviceStore(numericDeviceId, patch)
|
|
13350
|
+
*
|
|
13351
|
+
* Live registry: resolved from the kernel capability registry after Phase 2.
|
|
13352
|
+
* This gives direct access to in-memory IDevice instances registered by provider addons.
|
|
13353
|
+
* The DeviceManagerAddon is the single owner of the live device operations API.
|
|
13354
|
+
*
|
|
13355
|
+
* Replaces:
|
|
13356
|
+
* - `device-persistence` capability (absorbed here)
|
|
13357
|
+
* - live operations previously served by `device-management.router.ts`
|
|
13358
|
+
*/
|
|
13185
13359
|
var DeviceManagerAddon = class extends require_dist.BaseAddon {
|
|
13186
13360
|
constructor() {
|
|
13187
13361
|
super({});
|
|
@@ -13568,7 +13742,17 @@ var DeviceManagerAddon = class extends require_dist.BaseAddon {
|
|
|
13568
13742
|
const api = this.ctx.api;
|
|
13569
13743
|
if (api === void 0) throw new Error("ctx.api not ready");
|
|
13570
13744
|
await api.deviceTransitions.record.mutate({ transitions: [...transitions] });
|
|
13571
|
-
}
|
|
13745
|
+
},
|
|
13746
|
+
onCommandSettled: (event) => this.ctx.eventBus.emit({
|
|
13747
|
+
id: (0, node_crypto.randomUUID)(),
|
|
13748
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
13749
|
+
source: {
|
|
13750
|
+
type: "device",
|
|
13751
|
+
id: event.deviceId
|
|
13752
|
+
},
|
|
13753
|
+
category: require_dist.EventCategory.DeviceCommandSettled,
|
|
13754
|
+
data: { ...event }
|
|
13755
|
+
})
|
|
13572
13756
|
});
|
|
13573
13757
|
this.fieldClaimsImpl = new FieldClaimsIndex({
|
|
13574
13758
|
logger: this.ctx.logger.child("claims-index"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $r as
|
|
1
|
+
import { $r as formatMinutes, Bn as buildStreamParamsConfigSchema, Ei as legacyAutoLinkIds, Er as deviceExtensionCapability, Fr as enumerateItemArrayFields, Gn as capAppliesToDeviceKind, Ic as isDeviceConfigCap, Ir as enumerateSchemaFields, J as DEVICE_TEMPLATE_MAX_OUTPUT, Ja as runtimeStatePolicyFor, Jn as checkDeviceAlias, K as DEVICE_TEMPLATE_FILTERS, L as DAY_NAMES, Mr as deviceStatusCapability, Oc as expandCapMethods$1, Or as deviceManagerCapability, Pc as isCommand$1, Qi as normalizeUnit, Qs as SECRET_CLEAR, Sa as reconcileReportedFeatures, Sl as errMsg$1, Ss as BaseAddon, Uc as isSecretMarker, Un as canonicalIconKey, Vc as isSecretClear, Vr as expandContainer, Wa as resolveTemplateRef, Wc as isSecretMarkerLike, Wn as canonicalStoredDeviceType, X as DEVICE_TEMPLATE_VALUES_CAP, _c as commandEffect, aa as parseStreamParamsFormPatch, b as CAP_NAMES_WITH_STATUS, bl as DeviceRole, dc as auditedFields, fl as toSecretFieldView, gc as collectZodSecretPaths$1, gt as FieldClaimSchema, hl as vocabActionIdFor, ht as FieldClaimModeSchema, ic as WELL_KNOWN_TAB_MAP, il as resolveSecretMarkers, ji as locationIconKey, jr as deviceStateCapability, jt as MINUTES_PER_DAY, k as ConditionMirror, ml as userError, mr as createDeviceExtensionProvider, nn as STREAM_PROFILE_META, nt as DeviceTombstoneSchema, pl as transformSecretWrite, q as DEVICE_TEMPLATE_MAX_LENGTH, qa as runtimeFieldUnit, rt as DiscoveryProposalBodySchema, s as ALL_CAPABILITY_DEFINITIONS, sl as secretTreeFromPaths, so as siteZoneKey, st as ExportNameRefusedError, ti as generateDeviceAlias, to as settleDeviceFeatures, tt as DeviceStatusSchema, ul as sleep$2, us as implementedMethodsOf$1, v as CAMERA_SWITCH_ORDER, vi as isKernelDerivedFeature, wc as defineRecordKinds, wl as EventCategory$1, xl as DeviceType$1, xr as defineExtensionSlotProvider, yl as DeviceFeature, zc as isKeychainStoredField } from "../../dist-DY7OGObz.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { a as redactLogText, i as redactLogMeta, n as isSecretArgumentKey } from "../../log-redactor-XLDrPzOi.mjs";
|
|
4
|
-
import { n as renameCompositionBlock, t as composedBlockIdOf } from "../../rename-composition-block-
|
|
4
|
+
import { n as renameCompositionBlock, t as composedBlockIdOf } from "../../rename-composition-block-DOzzdV9v.mjs";
|
|
5
5
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
6
6
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
7
7
|
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
@@ -2779,6 +2779,103 @@ function parseDerivedFormSettingsPatch(builderId, patch) {
|
|
|
2779
2779
|
return reducer.parsePatch(patch);
|
|
2780
2780
|
}
|
|
2781
2781
|
//#endregion
|
|
2782
|
+
//#region src/builtins/device-manager/export-name-fields.ts
|
|
2783
|
+
/**
|
|
2784
|
+
* The "Name on <platform>" field of the device Export tab, DERIVED from the `device-export` cap
|
|
2785
|
+
* (D1049): one text field per enabled export instance, read from
|
|
2786
|
+
* `listExposedDevices().exposedName` and written through `setExposedName`. No exporter writes
|
|
2787
|
+
* this field by hand; every exporter gets it the same way.
|
|
2788
|
+
*
|
|
2789
|
+
* Field key: `export-name:<addonId>:<instanceId>`. The patch router splits these keys off before
|
|
2790
|
+
* the exporter's own `applyDeviceSettingsPatch` sees the rest.
|
|
2791
|
+
*/
|
|
2792
|
+
var EXPORT_NAME_FIELD_PREFIX = "export-name:";
|
|
2793
|
+
var fieldKey = (addonId, instanceId) => `${EXPORT_NAME_FIELD_PREFIX}${addonId}:${instanceId}`;
|
|
2794
|
+
function nameField(addonId, instance, value) {
|
|
2795
|
+
const rule = instance.nameRule === void 0 ? "" : ` ${instance.nameRule}`;
|
|
2796
|
+
return {
|
|
2797
|
+
type: "text",
|
|
2798
|
+
key: fieldKey(addonId, instance.instanceId),
|
|
2799
|
+
label: `Name on ${instance.name}`,
|
|
2800
|
+
description: `What ${instance.name} calls this device. Leave empty to use the device name.${rule} Renaming updates the same device there; it is never added again.`,
|
|
2801
|
+
placeholder: "Device name",
|
|
2802
|
+
value
|
|
2803
|
+
};
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* The section of `instanceId`: the one whose id is the instance id or ends with `:<instanceId>`
|
|
2807
|
+
* (one section per instance), else the exporter's only section (one section for every instance).
|
|
2808
|
+
* With several sections and none naming the instance, the first holds it.
|
|
2809
|
+
*/
|
|
2810
|
+
function sectionIndexFor(sections, instanceId) {
|
|
2811
|
+
const named = sections.findIndex((s) => s.id === instanceId || s.id.endsWith(`:${instanceId}`));
|
|
2812
|
+
return named >= 0 ? named : 0;
|
|
2813
|
+
}
|
|
2814
|
+
/**
|
|
2815
|
+
* Add one name field per enabled instance to the exporter's own contribution — exposed or not,
|
|
2816
|
+
* so the name can be set in the same save that turns Expose on (the names are applied first).
|
|
2817
|
+
* Without a contribution there is no Export panel to hold the field, so nothing is added (the
|
|
2818
|
+
* device is not exported by this addon).
|
|
2819
|
+
*/
|
|
2820
|
+
async function withExportNameFields(contribution, provider, addonId, deviceId) {
|
|
2821
|
+
if (contribution === null || contribution.sections.length === 0) return contribution;
|
|
2822
|
+
const id = String(deviceId);
|
|
2823
|
+
const instances = (await provider.listInstances()).filter((i) => i.enabled);
|
|
2824
|
+
const sections = contribution.sections.map((s) => ({
|
|
2825
|
+
...s,
|
|
2826
|
+
fields: [...s.fields]
|
|
2827
|
+
}));
|
|
2828
|
+
for (const instance of instances) {
|
|
2829
|
+
const row = (await provider.listExposedDevices({ instanceId: instance.instanceId })).find((d) => d.deviceId === id);
|
|
2830
|
+
sections[sectionIndexFor(sections, instance.instanceId)]?.fields.unshift(nameField(addonId, instance, row?.exposedName ?? ""));
|
|
2831
|
+
}
|
|
2832
|
+
return {
|
|
2833
|
+
...contribution,
|
|
2834
|
+
sections
|
|
2835
|
+
};
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Split the derived name keys of `addonId` from the rest of a patch. A blank string or null
|
|
2839
|
+
* clears the name; any other non-string is refused by name, never read as "clear".
|
|
2840
|
+
*/
|
|
2841
|
+
function splitExportNamePatch(addonId, patch) {
|
|
2842
|
+
const prefix = `${EXPORT_NAME_FIELD_PREFIX}${addonId}:`;
|
|
2843
|
+
const names = [];
|
|
2844
|
+
const rest = {};
|
|
2845
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
2846
|
+
if (!key.startsWith(prefix)) {
|
|
2847
|
+
rest[key] = value;
|
|
2848
|
+
continue;
|
|
2849
|
+
}
|
|
2850
|
+
const instanceId = key.slice(prefix.length);
|
|
2851
|
+
if (value !== null && typeof value !== "string") throw new ExportNameRefusedError(instanceId, "The name must be text.");
|
|
2852
|
+
names.push({
|
|
2853
|
+
instanceId,
|
|
2854
|
+
name: value === null || value.trim().length === 0 ? null : value
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2857
|
+
return {
|
|
2858
|
+
names,
|
|
2859
|
+
rest
|
|
2860
|
+
};
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* Write the names through the cap, all or none: every name is checked first (`dryRun`), so one
|
|
2864
|
+
* refusal (`export-name-refused: …`) propagates before ANY is written.
|
|
2865
|
+
*/
|
|
2866
|
+
async function applyExportNames(provider, deviceId, names) {
|
|
2867
|
+
const calls = names.map((edit) => ({
|
|
2868
|
+
instanceId: edit.instanceId,
|
|
2869
|
+
deviceId: String(deviceId),
|
|
2870
|
+
name: edit.name
|
|
2871
|
+
}));
|
|
2872
|
+
for (const call of calls) await provider.setExposedName({
|
|
2873
|
+
...call,
|
|
2874
|
+
dryRun: true
|
|
2875
|
+
});
|
|
2876
|
+
for (const call of calls) await provider.setExposedName(call);
|
|
2877
|
+
}
|
|
2878
|
+
//#endregion
|
|
2782
2879
|
//#region src/builtins/device-manager/device-online-fallback.ts
|
|
2783
2880
|
/**
|
|
2784
2881
|
* The value to hand `resolveDeviceOnline` as its fallback. The mirrored
|
|
@@ -3885,6 +3982,8 @@ async function getDeviceAggregate(deps, deviceId, kind) {
|
|
|
3885
3982
|
* `seenCaps` skips any system cap that already contributed via a binding so
|
|
3886
3983
|
* its section is never duplicated.
|
|
3887
3984
|
*/
|
|
3985
|
+
/** The system collection cap whose per-device panel carries the derived exported-name fields. */
|
|
3986
|
+
var DEVICE_EXPORT_CAP = "device-export";
|
|
3888
3987
|
async function collectSystemDeviceContributions(deps, deviceId, kind, seenCaps) {
|
|
3889
3988
|
const registry = deps.capabilityRegistry;
|
|
3890
3989
|
if (!registry) return [];
|
|
@@ -3907,7 +4006,22 @@ async function collectSystemDeviceContributions(deps, deviceId, kind, seenCaps)
|
|
|
3907
4006
|
addonId,
|
|
3908
4007
|
call: async () => {
|
|
3909
4008
|
const contribution = await read({ deviceId });
|
|
3910
|
-
|
|
4009
|
+
const shape = contribution ? toWireShape(contribution) : null;
|
|
4010
|
+
if (info.name !== DEVICE_EXPORT_CAP || kind !== "settings") return shape;
|
|
4011
|
+
const exporter = registry.getProviderByAddon(info.name, addonId);
|
|
4012
|
+
if (!exporter) return shape;
|
|
4013
|
+
try {
|
|
4014
|
+
return await withExportNameFields(shape, exporter, addonId, deviceId);
|
|
4015
|
+
} catch (err) {
|
|
4016
|
+
deps.ctx.logger.warn("device-manager: exported-name fields unavailable", {
|
|
4017
|
+
tags: { deviceId },
|
|
4018
|
+
meta: {
|
|
4019
|
+
addonId,
|
|
4020
|
+
error: err instanceof Error ? err.message : String(err)
|
|
4021
|
+
}
|
|
4022
|
+
});
|
|
4023
|
+
return shape;
|
|
4024
|
+
}
|
|
3911
4025
|
}
|
|
3912
4026
|
});
|
|
3913
4027
|
})());
|
|
@@ -4460,9 +4574,21 @@ async function applyGroupPatchUnmarked(deps, deviceId, group) {
|
|
|
4460
4574
|
return;
|
|
4461
4575
|
}
|
|
4462
4576
|
if (!def?.exposesDeviceSettings) throw new Error(`[device-manager] cap "${group.writerCapName}" does not expose device settings`);
|
|
4463
|
-
|
|
4577
|
+
const provider = resolveContributionProvider(registry, def, group.writerCapName, group.writerAddonId, deviceId);
|
|
4578
|
+
let patch = group.patch;
|
|
4579
|
+
if (group.writerCapName === DEVICE_EXPORT_CAP) {
|
|
4580
|
+
const split = splitExportNamePatch(group.writerAddonId, patch);
|
|
4581
|
+
if (split.names.length > 0) {
|
|
4582
|
+
const exporter = registry.getProviderByAddon(DEVICE_EXPORT_CAP, group.writerAddonId);
|
|
4583
|
+
if (!exporter) throw new Error(`[device-manager] exporter "${group.writerAddonId}" is not available`);
|
|
4584
|
+
await applyExportNames(exporter, deviceId, split.names);
|
|
4585
|
+
patch = split.rest;
|
|
4586
|
+
}
|
|
4587
|
+
}
|
|
4588
|
+
if (Object.keys(patch).length === 0) return;
|
|
4589
|
+
await provider.applyDeviceSettingsPatch({
|
|
4464
4590
|
deviceId,
|
|
4465
|
-
patch
|
|
4591
|
+
patch
|
|
4466
4592
|
});
|
|
4467
4593
|
}
|
|
4468
4594
|
async function listWrappersForCap(deps, input) {
|
|
@@ -12714,10 +12840,33 @@ function startDeviceTransitions(deps) {
|
|
|
12714
12840
|
send: (batch) => deps.record(batch),
|
|
12715
12841
|
logger: deps.logger
|
|
12716
12842
|
});
|
|
12843
|
+
const announce = (row) => {
|
|
12844
|
+
if (deps.onCommandSettled === void 0 || row.command === void 0) return;
|
|
12845
|
+
if (row.outcome === "device") return;
|
|
12846
|
+
const action = vocabActionIdFor(row.capName, row.command.method, row.command.args);
|
|
12847
|
+
if (action === void 0) {
|
|
12848
|
+
deps.logger.debug(`device-transitions: ${row.capName}.${row.command.method} names no single vocabulary action; not announced`, { tags: { deviceId: row.deviceId } });
|
|
12849
|
+
return;
|
|
12850
|
+
}
|
|
12851
|
+
try {
|
|
12852
|
+
deps.onCommandSettled({
|
|
12853
|
+
deviceId: row.deviceId,
|
|
12854
|
+
action,
|
|
12855
|
+
outcome: row.outcome,
|
|
12856
|
+
actor: row.actor,
|
|
12857
|
+
at: row.at
|
|
12858
|
+
});
|
|
12859
|
+
} catch (err) {
|
|
12860
|
+
deps.logger.warn(`device-transitions: announcing a settled ${row.capName}.${row.command.method} failed: ${err instanceof Error ? err.message : String(err)}`, { tags: { deviceId: row.deviceId } });
|
|
12861
|
+
}
|
|
12862
|
+
};
|
|
12717
12863
|
const correlator = new TransitionCorrelator({
|
|
12718
12864
|
now,
|
|
12719
12865
|
currentSlice: (deviceId, capName) => deps.mirror.currentSlice(deviceId, capName),
|
|
12720
|
-
emit: (row) =>
|
|
12866
|
+
emit: (row) => {
|
|
12867
|
+
sender.enqueue(row);
|
|
12868
|
+
announce(row);
|
|
12869
|
+
},
|
|
12721
12870
|
prepareArgs: createCommandArgsPreparer(inputFor)
|
|
12722
12871
|
});
|
|
12723
12872
|
deps.mirror.setTransitionTap((deviceId, capName, prior, slice) => {
|
|
@@ -13175,6 +13324,31 @@ function createRemovalFence(options = {}) {
|
|
|
13175
13324
|
}
|
|
13176
13325
|
//#endregion
|
|
13177
13326
|
//#region src/builtins/device-manager/device-manager.addon.ts
|
|
13327
|
+
/**
|
|
13328
|
+
* Device Manager addon — hub-side singleton that unifies device persistence,
|
|
13329
|
+
* live registry queries, and all management operations into a single
|
|
13330
|
+
* tRPC-routable capability.
|
|
13331
|
+
*
|
|
13332
|
+
* Persistence strategy: all device data is stored via `ctx.settings`, the same
|
|
13333
|
+
* settings API every other addon uses. No raw SQLite access.
|
|
13334
|
+
*
|
|
13335
|
+
* Addon store layout:
|
|
13336
|
+
* deviceIndex → Record<addonId, stableId[]> (which devices exist per addon)
|
|
13337
|
+
* deviceMeta → Record<numericId, DeviceMeta> (keyed by numeric device id;
|
|
13338
|
+
* addonId + stableId are FIELDS on the record)
|
|
13339
|
+
*
|
|
13340
|
+
* Device store (per-device config):
|
|
13341
|
+
* readDeviceStore(numericDeviceId) → config blob
|
|
13342
|
+
* writeDeviceStore(numericDeviceId, patch)
|
|
13343
|
+
*
|
|
13344
|
+
* Live registry: resolved from the kernel capability registry after Phase 2.
|
|
13345
|
+
* This gives direct access to in-memory IDevice instances registered by provider addons.
|
|
13346
|
+
* The DeviceManagerAddon is the single owner of the live device operations API.
|
|
13347
|
+
*
|
|
13348
|
+
* Replaces:
|
|
13349
|
+
* - `device-persistence` capability (absorbed here)
|
|
13350
|
+
* - live operations previously served by `device-management.router.ts`
|
|
13351
|
+
*/
|
|
13178
13352
|
var DeviceManagerAddon = class extends BaseAddon {
|
|
13179
13353
|
constructor() {
|
|
13180
13354
|
super({});
|
|
@@ -13561,7 +13735,17 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
13561
13735
|
const api = this.ctx.api;
|
|
13562
13736
|
if (api === void 0) throw new Error("ctx.api not ready");
|
|
13563
13737
|
await api.deviceTransitions.record.mutate({ transitions: [...transitions] });
|
|
13564
|
-
}
|
|
13738
|
+
},
|
|
13739
|
+
onCommandSettled: (event) => this.ctx.eventBus.emit({
|
|
13740
|
+
id: randomUUID(),
|
|
13741
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
13742
|
+
source: {
|
|
13743
|
+
type: "device",
|
|
13744
|
+
id: event.deviceId
|
|
13745
|
+
},
|
|
13746
|
+
category: EventCategory$1.DeviceCommandSettled,
|
|
13747
|
+
data: { ...event }
|
|
13748
|
+
})
|
|
13565
13749
|
});
|
|
13566
13750
|
this.fieldClaimsImpl = new FieldClaimsIndex({
|
|
13567
13751
|
logger: this.ctx.logger.child("claims-index"),
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Name on <platform>" field of the device Export tab, DERIVED from the `device-export` cap
|
|
3
|
+
* (D1049): one text field per enabled export instance, read from
|
|
4
|
+
* `listExposedDevices().exposedName` and written through `setExposedName`. No exporter writes
|
|
5
|
+
* this field by hand; every exporter gets it the same way.
|
|
6
|
+
*
|
|
7
|
+
* Field key: `export-name:<addonId>:<instanceId>`. The patch router splits these keys off before
|
|
8
|
+
* the exporter's own `applyDeviceSettingsPatch` sees the rest.
|
|
9
|
+
*/
|
|
10
|
+
import { type IDeviceExportProvider } from "@camstack/types";
|
|
11
|
+
import type { ContributionShape } from "./device-meta-types.js";
|
|
12
|
+
export declare const EXPORT_NAME_FIELD_PREFIX = "export-name:";
|
|
13
|
+
/** The part of a `device-export` provider the derived field reads and writes. */
|
|
14
|
+
export type ExportNameProvider = Pick<IDeviceExportProvider, "listInstances" | "listExposedDevices" | "setExposedName">;
|
|
15
|
+
export interface ExportNameEdit {
|
|
16
|
+
readonly instanceId: string;
|
|
17
|
+
readonly name: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface SplitExportNamePatch {
|
|
20
|
+
readonly names: readonly ExportNameEdit[];
|
|
21
|
+
readonly rest: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Add one name field per enabled instance to the exporter's own contribution — exposed or not,
|
|
25
|
+
* so the name can be set in the same save that turns Expose on (the names are applied first).
|
|
26
|
+
* Without a contribution there is no Export panel to hold the field, so nothing is added (the
|
|
27
|
+
* device is not exported by this addon).
|
|
28
|
+
*/
|
|
29
|
+
export declare function withExportNameFields(contribution: ContributionShape | null, provider: ExportNameProvider, addonId: string, deviceId: number): Promise<ContributionShape | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Split the derived name keys of `addonId` from the rest of a patch. A blank string or null
|
|
32
|
+
* clears the name; any other non-string is refused by name, never read as "clear".
|
|
33
|
+
*/
|
|
34
|
+
export declare function splitExportNamePatch(addonId: string, patch: Readonly<Record<string, unknown>>): SplitExportNamePatch;
|
|
35
|
+
/**
|
|
36
|
+
* Write the names through the cap, all or none: every name is checked first (`dryRun`), so one
|
|
37
|
+
* refusal (`export-name-refused: …`) propagates before ANY is written.
|
|
38
|
+
*/
|
|
39
|
+
export declare function applyExportNames(provider: Pick<ExportNameProvider, "setExposedName">, deviceId: number, names: readonly ExportNameEdit[]): Promise<void>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* device-history. Everything here is best-effort telemetry (D8): a failure
|
|
5
5
|
* costs rows, never a command or a mirror write.
|
|
6
6
|
*/
|
|
7
|
-
import { type DeviceTransition } from "@camstack/types";
|
|
7
|
+
import { type DeviceCommandSettledEvent, type DeviceTransition } from "@camstack/types";
|
|
8
8
|
import type { IScopedLogger } from "@camstack/types";
|
|
9
9
|
import type { DeviceStateMirror } from "../device-state-mirror.js";
|
|
10
10
|
export declare const TRANSITIONS_FLUSH_INTERVAL_MS = 2e3;
|
|
@@ -14,6 +14,11 @@ export interface DeviceTransitionsDeps {
|
|
|
14
14
|
readonly mirror: DeviceStateMirror;
|
|
15
15
|
readonly logger: IScopedLogger;
|
|
16
16
|
readonly record: (transitions: readonly DeviceTransition[]) => Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Told of each COMMAND the correlator settles (never a device's own change). Telemetry (D8):
|
|
19
|
+
* a throw is logged and costs the notification, never the row.
|
|
20
|
+
*/
|
|
21
|
+
readonly onCommandSettled?: (event: DeviceCommandSettledEvent) => void;
|
|
17
22
|
readonly now?: () => number;
|
|
18
23
|
readonly ticker?: TransitionTicker;
|
|
19
24
|
}
|
|
@@ -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-DNDhIlAe.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 { Pi as logDestinationCapability, Ss as BaseAddon } from "../../dist-DY7OGObz.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-DNDhIlAe.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-aB_rFHhZ.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
10
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-BQKarbeM.js");
|
|
10
|
+
const require_constants = require("../../constants-lHbp6u7t.js");
|
|
11
11
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
13
13
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { Dt as KeychainResetRecordSchema, Et as KeychainAuditEntrySchema, Ss as BaseAddon, Ti as keychainCapability, Tt as KEYCHAIN_RESET_TRIGGER_ACTOR, Zc as normalizeSecretOwner, el as parseSecretRef, kc as formatSecretScope, wc as defineRecordKinds, wi as keychainAdminCapability, wl as EventCategory } from "../../dist-DY7OGObz.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-BmKBCV_4.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-
|
|
5
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-87W9dzLF.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-15k32igK.mjs";
|
|
6
6
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-DNDhIlAe.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ri as mayWriteToLocation, Sl as errMsg, Ss as BaseAddon, Xt as RecordingStatusSchema, qt as RECORDING_SOURCE_CAMSTACK_ADDON, wl as EventCategory, yc as createEvent } from "../../dist-DY7OGObz.mjs";
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DNDhIlAe.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-aB_rFHhZ.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");
|