@camstack/server 1.2.867 → 1.2.869
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 +14 -0
- package/dist/api/trpc/generated-cap-routers.js +64 -0
- package/package.json +20 -9
- package/system/dist/addon-utils.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 +3 -3
- 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 +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 +29 -63
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +29 -63
- package/system/dist/builtins/core-blocks/remote-service.d.ts +11 -8
- 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 +5 -5
- 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 +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 +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 +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 +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 +115 -115
- 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-BCB1OMc_.js → capture-engine-Bwhwpy3T.js} +1 -1
- package/system/dist/{capture-engine-5g4lu_OQ.mjs → capture-engine-hLbiQm2r.mjs} +1 -1
- package/system/dist/{composition-sources-VkBsGWZh.mjs → composition-sources-CXd5ydxk.mjs} +1 -1
- package/system/dist/{composition-sources-1yTVou3a.js → composition-sources-DqGVEx12.js} +1 -1
- package/system/dist/{constants-D1lf-y38.mjs → constants-BxOTlPMv.mjs} +1 -1
- package/system/dist/{constants-r86Qr7xE.js → constants-hVovxKZz.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-Bs_oj8y_.js → device-ca-1vqFIP_t.js} +1 -1
- package/system/dist/{device-ca-aWcNrAeB.mjs → device-ca-B-yM5jiy.mjs} +1 -1
- package/system/dist/{dist-BeM3jcMe.mjs → dist-D1LOSOS0.mjs} +364 -14
- package/system/dist/{dist-CtlwobAt.js → dist-uTbt3Yxy.js} +364 -14
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-CoyjSGzP.mjs → hub-identity-Dx3Jbhnp.mjs} +10 -10
- package/system/dist/{hub-identity-C_3WvvUh.js → hub-identity-TBo0Xrxk.js} +1 -1
- package/system/dist/{hub-mdns-ciao-MJdhRgSK.mjs → hub-mdns-ciao-Br5Vlcf0.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DrpNoAbD.js → hub-mdns-ciao-C0xzb8jM.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +217 -217
- package/system/dist/{legacy-integration-rows-door-DwD_6A21.mjs → legacy-integration-rows-door-CqsM5HcW.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-DknPUCvT.js → legacy-integration-rows-door-c8pHSqwA.js} +1 -1
- package/system/dist/{rename-composition-block-B7ZEwdvM.mjs → rename-composition-block-Bbu4W1mg.mjs} +1 -1
- package/system/dist/{rename-composition-block-VNSmpCSW.js → rename-composition-block-DNgRnLHV.js} +1 -1
- package/system/dist/{restore-archive-CizGJ-13.js → restore-archive-D48JPP0d.js} +1 -1
- package/system/dist/{restore-archive-3-Gd66TK.mjs → restore-archive-DcS4GDfw.mjs} +94 -94
- package/system/dist/{wal-maintenance-CMKws6du.mjs → wal-maintenance-BoxO0tlN.mjs} +0 -0
- package/system/dist/{wal-maintenance-cI0DBU7k.js → wal-maintenance-D3s8jnax.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $o as CompositionSchema, $t as RemoteAssumedStateSchema, Aa as readStoredRemoteConfig, Ai as kebabToCamel, Al as vocabCall, B as DEFAULT_HOLD_OVERRIDE, Ba as replacedFieldKeys, Bi as lockDoorLinkOfComposition, Ca as problemsBlockSave, Cs as historyRetentionFromSettings, D as CORE_BLOCK_ADDON_PREFIX, Da as proposeRunningThreshold, Dl as transformSecretWrite, E as CORE_BLOCKS_ADDON_ID, Ea as projectDeviceRow, Et as INTERNAL_ACTION_PREFIX, Fa as reexpandAutomationInstance, Fc as defineAddonMigrations, Fl as DeviceType$1, Fo as timedRunMaxIn, Ft as MediaPlayerStatusSchema, Ga as resolveCoreBlockFiles, Hr as evaluateWhenTree, Ia as remoteCapability, Ii as localDateOf, Il as errMsg$1, Io as timedRunQuickRun, Is as BaseAddon, Jn as capUnitResolver, Jo as weekdayOfLocalDate, Jr as fanAxisPath, Jt as QuantityUnitError, Ka as resolveHeroLayout, La as remoteLayoutComponentsCapability, Lc as defineEntryKind, Ln as buildActionSteps, Lo as timedRunSeconds, Mc as commandOrigin$1, Mo as templateCapability, N as CoreBlockSchema, No as timedRunCapability, Pl as DeviceRole, Po as timedRunLimitOf, Qa as resolveRemoteSource, Qn as checkTemplatePayload, Qo as COMPOSER_ADDON_ID, Ra as remoteSourceSteps, Rc as defineRecordKinds, Rl as EventCategory$1, Rn as buildCapabilityLookup, Ro as toTimings, Sa as prepareRecipeUnits, Sl as secretTreeFromSchema, Sn as addonIdOfActionId, Ss as helperMembers, T as COMPOSER_RUNNER_ID, Tr as describeComposableCaps, Tt as IDLE_ACTION_STATUS, Un as builtinAutomationTemplate, Uo as validateSchedulerInput, Va as resolveActionVariables, Vc as entryBody, Vn as buildHeroModel, Vo as validateComposition, Vr as evaluateStepCondition, Wa as resolveCoreBlockEntry, Wt as PowerSourceInfoSchema, Xt as REMOTE_MEDIA_COMMANDS, Zo as zoneOnlySite, Zr as fanPresetsCapability, _ as BUILTIN_REMOTE_COMPONENTS, _c as VocabActionError, _o as siteFor, _r as customKeyOfRole, _s as compositionSourceKey, ai as generateAutomationBlock, al as isSecretRefOwnedBy, an as SchedulerError, as as HelperMemberSchema, ba as powerSourceLinkOfComposition, bi as isBuiltinTemplateId, bn as actionWaitTotalMs, c as ActionError, ca as occurrenceOn, cr as compositionUnionReads, cs as canonicalStoredBlockTarget, ct as EMPTY_REMOTE_CONFIG, d as ActionTargetResolver, di as instanceCodeHash, dr as coreBlockComposition, dt as FAN_OSCILLATION_AXES, ei as findChannelSource, en as RemoteLayoutPayloadSchema, eo as resolveStepArgs, er as collectDeviceTemplates, es as DAY_MS, f as ActionVariableSchema, fi as integrationInstancesCapability, fr as coreBlockIdFromAddonId, fs as composedDeviceRef, ft as FAN_OSCILLATION_AXIS_SETTABLE, g as BUILTIN_AUTOMATION_TEMPLATES, ga as planComposition, gt as FanPresetSchema, h as AutomationTemplatePayloadSchema, hn as TemplateKindSchema, ia as normalizeCoreBlockWrite, ir as compileScalarOverride, j as ConditionMirror, jn as assertStepsOffered, ka as readRecipeLiteral, kc as collectSecretMarkerRefs, kl as vocabActionIdFor, kn as appendTrace, l as ActionMinDelaySecSchema, li as hasTimeLeaves, ln as SetOscillationAxisInputSchema, m as AutomationStateDocSchema, mr as coreBlocksCapability, ms as compositionFeatureEnabled, mt as FanControlStatusSchema, n as ACTION_TARGET_INVALIDATION_EVENTS, na as nextTimeBoundaryInMs, oc as RecordIntegrationInstances, on as SchedulerSchema, oo as schedulersCapability, ot as EMPTY_AUTOMATION_STATE, pi as internalActionId, pr as coreBlockSourceKind, ps as composedDeviceStableId, qc as hydrateSchema, qn as canonicalStoredStepTargets, ra as normalizeActionUnits, rl as isSecretMarker, ro as runSteps, s as ALL_CAPABILITY_DEFINITIONS, sr as compositionSourceRefs, st as EMPTY_REMOTE_ASSUMED_STATE, ta as nextOccurrence, tn as RunningStateStatusSchema, tr as collectWhenMirrorSources, tt as DeclaredDevices, u as ActionStepSchema, ui as heroLayoutCapability, uo as seedInstanceOnce, ur as coreBlockAddonId, ut as FAN_CAPTURE_FIELDS, va as powerSourceActuatorConflicts, vl as resolveSecretMarkers, wi as isInternalActionId, xn as actionsCapability, xo as stableIdMapOf, ya as powerSourceCapability, yc as actionEffect, yl as ruleFireOfClaim, yn as actionSourceCapability, za as replaceRecipeLiteral } from "../../dist-
|
|
1
|
+
import { $o as CompositionSchema, $t as RemoteAssumedStateSchema, Aa as readStoredRemoteConfig, Ai as kebabToCamel, Al as vocabCall, B as DEFAULT_HOLD_OVERRIDE, Ba as replacedFieldKeys, Bi as lockDoorLinkOfComposition, Ca as problemsBlockSave, Cs as historyRetentionFromSettings, D as CORE_BLOCK_ADDON_PREFIX, Da as proposeRunningThreshold, Dl as transformSecretWrite, E as CORE_BLOCKS_ADDON_ID, Ea as projectDeviceRow, Et as INTERNAL_ACTION_PREFIX, Fa as reexpandAutomationInstance, Fc as defineAddonMigrations, Fl as DeviceType$1, Fo as timedRunMaxIn, Ft as MediaPlayerStatusSchema, Ga as resolveCoreBlockFiles, Hr as evaluateWhenTree, Ia as remoteCapability, Ii as localDateOf, Il as errMsg$1, Io as timedRunQuickRun, Is as BaseAddon, Jn as capUnitResolver, Jo as weekdayOfLocalDate, Jr as fanAxisPath, Jt as QuantityUnitError, Ka as resolveHeroLayout, La as remoteLayoutComponentsCapability, Lc as defineEntryKind, Ln as buildActionSteps, Lo as timedRunSeconds, Mc as commandOrigin$1, Mo as templateCapability, N as CoreBlockSchema, No as timedRunCapability, Pl as DeviceRole, Po as timedRunLimitOf, Qa as resolveRemoteSource, Qn as checkTemplatePayload, Qo as COMPOSER_ADDON_ID, Ra as remoteSourceSteps, Rc as defineRecordKinds, Rl as EventCategory$1, Rn as buildCapabilityLookup, Ro as toTimings, Sa as prepareRecipeUnits, Sl as secretTreeFromSchema, Sn as addonIdOfActionId, Ss as helperMembers, T as COMPOSER_RUNNER_ID, Tr as describeComposableCaps, Tt as IDLE_ACTION_STATUS, Un as builtinAutomationTemplate, Uo as validateSchedulerInput, Va as resolveActionVariables, Vc as entryBody, Vn as buildHeroModel, Vo as validateComposition, Vr as evaluateStepCondition, Wa as resolveCoreBlockEntry, Wt as PowerSourceInfoSchema, Xt as REMOTE_MEDIA_COMMANDS, Zo as zoneOnlySite, Zr as fanPresetsCapability, _ as BUILTIN_REMOTE_COMPONENTS, _c as VocabActionError, _o as siteFor, _r as customKeyOfRole, _s as compositionSourceKey, ai as generateAutomationBlock, al as isSecretRefOwnedBy, an as SchedulerError, as as HelperMemberSchema, ba as powerSourceLinkOfComposition, bi as isBuiltinTemplateId, bn as actionWaitTotalMs, c as ActionError, ca as occurrenceOn, cr as compositionUnionReads, cs as canonicalStoredBlockTarget, ct as EMPTY_REMOTE_CONFIG, d as ActionTargetResolver, di as instanceCodeHash, dr as coreBlockComposition, dt as FAN_OSCILLATION_AXES, ei as findChannelSource, en as RemoteLayoutPayloadSchema, eo as resolveStepArgs, er as collectDeviceTemplates, es as DAY_MS, f as ActionVariableSchema, fi as integrationInstancesCapability, fr as coreBlockIdFromAddonId, fs as composedDeviceRef, ft as FAN_OSCILLATION_AXIS_SETTABLE, g as BUILTIN_AUTOMATION_TEMPLATES, ga as planComposition, gt as FanPresetSchema, h as AutomationTemplatePayloadSchema, hn as TemplateKindSchema, ia as normalizeCoreBlockWrite, ir as compileScalarOverride, j as ConditionMirror, jn as assertStepsOffered, ka as readRecipeLiteral, kc as collectSecretMarkerRefs, kl as vocabActionIdFor, kn as appendTrace, l as ActionMinDelaySecSchema, li as hasTimeLeaves, ln as SetOscillationAxisInputSchema, m as AutomationStateDocSchema, mr as coreBlocksCapability, ms as compositionFeatureEnabled, mt as FanControlStatusSchema, n as ACTION_TARGET_INVALIDATION_EVENTS, na as nextTimeBoundaryInMs, oc as RecordIntegrationInstances, on as SchedulerSchema, oo as schedulersCapability, ot as EMPTY_AUTOMATION_STATE, pi as internalActionId, pr as coreBlockSourceKind, ps as composedDeviceStableId, qc as hydrateSchema, qn as canonicalStoredStepTargets, ra as normalizeActionUnits, rl as isSecretMarker, ro as runSteps, s as ALL_CAPABILITY_DEFINITIONS, sr as compositionSourceRefs, st as EMPTY_REMOTE_ASSUMED_STATE, ta as nextOccurrence, tn as RunningStateStatusSchema, tr as collectWhenMirrorSources, tt as DeclaredDevices, u as ActionStepSchema, ui as heroLayoutCapability, uo as seedInstanceOnce, ur as coreBlockAddonId, ut as FAN_CAPTURE_FIELDS, va as powerSourceActuatorConflicts, vl as resolveSecretMarkers, wi as isInternalActionId, xn as actionsCapability, xo as stableIdMapOf, ya as powerSourceCapability, yc as actionEffect, yl as ruleFireOfClaim, yn as actionSourceCapability, za as replaceRecipeLiteral } from "../../dist-D1LOSOS0.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources-
|
|
4
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
3
|
+
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources-CXd5ydxk.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-hLbiQm2r.mjs";
|
|
5
5
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
6
6
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
7
7
|
import { n as readCurrentCommandOrigin } from "../../cap-call-scope-Bic6Ekfw.mjs";
|
|
@@ -6663,9 +6663,10 @@ function remoteCallRedirect(deps) {
|
|
|
6663
6663
|
* steps in order under the device's lock (no other press interleaves),
|
|
6664
6664
|
* `stepDelayMs` apart; a refusal is typed (`unknown-source`,
|
|
6665
6665
|
* `unbound-step`, `undeclared-channel`) and a failed step stops the
|
|
6666
|
-
* sequence and names itself. The source last sent is
|
|
6667
|
-
*
|
|
6668
|
-
*
|
|
6666
|
+
* sequence and names itself. The source last sent is NEVER a state: an
|
|
6667
|
+
* infrared set cannot report its input and its own remote changes it
|
|
6668
|
+
* unseen, so the status names a source only when a native source READS it
|
|
6669
|
+
* (the picker then offers momentary choices, like a mute key).
|
|
6669
6670
|
* - **Precedence** (`sendMediaCommand`): a media-player command takes the
|
|
6670
6671
|
* remote when its role is bound, else answers `not-routed` so the native
|
|
6671
6672
|
* cap runs. The dispatch redirect asks this for every caller.
|
|
@@ -6818,22 +6819,20 @@ var RemoteService = class {
|
|
|
6818
6819
|
await Promise.all(affected.map((tv) => this.refreshSlice(tv)));
|
|
6819
6820
|
}
|
|
6820
6821
|
/**
|
|
6821
|
-
* What the remote ASSUMES (the last power
|
|
6822
|
-
*
|
|
6822
|
+
* What the remote ASSUMES (the last power it sent), or null when it knows
|
|
6823
|
+
* none. A mute and a source are never assumed: without a reading they have no
|
|
6824
|
+
* state. No plug, no running-state: that is `assumedStatus`.
|
|
6823
6825
|
*/
|
|
6824
6826
|
getAssumedStatus = async ({ deviceId }) => {
|
|
6825
6827
|
const kept = await this.readAssumed(deviceId);
|
|
6826
|
-
if (kept.power === null
|
|
6828
|
+
if (kept.power === null) return null;
|
|
6827
6829
|
const config = await this.deps.store.read(deviceId);
|
|
6828
|
-
const assumedFields = [];
|
|
6829
|
-
if (kept.power !== null) assumedFields.push("state");
|
|
6830
|
-
if (kept.source !== null) assumedFields.push("source");
|
|
6831
6830
|
return this.buildStatus({
|
|
6832
|
-
state: kept.power
|
|
6833
|
-
assumedFields,
|
|
6831
|
+
state: kept.power.state,
|
|
6832
|
+
assumedFields: ["state"],
|
|
6834
6833
|
muted: null,
|
|
6835
|
-
source:
|
|
6836
|
-
changedAt:
|
|
6834
|
+
source: "",
|
|
6835
|
+
changedAt: kept.power.at,
|
|
6837
6836
|
sources: config.sources
|
|
6838
6837
|
});
|
|
6839
6838
|
};
|
|
@@ -6841,29 +6840,26 @@ var RemoteService = class {
|
|
|
6841
6840
|
* The device's state as the remote knows it, or null when it knows no power
|
|
6842
6841
|
* state. Power truth, in order: a `running-state` reading; the linked plug
|
|
6843
6842
|
* (off is `off`, a reading; on is `standby` until a power command was sent,
|
|
6844
|
-
* then what the remote sent); the remote's own assumption. Mute
|
|
6845
|
-
* the native reading only; the remote never assumes
|
|
6843
|
+
* then what the remote sent); the remote's own assumption. Mute and source
|
|
6844
|
+
* come from the native reading only; the remote never assumes either.
|
|
6846
6845
|
*/
|
|
6847
6846
|
async assumedStatus(deviceId) {
|
|
6848
6847
|
return this.statusOf(deviceId, true);
|
|
6849
6848
|
}
|
|
6850
6849
|
/** `forget`: whether a plug that is off drops the kept power guess (a read's side effect). */
|
|
6851
6850
|
async statusOf(deviceId, forget) {
|
|
6852
|
-
const kept = await this.readAssumed(deviceId);
|
|
6853
6851
|
const truth = await this.powerTruth(deviceId, forget);
|
|
6854
6852
|
if (truth === null) return null;
|
|
6855
6853
|
const assumedFields = truth.assumed ? ["state"] : [];
|
|
6856
6854
|
const state = truth.state;
|
|
6857
|
-
const
|
|
6858
|
-
const source = state === "off" ? null : kept.source ?? null;
|
|
6859
|
-
if (source !== null) assumedFields.push("source");
|
|
6855
|
+
const source = state === "off" ? "" : await this.currentSource(deviceId);
|
|
6860
6856
|
const config = await this.deps.store.read(deviceId);
|
|
6861
6857
|
return this.buildStatus({
|
|
6862
6858
|
state,
|
|
6863
6859
|
assumedFields,
|
|
6864
6860
|
muted: null,
|
|
6865
|
-
source
|
|
6866
|
-
changedAt:
|
|
6861
|
+
source,
|
|
6862
|
+
changedAt: truth.at,
|
|
6867
6863
|
sources: config.sources
|
|
6868
6864
|
});
|
|
6869
6865
|
}
|
|
@@ -6929,10 +6925,9 @@ var RemoteService = class {
|
|
|
6929
6925
|
const plug = await this.deps.plugOn(deviceId);
|
|
6930
6926
|
const kept = await this.readAssumed(deviceId);
|
|
6931
6927
|
if (plug === false) {
|
|
6932
|
-
if (forget &&
|
|
6928
|
+
if (forget && kept.power !== null) await this.deps.assumptions.write(deviceId, {
|
|
6933
6929
|
...kept,
|
|
6934
|
-
power: null
|
|
6935
|
-
source: null
|
|
6930
|
+
power: null
|
|
6936
6931
|
});
|
|
6937
6932
|
return {
|
|
6938
6933
|
state: "off",
|
|
@@ -6953,6 +6948,11 @@ var RemoteService = class {
|
|
|
6953
6948
|
};
|
|
6954
6949
|
return null;
|
|
6955
6950
|
}
|
|
6951
|
+
/** The input as a native source READS it, else '': a send is never a reading. */
|
|
6952
|
+
async currentSource(deviceId) {
|
|
6953
|
+
const reported = await this.deps.reportedStatus(deviceId);
|
|
6954
|
+
return reported !== null ? reported.source : "";
|
|
6955
|
+
}
|
|
6956
6956
|
/** The mute as a native source READS it, else unknown: a send is never a reading. */
|
|
6957
6957
|
async currentMute(deviceId) {
|
|
6958
6958
|
const reported = await this.deps.reportedStatus(deviceId);
|
|
@@ -7102,7 +7102,6 @@ var RemoteService = class {
|
|
|
7102
7102
|
role
|
|
7103
7103
|
}
|
|
7104
7104
|
});
|
|
7105
|
-
if (at > 0) await this.forgetSource(deviceId);
|
|
7106
7105
|
return {
|
|
7107
7106
|
status: "refused",
|
|
7108
7107
|
reason: "press-timeout",
|
|
@@ -7115,7 +7114,6 @@ var RemoteService = class {
|
|
|
7115
7114
|
}
|
|
7116
7115
|
const result = await this.runRole(deviceId, config, role, 1);
|
|
7117
7116
|
if (result.status === "refused") {
|
|
7118
|
-
if (at > 0) await this.forgetSource(deviceId);
|
|
7119
7117
|
this.deps.logger.warn("remote: a step of the source failed, the sequence stopped", {
|
|
7120
7118
|
tags: { deviceId },
|
|
7121
7119
|
meta: {
|
|
@@ -7135,14 +7133,6 @@ var RemoteService = class {
|
|
|
7135
7133
|
};
|
|
7136
7134
|
}
|
|
7137
7135
|
}
|
|
7138
|
-
const kept = await this.readAssumed(deviceId);
|
|
7139
|
-
await this.deps.assumptions.write(deviceId, {
|
|
7140
|
-
...kept,
|
|
7141
|
-
source: {
|
|
7142
|
-
name: source.name,
|
|
7143
|
-
at: this.now()
|
|
7144
|
-
}
|
|
7145
|
-
});
|
|
7146
7136
|
await this.refreshSlice(deviceId);
|
|
7147
7137
|
return {
|
|
7148
7138
|
status: "sent",
|
|
@@ -7188,14 +7178,6 @@ var RemoteService = class {
|
|
|
7188
7178
|
detail: errorText$2(err)
|
|
7189
7179
|
};
|
|
7190
7180
|
}
|
|
7191
|
-
const kept = await this.readAssumed(deviceId);
|
|
7192
|
-
await this.deps.assumptions.write(deviceId, {
|
|
7193
|
-
...kept,
|
|
7194
|
-
source: {
|
|
7195
|
-
name: source.name,
|
|
7196
|
-
at: this.now()
|
|
7197
|
-
}
|
|
7198
|
-
});
|
|
7199
7181
|
await this.refreshSlice(deviceId);
|
|
7200
7182
|
return {
|
|
7201
7183
|
status: "sent",
|
|
@@ -7217,13 +7199,6 @@ var RemoteService = class {
|
|
|
7217
7199
|
settings
|
|
7218
7200
|
};
|
|
7219
7201
|
}
|
|
7220
|
-
async forgetSource(deviceId) {
|
|
7221
|
-
const kept = await this.readAssumed(deviceId);
|
|
7222
|
-
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
7223
|
-
...kept,
|
|
7224
|
-
source: null
|
|
7225
|
-
});
|
|
7226
|
-
}
|
|
7227
7202
|
async runRole(deviceId, config, role, repeat) {
|
|
7228
7203
|
const explicit = config.bindings["power_on"] !== void 0 && config.bindings["power_off"] !== void 0;
|
|
7229
7204
|
if (role === "power" && config.bindings["power"] === void 0 && explicit) {
|
|
@@ -7296,8 +7271,7 @@ var RemoteService = class {
|
|
|
7296
7271
|
power: {
|
|
7297
7272
|
state: wantsState,
|
|
7298
7273
|
at: this.now()
|
|
7299
|
-
}
|
|
7300
|
-
source: wantsState === "off" ? null : kept.source
|
|
7274
|
+
}
|
|
7301
7275
|
});
|
|
7302
7276
|
return;
|
|
7303
7277
|
}
|
|
@@ -7310,15 +7284,7 @@ var RemoteService = class {
|
|
|
7310
7284
|
power: {
|
|
7311
7285
|
state: next,
|
|
7312
7286
|
at: this.now()
|
|
7313
|
-
}
|
|
7314
|
-
source: next === "off" ? null : kept.source
|
|
7315
|
-
});
|
|
7316
|
-
return;
|
|
7317
|
-
}
|
|
7318
|
-
if (role === "channel_up" || role === "channel_down") {
|
|
7319
|
-
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
7320
|
-
...kept,
|
|
7321
|
-
source: null
|
|
7287
|
+
}
|
|
7322
7288
|
});
|
|
7323
7289
|
return;
|
|
7324
7290
|
}
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
* steps in order under the device's lock (no other press interleaves),
|
|
28
28
|
* `stepDelayMs` apart; a refusal is typed (`unknown-source`,
|
|
29
29
|
* `unbound-step`, `undeclared-channel`) and a failed step stops the
|
|
30
|
-
* sequence and names itself. The source last sent is
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* sequence and names itself. The source last sent is NEVER a state: an
|
|
31
|
+
* infrared set cannot report its input and its own remote changes it
|
|
32
|
+
* unseen, so the status names a source only when a native source READS it
|
|
33
|
+
* (the picker then offers momentary choices, like a mute key).
|
|
33
34
|
* - **Precedence** (`sendMediaCommand`): a media-player command takes the
|
|
34
35
|
* remote when its role is bound, else answers `not-routed` so the native
|
|
35
36
|
* cap runs. The dispatch redirect asks this for every caller.
|
|
@@ -126,16 +127,17 @@ export declare class RemoteService implements IRemoteProvider {
|
|
|
126
127
|
*/
|
|
127
128
|
onInputChanged(deviceId: number): Promise<void>;
|
|
128
129
|
/**
|
|
129
|
-
* What the remote ASSUMES (the last power
|
|
130
|
-
*
|
|
130
|
+
* What the remote ASSUMES (the last power it sent), or null when it knows
|
|
131
|
+
* none. A mute and a source are never assumed: without a reading they have no
|
|
132
|
+
* state. No plug, no running-state: that is `assumedStatus`.
|
|
131
133
|
*/
|
|
132
134
|
readonly getAssumedStatus: IRemoteProvider["getAssumedStatus"];
|
|
133
135
|
/**
|
|
134
136
|
* The device's state as the remote knows it, or null when it knows no power
|
|
135
137
|
* state. Power truth, in order: a `running-state` reading; the linked plug
|
|
136
138
|
* (off is `off`, a reading; on is `standby` until a power command was sent,
|
|
137
|
-
* then what the remote sent); the remote's own assumption. Mute
|
|
138
|
-
* the native reading only; the remote never assumes
|
|
139
|
+
* then what the remote sent); the remote's own assumption. Mute and source
|
|
140
|
+
* come from the native reading only; the remote never assumes either.
|
|
139
141
|
*/
|
|
140
142
|
assumedStatus(deviceId: number): Promise<MediaPlayerStatus | null>;
|
|
141
143
|
/** `forget`: whether a plug that is off drops the kept power guess (a read's side effect). */
|
|
@@ -153,6 +155,8 @@ export declare class RemoteService implements IRemoteProvider {
|
|
|
153
155
|
* remote's own assumption; a plug on with nothing sent is `standby`.
|
|
154
156
|
*/
|
|
155
157
|
private powerTruth;
|
|
158
|
+
/** The input as a native source READS it, else '': a send is never a reading. */
|
|
159
|
+
private currentSource;
|
|
156
160
|
/** The mute as a native source READS it, else unknown: a send is never a reading. */
|
|
157
161
|
private currentMute;
|
|
158
162
|
private readAssumed;
|
|
@@ -189,7 +193,6 @@ export declare class RemoteService implements IRemoteProvider {
|
|
|
189
193
|
private runIrSource;
|
|
190
194
|
/** A native code goes verbatim to a transmitter that replays its format; anything else as a pulse train. */
|
|
191
195
|
private irSendArgs;
|
|
192
|
-
private forgetSource;
|
|
193
196
|
private runRole;
|
|
194
197
|
/**
|
|
195
198
|
* The assumption moves only after a send landed. A bare `power` flips a KNOWN
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-uTbt3Yxy.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-Bwhwpy3T.js");
|
|
8
8
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as armRemovalReconcile, Bc as emitReadiness, Fl as DeviceType, Fs as wattMillisecondsToKwh, Ir as deviceTransitionsCapability, Is as BaseAddon, Kc as historyUnitFor, Mr as deviceRemovalHookCapability, Nr as deviceRunsCapability, Rc as defineRecordKinds, Rl as EventCategory, U as DEVICE_HISTORY_ENERGY_KEY, Us as DeviceTransitionSchema, bt as HISTORY_CATALOG, el as isReadingQuantity, kr as deviceHistoryCapability, lc as RecordTooLargeError, nt as DeviceRunSchema, qs as InvalidRecordError, xt as HISTORY_ITEM_CATALOG } from "../../dist-
|
|
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-
|
|
1
|
+
import { An as armRemovalReconcile, Bc as emitReadiness, Fl as DeviceType, Fs as wattMillisecondsToKwh, Ir as deviceTransitionsCapability, Is as BaseAddon, Kc as historyUnitFor, Mr as deviceRemovalHookCapability, Nr as deviceRunsCapability, Rc as defineRecordKinds, Rl as EventCategory, U as DEVICE_HISTORY_ENERGY_KEY, Us as DeviceTransitionSchema, bt as HISTORY_CATALOG, el as isReadingQuantity, kr as deviceHistoryCapability, lc as RecordTooLargeError, nt as DeviceRunSchema, qs as InvalidRecordError, xt as HISTORY_ITEM_CATALOG } from "../../dist-D1LOSOS0.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-hLbiQm2r.mjs";
|
|
3
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-CUOVI1p7.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -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-uTbt3Yxy.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-DNgRnLHV.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");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $c as isKeychainStoredField, Ac as collectZodSecretPaths$1, Ar as deviceManagerCapability, Cr as defineExtensionSlotProvider, Dl as transformSecretWrite, El as toSecretFieldView, Fl as DeviceType$1, Fr as deviceStatusCapability, Hc as expandCapMethods$1, Hn as buildStreamParamsConfigSchema, Il as errMsg$1, Is as BaseAddon, J as DEVICE_TEMPLATE_FILTERS, Jc as isCommand$1, Kn as canonicalIconKey, Ni as legacyAutoLinkIds, Nl as DeviceFeature, Nt as MINUTES_PER_DAY, Ol as userError, Or as deviceExtensionCapability, Pl as DeviceRole, Pr as deviceStateCapability, Q as DEVICE_TEMPLATE_VALUES_CAP, Rc as defineRecordKinds, Ri as locationIconKey, Rl as EventCategory$1, Rr as enumerateItemArrayFields, S as CAP_NAMES_WITH_STATUS, Tc as auditedFields, Ti as isKernelDerivedFeature, Wr as expandContainer, X as DEVICE_TEMPLATE_MAX_OUTPUT, Xc as isDeviceConfigCap, Xn as checkDeviceAlias, Y as DEVICE_TEMPLATE_MAX_LENGTH, _t as FieldClaimModeSchema, aa as normalizeUnit, ao as runtimeStatePolicyFor, at as DiscoveryProposalBodySchema, b as CAMERA_SWITCH_ORDER, fa as parseStreamParamsFormPatch, fc as SECRET_CLEAR, fo as settleDeviceFeatures, gr as createDeviceExtensionProvider, il as isSecretMarkerLike, in as STREAM_PROFILE_META, io as runtimeFieldUnit, it as DeviceTombstoneSchema, j as ConditionMirror, ja as reconcileReportedFeatures, jc as commandEffect, jr as deviceOffersActions, kl as vocabActionIdFor, ls as canonicalStoredDeviceType, lt as ExportNameRefusedError, oi as generateDeviceAlias, qr as extractSourceInfoFromMetadata, ri as formatMinutes, rl as isSecretMarker, rt as DeviceStatusSchema, s as ALL_CAPABILITY_DEFINITIONS, tl as isSecretClear, to as resolveTemplateRef, us as capAppliesToDeviceKind, vc as WELL_KNOWN_TAB_MAP, vl as resolveSecretMarkers, vo as siteZoneKey, vt as FieldClaimSchema, wl as sleep$2, ws as implementedMethodsOf$1, xl as secretTreeFromPaths, z as DAY_NAMES, zr as enumerateSchemaFields } from "../../dist-
|
|
1
|
+
import { $c as isKeychainStoredField, Ac as collectZodSecretPaths$1, Ar as deviceManagerCapability, Cr as defineExtensionSlotProvider, Dl as transformSecretWrite, El as toSecretFieldView, Fl as DeviceType$1, Fr as deviceStatusCapability, Hc as expandCapMethods$1, Hn as buildStreamParamsConfigSchema, Il as errMsg$1, Is as BaseAddon, J as DEVICE_TEMPLATE_FILTERS, Jc as isCommand$1, Kn as canonicalIconKey, Ni as legacyAutoLinkIds, Nl as DeviceFeature, Nt as MINUTES_PER_DAY, Ol as userError, Or as deviceExtensionCapability, Pl as DeviceRole, Pr as deviceStateCapability, Q as DEVICE_TEMPLATE_VALUES_CAP, Rc as defineRecordKinds, Ri as locationIconKey, Rl as EventCategory$1, Rr as enumerateItemArrayFields, S as CAP_NAMES_WITH_STATUS, Tc as auditedFields, Ti as isKernelDerivedFeature, Wr as expandContainer, X as DEVICE_TEMPLATE_MAX_OUTPUT, Xc as isDeviceConfigCap, Xn as checkDeviceAlias, Y as DEVICE_TEMPLATE_MAX_LENGTH, _t as FieldClaimModeSchema, aa as normalizeUnit, ao as runtimeStatePolicyFor, at as DiscoveryProposalBodySchema, b as CAMERA_SWITCH_ORDER, fa as parseStreamParamsFormPatch, fc as SECRET_CLEAR, fo as settleDeviceFeatures, gr as createDeviceExtensionProvider, il as isSecretMarkerLike, in as STREAM_PROFILE_META, io as runtimeFieldUnit, it as DeviceTombstoneSchema, j as ConditionMirror, ja as reconcileReportedFeatures, jc as commandEffect, jr as deviceOffersActions, kl as vocabActionIdFor, ls as canonicalStoredDeviceType, lt as ExportNameRefusedError, oi as generateDeviceAlias, qr as extractSourceInfoFromMetadata, ri as formatMinutes, rl as isSecretMarker, rt as DeviceStatusSchema, s as ALL_CAPABILITY_DEFINITIONS, tl as isSecretClear, to as resolveTemplateRef, us as capAppliesToDeviceKind, vc as WELL_KNOWN_TAB_MAP, vl as resolveSecretMarkers, vo as siteZoneKey, vt as FieldClaimSchema, wl as sleep$2, ws as implementedMethodsOf$1, xl as secretTreeFromPaths, z as DAY_NAMES, zr as enumerateSchemaFields } from "../../dist-D1LOSOS0.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-Bbu4W1mg.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";
|
|
@@ -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-uTbt3Yxy.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 { Is as BaseAddon, Vi as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Vi as logDestinationCapability } from "../../dist-D1LOSOS0.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-uTbt3Yxy.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-1vqFIP_t.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-c8pHSqwA.js");
|
|
10
|
+
const require_constants = require("../../constants-hVovxKZz.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 { Dt as KEYCHAIN_RESET_TRIGGER_ACTOR, Is as BaseAddon, Mi as keychainCapability, Ot as KeychainAuditEntrySchema, Rc as defineRecordKinds, Rl as EventCategory, Uc as formatSecretScope, dl as normalizeSecretOwner, ji as keychainAdminCapability, kt as KeychainResetRecordSchema, ml as parseSecretRef } from "../../dist-
|
|
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 KEYCHAIN_RESET_TRIGGER_ACTOR, Is as BaseAddon, Mi as keychainCapability, Ot as KeychainAuditEntrySchema, Rc as defineRecordKinds, Rl as EventCategory, Uc as formatSecretScope, dl as normalizeSecretOwner, ji as keychainAdminCapability, kt as KeychainResetRecordSchema, ml as parseSecretRef } from "../../dist-D1LOSOS0.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-B-yM5jiy.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-CqsM5HcW.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-BxOTlPMv.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-uTbt3Yxy.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 { Gi as mayWriteToLocation, Il as errMsg, Is as BaseAddon, Nc as createEvent, Qt as RecordingStatusSchema, Rl as EventCategory, Yt as RECORDING_SOURCE_CAMSTACK_ADDON } from "../../dist-
|
|
1
|
+
import { Gi as mayWriteToLocation, Il as errMsg, Is as BaseAddon, Nc as createEvent, Qt as RecordingStatusSchema, Rl as EventCategory, Yt as RECORDING_SOURCE_CAMSTACK_ADDON } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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-1vqFIP_t.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,14 +1,14 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bn as buildDeviceSignatureMessage, Bo as userManagementCapability, Bt as PREFERENCES_MAX_VALUE_BYTES, Dr as deviceCredentialsCapability, G as DEVICE_NONCE_TTL_MS, Gt as PreferenceDeviceIdSchema, H as DEVICE_ENROLLMENT_TTL_MS, Is as BaseAddon, Kt as PreferenceNamespaceSchema, Mn as authProviderCapability, O as CREDENTIAL_TOKEN_AUDIENCE, Ol as userError, P as CredentialTokenClaimsSchema, Rc as defineRecordKinds, Si as isCredentialTokenPayload, gn as TokenScopeSchema, ni as formatDeviceRevoker, ol as makeSecretMarker, qt as PreferenceValueSchema, rl as isSecretMarker, sn as ScopedTokenSchema, un as SsoBridgeClaimsSchema, vn as UserRecordSchema, zn as buildDeviceEnrollmentLink } from "../../dist-
|
|
2
|
+
import { Bn as buildDeviceSignatureMessage, Bo as userManagementCapability, Bt as PREFERENCES_MAX_VALUE_BYTES, Dr as deviceCredentialsCapability, G as DEVICE_NONCE_TTL_MS, Gt as PreferenceDeviceIdSchema, H as DEVICE_ENROLLMENT_TTL_MS, Is as BaseAddon, Kt as PreferenceNamespaceSchema, Mn as authProviderCapability, O as CREDENTIAL_TOKEN_AUDIENCE, Ol as userError, P as CredentialTokenClaimsSchema, Rc as defineRecordKinds, Si as isCredentialTokenPayload, gn as TokenScopeSchema, ni as formatDeviceRevoker, ol as makeSecretMarker, qt as PreferenceValueSchema, rl as isSecretMarker, sn as ScopedTokenSchema, un as SsoBridgeClaimsSchema, vn as UserRecordSchema, zn as buildDeviceEnrollmentLink } from "../../dist-D1LOSOS0.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-B-yM5jiy.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
|
-
import * as fs from "node:fs";
|
|
11
|
+
import * as fs$1 from "node:fs";
|
|
12
12
|
import * as path$1 from "node:path";
|
|
13
13
|
//#region ../../node_modules/bcryptjs/index.js
|
|
14
14
|
/**
|
|
@@ -11925,8 +11925,8 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
11925
11925
|
users: this.userManager,
|
|
11926
11926
|
dataDir: this.ctx.nodeDataDir,
|
|
11927
11927
|
fs: {
|
|
11928
|
-
exists: (filePath) => fs.existsSync(filePath),
|
|
11929
|
-
remove: (filePath) => fs.rmSync(filePath, { force: true })
|
|
11928
|
+
exists: (filePath) => fs$1.existsSync(filePath),
|
|
11929
|
+
remove: (filePath) => fs$1.rmSync(filePath, { force: true })
|
|
11930
11930
|
},
|
|
11931
11931
|
logger: this.ctx.logger
|
|
11932
11932
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
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-uTbt3Yxy.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_identity = require("../../hub-identity-
|
|
6
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_identity = require("../../hub-identity-TBo0Xrxk.js");
|
|
6
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-C0xzb8jM.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_net = require("node:net");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ci as isDefaultAppConnectionEndpoint, Ct as HUB_MDNS_TXT_KEYS, Fc as defineAddonMigrations, Ha as resolveAppConnections, Ho as validateCustomAddress, Il as errMsg, Is as BaseAddon, Li as localNetworkCapability, Rl as EventCategory, Rt as NetworkTunnelStartedDataSchema, St as HUB_MDNS_SERVICE_TYPE, Za as resolveNotificationTapAddress, Zn as checkRoleAddress, go as shortHostname, ha as pickAppLinkHub, qa as resolveHubAddressRoles, vi as isAppLinkBase, x as CAMSTACK_APP_LINK_ORIGIN, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Ci as isDefaultAppConnectionEndpoint, Ct as HUB_MDNS_TXT_KEYS, Fc as defineAddonMigrations, Ha as resolveAppConnections, Ho as validateCustomAddress, Il as errMsg, Is as BaseAddon, Li as localNetworkCapability, Rl as EventCategory, Rt as NetworkTunnelStartedDataSchema, St as HUB_MDNS_SERVICE_TYPE, Za as resolveNotificationTapAddress, Zn as checkRoleAddress, go as shortHostname, ha as pickAppLinkHub, qa as resolveHubAddressRoles, vi as isAppLinkBase, x as CAMSTACK_APP_LINK_ORIGIN, xa as preconditionOf } from "../../dist-D1LOSOS0.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 { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-
|
|
4
|
-
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 { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-Dx3Jbhnp.mjs";
|
|
4
|
+
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-Br5Vlcf0.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
@@ -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-uTbt3Yxy.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 { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-D1LOSOS0.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-uTbt3Yxy.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-
|
|
2
|
-
import * as fs from "node:fs";
|
|
1
|
+
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-D1LOSOS0.mjs";
|
|
2
|
+
import * as fs$1 from "node:fs";
|
|
3
3
|
import { constants, readFileSync } from "node:fs";
|
|
4
4
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
5
5
|
import { promisify } from "node:util";
|
|
@@ -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.readFileSync("/proc/meminfo", "utf-8");
|
|
1689
|
+
const meminfo = fs$1.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.statfs(dirPath, (err, stats) => {
|
|
1782
|
+
fs$1.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.readFileSync("/proc/diskstats", "utf-8");
|
|
1800
|
+
const data = fs$1.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.readFileSync("/proc/net/dev", "utf-8");
|
|
1831
|
+
const data = fs$1.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.readFileSync(p, "utf-8").trim();
|
|
1892
|
+
const raw = fs$1.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.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1943
|
+
openFds = fs$1.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1944
1944
|
} catch {}
|
|
1945
1945
|
try {
|
|
1946
|
-
const match = fs.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
|
|
1946
|
+
const match = fs$1.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.readFileSync(`/proc/pressure/${resource}`, "utf-8");
|
|
1961
|
+
const data = fs$1.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-uTbt3Yxy.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|