@camstack/server 1.2.823 → 1.2.824
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 +6 -0
- package/dist/api/trpc/generated-cap-routers.js +0 -45
- package/package.json +11 -10
- package/system/dist/addon-runner.js +24 -2
- package/system/dist/addon-runner.mjs +25 -3
- package/system/dist/addon-utils.d.ts +1 -0
- package/system/dist/addon-utils.js +2 -0
- package/system/dist/addon-utils.mjs +3 -2
- package/system/dist/{agent-https-Df53Fvk1.js → agent-https-B2nqARmj.js} +1 -1
- package/system/dist/{agent-https-CDl7mB_F.mjs → agent-https-BBO2OtNH.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/actions-service.d.ts +8 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +78 -22
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +79 -23
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +1 -0
- 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 +8 -3
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +8 -3
- 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 +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +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/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 +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/cap-call-scope-8eiugfLl.js +46 -0
- package/system/dist/cap-call-scope-Bic6Ekfw.mjs +30 -0
- package/system/dist/{capture-engine-D_GQBgrZ.mjs → capture-engine-C-rHYVFq.mjs} +1 -1
- package/system/dist/{capture-engine-C0Z5rwCO.js → capture-engine-DP4HbT3W.js} +1 -1
- package/system/dist/{composition-sources-mx-2yCDv.mjs → composition-sources-CL9JFN4y.mjs} +1 -1
- package/system/dist/{composition-sources-DIZx3mW3.js → composition-sources-CM9c_jAj.js} +1 -1
- package/system/dist/{constants-BQlx9HDp.mjs → constants-DzGFnCKZ.mjs} +1 -1
- package/system/dist/{constants-CAOcKiWT.js → constants-jk7JccZ0.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-93LsCF_Q.js → device-ca-B7_R5WJh.js} +1 -1
- package/system/dist/{device-ca-CK6GTnNh.mjs → device-ca-DZ_OQiCc.mjs} +1 -1
- package/system/dist/{dist-BQiyo22b.mjs → dist-BgRMQHuL.mjs} +97 -160
- package/system/dist/{dist-izXDzt4g.js → dist-BpTL3uNe.js} +108 -159
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-srpOrqIP.mjs → hub-mdns-ciao-DIcBingB.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dt_tgvol.js → hub-mdns-ciao-DPUaYAD3.js} +2 -2
- package/system/dist/index.d.ts +1 -0
- package/system/dist/index.js +47 -29
- package/system/dist/index.mjs +257 -242
- package/system/dist/kernel/cap-call-scope.d.ts +10 -0
- package/system/dist/kernel/transport/cap-route-resolver.d.ts +27 -1
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +0 -11
- package/system/dist/{legacy-integration-rows-door-wu2GWY6U.mjs → legacy-integration-rows-door-1GnkpMgH.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BH43eDu6.js → legacy-integration-rows-door-DYNePgj4.js} +1 -1
- package/system/dist/{rename-composition-block-CH6ZoSJA.mjs → rename-composition-block-Cp0_nwAI.mjs} +1 -1
- package/system/dist/{rename-composition-block-6oLQVzft.js → rename-composition-block-Dn2z4fnA.js} +1 -1
- package/system/dist/{restore-archive-C4rR2SYV.mjs → restore-archive-B3FEpUfz.mjs} +94 -94
- package/system/dist/{restore-archive-DpZ2PbLN.js → restore-archive-BGa5pdp9.js} +1 -1
- package/system/dist/{wal-maintenance-CNfp0HHX.mjs → wal-maintenance-BLWLlVfF.mjs} +0 -0
- package/system/dist/{wal-maintenance-DAA2qJja.js → wal-maintenance-GWFxnSnE.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
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-BpTL3uNe.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
-
const require_capture_engine = require("../../capture-engine-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-CM9c_jAj.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-DP4HbT3W.js");
|
|
7
7
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
8
8
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
9
|
+
const require_cap_call_scope = require("../../cap-call-scope-8eiugfLl.js");
|
|
9
10
|
let zod = require("zod");
|
|
10
11
|
let node_crypto = require("node:crypto");
|
|
11
12
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -594,6 +595,7 @@ var ActionRowBodySchema = zod.z.object({
|
|
|
594
595
|
name: zod.z.string().min(1).max(120),
|
|
595
596
|
steps: zod.z.array(require_dist.ActionStepSchema).min(1).max(50),
|
|
596
597
|
variables: zod.z.array(require_dist.ActionVariableSchema).max(20).optional(),
|
|
598
|
+
minDelaySec: require_dist.ActionMinDelaySecSchema.optional(),
|
|
597
599
|
createdAt: zod.z.number(),
|
|
598
600
|
updatedAt: zod.z.number()
|
|
599
601
|
});
|
|
@@ -3061,6 +3063,8 @@ var ActionsService = class {
|
|
|
3061
3063
|
templates;
|
|
3062
3064
|
conditions;
|
|
3063
3065
|
running = /* @__PURE__ */ new Map();
|
|
3066
|
+
/** Last run START per action — the throttle's memory. */
|
|
3067
|
+
lastStartedAt = /* @__PURE__ */ new Map();
|
|
3064
3068
|
maxRunMs;
|
|
3065
3069
|
stopGraceMs;
|
|
3066
3070
|
constructor(deps) {
|
|
@@ -3220,6 +3224,36 @@ var ActionsService = class {
|
|
|
3220
3224
|
message
|
|
3221
3225
|
};
|
|
3222
3226
|
}
|
|
3227
|
+
const throttled = this.throttleOf(entry, startedAt);
|
|
3228
|
+
if (throttled !== null) {
|
|
3229
|
+
this.logger.info("action run throttled", { meta: {
|
|
3230
|
+
actionId: entry.id,
|
|
3231
|
+
runId,
|
|
3232
|
+
minDelaySec: entry.minDelaySec,
|
|
3233
|
+
sinceLastMs: throttled.sinceLastMs
|
|
3234
|
+
} });
|
|
3235
|
+
await this.record(entry.id, {
|
|
3236
|
+
runId,
|
|
3237
|
+
startedAt,
|
|
3238
|
+
endedAt: startedAt,
|
|
3239
|
+
trigger: {
|
|
3240
|
+
...trigger,
|
|
3241
|
+
outcome: "pass",
|
|
3242
|
+
reason: throttled.message
|
|
3243
|
+
},
|
|
3244
|
+
conditions: [],
|
|
3245
|
+
steps: [],
|
|
3246
|
+
outcome: "skipped-cooldown",
|
|
3247
|
+
repeat: 1,
|
|
3248
|
+
lastAt: startedAt
|
|
3249
|
+
});
|
|
3250
|
+
return {
|
|
3251
|
+
runId,
|
|
3252
|
+
outcome: "skipped-cooldown",
|
|
3253
|
+
message: throttled.message
|
|
3254
|
+
};
|
|
3255
|
+
}
|
|
3256
|
+
this.lastStartedAt.set(entry.id, startedAt);
|
|
3223
3257
|
const token = new RunToken();
|
|
3224
3258
|
this.running.set(entry.id, {
|
|
3225
3259
|
runId,
|
|
@@ -3241,6 +3275,20 @@ var ActionsService = class {
|
|
|
3241
3275
|
outcome: "started"
|
|
3242
3276
|
};
|
|
3243
3277
|
}
|
|
3278
|
+
/**
|
|
3279
|
+
* The action's throttle (`minDelaySec`): null when this start is let through.
|
|
3280
|
+
* The stamp is memory — the authority at fire time (D49) — and a restart
|
|
3281
|
+
* forgets it, which only ever lets one extra run through.
|
|
3282
|
+
*/
|
|
3283
|
+
throttleOf(entry, at) {
|
|
3284
|
+
const windowMs = (entry.minDelaySec ?? 0) * 1e3;
|
|
3285
|
+
const last = this.lastStartedAt.get(entry.id);
|
|
3286
|
+
if (windowMs <= 0 || last === void 0 || at - last >= windowMs) return null;
|
|
3287
|
+
return {
|
|
3288
|
+
sinceLastMs: at - last,
|
|
3289
|
+
message: `throttled — the action may start at most every ${String(entry.minDelaySec)} s`
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3244
3292
|
triggerOf(input, values) {
|
|
3245
3293
|
const vars = {};
|
|
3246
3294
|
for (const [name, value] of Object.entries(values)) vars[`var.${name}`] = value;
|
|
@@ -3377,25 +3425,29 @@ var ActionsService = class {
|
|
|
3377
3425
|
};
|
|
3378
3426
|
}
|
|
3379
3427
|
runnableFor(entry, values, token, runId, readable) {
|
|
3380
|
-
if (entry.source === "internal")
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3428
|
+
if (entry.source === "internal") {
|
|
3429
|
+
const ruleFire = require_dist.ruleFireOfClaim(require_cap_call_scope.readCurrentCommandOrigin());
|
|
3430
|
+
return require_dist.buildActionSteps(entry.steps ?? [], values, {
|
|
3431
|
+
invokeCap: (call) => this.invokeCap({
|
|
3432
|
+
...call,
|
|
3433
|
+
origin: {
|
|
3434
|
+
kind: "action",
|
|
3435
|
+
actionId: entry.id,
|
|
3436
|
+
runId,
|
|
3437
|
+
...ruleFire !== void 0 ? { ruleFire } : {}
|
|
3438
|
+
}
|
|
3439
|
+
}),
|
|
3440
|
+
sleep: (ms) => token.sleep(ms),
|
|
3441
|
+
resolveTarget: (target, actionId, vars, origin) => this.targets.resolve(target, actionId, vars, origin),
|
|
3442
|
+
owner: entry.id,
|
|
3443
|
+
renderTemplates: stepRenderer(this.templates, readable),
|
|
3444
|
+
...conditionDeps(stepConditionEvaluator(this.conditions, readable)),
|
|
3445
|
+
onMissingVar: (name) => this.logger.warn("action template referenced a variable that was never set", { meta: {
|
|
3385
3446
|
actionId: entry.id,
|
|
3386
|
-
|
|
3387
|
-
}
|
|
3388
|
-
})
|
|
3389
|
-
|
|
3390
|
-
resolveTarget: (target, actionId, vars, origin) => this.targets.resolve(target, actionId, vars, origin),
|
|
3391
|
-
owner: entry.id,
|
|
3392
|
-
renderTemplates: stepRenderer(this.templates, readable),
|
|
3393
|
-
...conditionDeps(stepConditionEvaluator(this.conditions, readable)),
|
|
3394
|
-
onMissingVar: (name) => this.logger.warn("action template referenced a variable that was never set", { meta: {
|
|
3395
|
-
actionId: entry.id,
|
|
3396
|
-
variable: name
|
|
3397
|
-
} })
|
|
3398
|
-
});
|
|
3447
|
+
variable: name
|
|
3448
|
+
} })
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3399
3451
|
return [{
|
|
3400
3452
|
meta: { kind: "addon" },
|
|
3401
3453
|
run: () => this.sources.run({
|
|
@@ -3459,7 +3511,8 @@ var ActionsService = class {
|
|
|
3459
3511
|
const action = await this.store.update(input.actionId, {
|
|
3460
3512
|
name: patch.name ?? existing.name,
|
|
3461
3513
|
steps,
|
|
3462
|
-
...(patch.variables ?? existing.variables) === void 0 ? {} : { variables: patch.variables ?? existing.variables }
|
|
3514
|
+
...(patch.variables ?? existing.variables) === void 0 ? {} : { variables: patch.variables ?? existing.variables },
|
|
3515
|
+
...(patch.minDelaySec ?? existing.minDelaySec) === void 0 ? {} : { minDelaySec: patch.minDelaySec ?? existing.minDelaySec }
|
|
3463
3516
|
});
|
|
3464
3517
|
this.logger.info("internal action updated", { meta: { actionId: action.id } });
|
|
3465
3518
|
return {
|
|
@@ -3594,6 +3647,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3594
3647
|
readOnly: false,
|
|
3595
3648
|
steps: require_dist.normalizeStepTargets(body.steps),
|
|
3596
3649
|
...body.variables === void 0 ? {} : { variables: body.variables },
|
|
3650
|
+
...body.minDelaySec === void 0 || body.minDelaySec === 0 ? {} : { minDelaySec: body.minDelaySec },
|
|
3597
3651
|
status: require_dist.IDLE_ACTION_STATUS
|
|
3598
3652
|
};
|
|
3599
3653
|
}
|
|
@@ -3645,6 +3699,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3645
3699
|
name: input.name,
|
|
3646
3700
|
steps: input.steps,
|
|
3647
3701
|
...input.variables === void 0 ? {} : { variables: input.variables },
|
|
3702
|
+
...input.minDelaySec === void 0 || input.minDelaySec === 0 ? {} : { minDelaySec: input.minDelaySec },
|
|
3648
3703
|
createdAt: at,
|
|
3649
3704
|
updatedAt: at
|
|
3650
3705
|
};
|
|
@@ -3661,6 +3716,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3661
3716
|
name: input.name,
|
|
3662
3717
|
steps: input.steps,
|
|
3663
3718
|
...input.variables === void 0 ? {} : { variables: input.variables },
|
|
3719
|
+
...input.minDelaySec === void 0 || input.minDelaySec === 0 ? {} : { minDelaySec: input.minDelaySec },
|
|
3664
3720
|
createdAt: existing.data.createdAt,
|
|
3665
3721
|
updatedAt: this.now()
|
|
3666
3722
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $c as vocabActionIdFor, $s as collectSecretMarkerRefs, $t as SchedulerError, Aa as resolveStepArgs, An as buildActionSteps, Ar as evaluateStepCondition, Ba as seedInstanceOnce, Bi as normalizeStepTargets, C as COMPOSER_RUNNER_ID, Cn as appendTrace, Co as weekdayOfLocalDate, Dc as isSecretMarker, Do as COMPOSER_ADDON_ID, Eo as zoneOnlySite, Gn as collectDeviceTemplates, Hc as resolveSecretMarkers, Ht as QuantityUnitError, Ia as schedulersCapability, Ii as nextOccurrence, Jo as helperMembers, Jt as RemoteLayoutPayloadSchema, Ka as siteFor, Kc as secretTreeFromSchema, Kn as collectWhenMirrorSources, Li as normalizeActionUnits, M as CoreBlockSchema, Na as runSteps, Oa as resolveRemoteSource, Oo as CompositionSchema, Pn as buildHeroModel, Po as HelperMemberSchema, Q as DeclaredDevices, Qi as planComposition, Qn as compositionSourceRefs, Ri as normalizeCapStep, Ro as composedDeviceRef, Rr as fanPresetsCapability, Rt as PowerSourceInfoSchema, Sa as resolveHeroLayout, T as CORE_BLOCK_ADDON_PREFIX, Uc as ruleFireOfClaim, Un as checkTemplatePayload, Uo as compositionSourceKey, Us as actionEffect, Vr as findChannelSource, Wi as occurrenceOn, Wt as REMOTE_MEDIA_COMMANDS, Xa as stableIdMapOf, Xr as integrationInstancesCapability, Yn as compileScalarOverride, Yo as historyRetentionFromSettings, Yr as heroLayoutCapability, Yt as RunningStateStatusSchema, Zc as transformSecretWrite, Zr as internalActionId, _a as resolveActionVariables, _c as hydrateSchema, _i as localDateOf, ac as defineAddonMigrations, al as errMsg$1, at as EMPTY_REMOTE_CONFIG, ba as resolveCoreBlockEntry, bt as INTERNAL_ACTION_PREFIX, c as ActionError, cc as defineRecordKinds, cn as SwitchStatusSchema, co as timedRunCapability, ct as FanControlStatusSchema, d as ActionTargetResolver, dc as entryBody, di as kebabToCamel, do as timedRunQuickRun, ea as powerSourceCapability, en as SchedulerSchema, er as coreBlockAddonId, f as ActionVariableSchema, fo as timedRunSeconds, ga as replacedFieldKeys, gn as addonIdOfActionId, go as validateComposition, h as BUILTIN_REMOTE_COMPONENTS, ha as remoteSourceSteps, hn as actionsCapability, hr as describeComposableCaps, il as DeviceType$1, ir as coreBlocksCapability, it as EMPTY_REMOTE_ASSUMED_STATE, j as ControlStatusSchema, jn as buildCapabilityLookup, jr as evaluateWhenTree, js as RecordIntegrationInstances, k as ConditionMirror, kc as isSecretRefOwnedBy, ko as DAY_MS, kt as MediaPlayerStatusSchema, l as ActionMinDelaySecSchema, la as readStoredRemoteConfig, ln as TemplateKindSchema, lo as timedRunLimitOf, m as AutomationStateDocSchema, ma as remoteLayoutComponentsCapability, mn as actionWaitTotalMs, n as ACTION_TARGET_INVALIDATION_EVENTS, nc as commandOrigin$1, nr as coreBlockIdFromAddonId, oa as projectDeviceRow, oi as isInternalActionId, ot as FAN_CAPTURE_FIELDS, pa as remoteCapability, pn as actionSourceCapability, po as toTimings, qt as RemoteAssumedStateSchema, ra as problemsBlockSave, rr as coreBlockSourceKind, rt as EMPTY_AUTOMATION_STATE, s as ALL_CAPABILITY_DEFINITIONS, sa as proposeRunningThreshold, sc as defineEntryKind, sl as EventCategory$1, so as templateCapability, sr as customKeyOfRole, ss as BaseAddon, ta as powerSourceLinkOfComposition, tr as coreBlockComposition, u as ActionStepSchema, uo as timedRunMaxIn, ut as FanPresetSchema, vo as validateSchedulerInput, w as CORE_BLOCKS_ADDON_ID, xa as resolveCoreBlockFiles, xi as lockDoorLinkOfComposition, yt as IDLE_ACTION_STATUS, z as DEFAULT_HOLD_OVERRIDE, zi as normalizeCoreBlockWrite, zn as capUnitResolver, zo as composedDeviceStableId } from "../../dist-BgRMQHuL.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-CL9JFN4y.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-C-rHYVFq.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
|
+
import { n as readCurrentCommandOrigin } from "../../cap-call-scope-Bic6Ekfw.mjs";
|
|
7
8
|
import { createRequire } from "node:module";
|
|
8
9
|
import { z } from "zod";
|
|
9
10
|
import { randomUUID } from "node:crypto";
|
|
@@ -589,6 +590,7 @@ var ActionRowBodySchema = z.object({
|
|
|
589
590
|
name: z.string().min(1).max(120),
|
|
590
591
|
steps: z.array(ActionStepSchema).min(1).max(50),
|
|
591
592
|
variables: z.array(ActionVariableSchema).max(20).optional(),
|
|
593
|
+
minDelaySec: ActionMinDelaySecSchema.optional(),
|
|
592
594
|
createdAt: z.number(),
|
|
593
595
|
updatedAt: z.number()
|
|
594
596
|
});
|
|
@@ -3055,6 +3057,8 @@ var ActionsService = class {
|
|
|
3055
3057
|
templates;
|
|
3056
3058
|
conditions;
|
|
3057
3059
|
running = /* @__PURE__ */ new Map();
|
|
3060
|
+
/** Last run START per action — the throttle's memory. */
|
|
3061
|
+
lastStartedAt = /* @__PURE__ */ new Map();
|
|
3058
3062
|
maxRunMs;
|
|
3059
3063
|
stopGraceMs;
|
|
3060
3064
|
constructor(deps) {
|
|
@@ -3214,6 +3218,36 @@ var ActionsService = class {
|
|
|
3214
3218
|
message
|
|
3215
3219
|
};
|
|
3216
3220
|
}
|
|
3221
|
+
const throttled = this.throttleOf(entry, startedAt);
|
|
3222
|
+
if (throttled !== null) {
|
|
3223
|
+
this.logger.info("action run throttled", { meta: {
|
|
3224
|
+
actionId: entry.id,
|
|
3225
|
+
runId,
|
|
3226
|
+
minDelaySec: entry.minDelaySec,
|
|
3227
|
+
sinceLastMs: throttled.sinceLastMs
|
|
3228
|
+
} });
|
|
3229
|
+
await this.record(entry.id, {
|
|
3230
|
+
runId,
|
|
3231
|
+
startedAt,
|
|
3232
|
+
endedAt: startedAt,
|
|
3233
|
+
trigger: {
|
|
3234
|
+
...trigger,
|
|
3235
|
+
outcome: "pass",
|
|
3236
|
+
reason: throttled.message
|
|
3237
|
+
},
|
|
3238
|
+
conditions: [],
|
|
3239
|
+
steps: [],
|
|
3240
|
+
outcome: "skipped-cooldown",
|
|
3241
|
+
repeat: 1,
|
|
3242
|
+
lastAt: startedAt
|
|
3243
|
+
});
|
|
3244
|
+
return {
|
|
3245
|
+
runId,
|
|
3246
|
+
outcome: "skipped-cooldown",
|
|
3247
|
+
message: throttled.message
|
|
3248
|
+
};
|
|
3249
|
+
}
|
|
3250
|
+
this.lastStartedAt.set(entry.id, startedAt);
|
|
3217
3251
|
const token = new RunToken();
|
|
3218
3252
|
this.running.set(entry.id, {
|
|
3219
3253
|
runId,
|
|
@@ -3235,6 +3269,20 @@ var ActionsService = class {
|
|
|
3235
3269
|
outcome: "started"
|
|
3236
3270
|
};
|
|
3237
3271
|
}
|
|
3272
|
+
/**
|
|
3273
|
+
* The action's throttle (`minDelaySec`): null when this start is let through.
|
|
3274
|
+
* The stamp is memory — the authority at fire time (D49) — and a restart
|
|
3275
|
+
* forgets it, which only ever lets one extra run through.
|
|
3276
|
+
*/
|
|
3277
|
+
throttleOf(entry, at) {
|
|
3278
|
+
const windowMs = (entry.minDelaySec ?? 0) * 1e3;
|
|
3279
|
+
const last = this.lastStartedAt.get(entry.id);
|
|
3280
|
+
if (windowMs <= 0 || last === void 0 || at - last >= windowMs) return null;
|
|
3281
|
+
return {
|
|
3282
|
+
sinceLastMs: at - last,
|
|
3283
|
+
message: `throttled — the action may start at most every ${String(entry.minDelaySec)} s`
|
|
3284
|
+
};
|
|
3285
|
+
}
|
|
3238
3286
|
triggerOf(input, values) {
|
|
3239
3287
|
const vars = {};
|
|
3240
3288
|
for (const [name, value] of Object.entries(values)) vars[`var.${name}`] = value;
|
|
@@ -3371,25 +3419,29 @@ var ActionsService = class {
|
|
|
3371
3419
|
};
|
|
3372
3420
|
}
|
|
3373
3421
|
runnableFor(entry, values, token, runId, readable) {
|
|
3374
|
-
if (entry.source === "internal")
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3422
|
+
if (entry.source === "internal") {
|
|
3423
|
+
const ruleFire = ruleFireOfClaim(readCurrentCommandOrigin());
|
|
3424
|
+
return buildActionSteps(entry.steps ?? [], values, {
|
|
3425
|
+
invokeCap: (call) => this.invokeCap({
|
|
3426
|
+
...call,
|
|
3427
|
+
origin: {
|
|
3428
|
+
kind: "action",
|
|
3429
|
+
actionId: entry.id,
|
|
3430
|
+
runId,
|
|
3431
|
+
...ruleFire !== void 0 ? { ruleFire } : {}
|
|
3432
|
+
}
|
|
3433
|
+
}),
|
|
3434
|
+
sleep: (ms) => token.sleep(ms),
|
|
3435
|
+
resolveTarget: (target, actionId, vars, origin) => this.targets.resolve(target, actionId, vars, origin),
|
|
3436
|
+
owner: entry.id,
|
|
3437
|
+
renderTemplates: stepRenderer(this.templates, readable),
|
|
3438
|
+
...conditionDeps(stepConditionEvaluator(this.conditions, readable)),
|
|
3439
|
+
onMissingVar: (name) => this.logger.warn("action template referenced a variable that was never set", { meta: {
|
|
3379
3440
|
actionId: entry.id,
|
|
3380
|
-
|
|
3381
|
-
}
|
|
3382
|
-
})
|
|
3383
|
-
|
|
3384
|
-
resolveTarget: (target, actionId, vars, origin) => this.targets.resolve(target, actionId, vars, origin),
|
|
3385
|
-
owner: entry.id,
|
|
3386
|
-
renderTemplates: stepRenderer(this.templates, readable),
|
|
3387
|
-
...conditionDeps(stepConditionEvaluator(this.conditions, readable)),
|
|
3388
|
-
onMissingVar: (name) => this.logger.warn("action template referenced a variable that was never set", { meta: {
|
|
3389
|
-
actionId: entry.id,
|
|
3390
|
-
variable: name
|
|
3391
|
-
} })
|
|
3392
|
-
});
|
|
3441
|
+
variable: name
|
|
3442
|
+
} })
|
|
3443
|
+
});
|
|
3444
|
+
}
|
|
3393
3445
|
return [{
|
|
3394
3446
|
meta: { kind: "addon" },
|
|
3395
3447
|
run: () => this.sources.run({
|
|
@@ -3453,7 +3505,8 @@ var ActionsService = class {
|
|
|
3453
3505
|
const action = await this.store.update(input.actionId, {
|
|
3454
3506
|
name: patch.name ?? existing.name,
|
|
3455
3507
|
steps,
|
|
3456
|
-
...(patch.variables ?? existing.variables) === void 0 ? {} : { variables: patch.variables ?? existing.variables }
|
|
3508
|
+
...(patch.variables ?? existing.variables) === void 0 ? {} : { variables: patch.variables ?? existing.variables },
|
|
3509
|
+
...(patch.minDelaySec ?? existing.minDelaySec) === void 0 ? {} : { minDelaySec: patch.minDelaySec ?? existing.minDelaySec }
|
|
3457
3510
|
});
|
|
3458
3511
|
this.logger.info("internal action updated", { meta: { actionId: action.id } });
|
|
3459
3512
|
return {
|
|
@@ -3588,6 +3641,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3588
3641
|
readOnly: false,
|
|
3589
3642
|
steps: normalizeStepTargets(body.steps),
|
|
3590
3643
|
...body.variables === void 0 ? {} : { variables: body.variables },
|
|
3644
|
+
...body.minDelaySec === void 0 || body.minDelaySec === 0 ? {} : { minDelaySec: body.minDelaySec },
|
|
3591
3645
|
status: IDLE_ACTION_STATUS
|
|
3592
3646
|
};
|
|
3593
3647
|
}
|
|
@@ -3639,6 +3693,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3639
3693
|
name: input.name,
|
|
3640
3694
|
steps: input.steps,
|
|
3641
3695
|
...input.variables === void 0 ? {} : { variables: input.variables },
|
|
3696
|
+
...input.minDelaySec === void 0 || input.minDelaySec === 0 ? {} : { minDelaySec: input.minDelaySec },
|
|
3642
3697
|
createdAt: at,
|
|
3643
3698
|
updatedAt: at
|
|
3644
3699
|
};
|
|
@@ -3655,6 +3710,7 @@ var ActionsStore = class ActionsStore {
|
|
|
3655
3710
|
name: input.name,
|
|
3656
3711
|
steps: input.steps,
|
|
3657
3712
|
...input.variables === void 0 ? {} : { variables: input.variables },
|
|
3713
|
+
...input.minDelaySec === void 0 || input.minDelaySec === 0 ? {} : { minDelaySec: input.minDelaySec },
|
|
3658
3714
|
createdAt: existing.data.createdAt,
|
|
3659
3715
|
updatedAt: this.now()
|
|
3660
3716
|
};
|
|
@@ -3822,7 +3878,7 @@ function invokeCapOver(api) {
|
|
|
3822
3878
|
...call.args,
|
|
3823
3879
|
deviceId: call.deviceId
|
|
3824
3880
|
};
|
|
3825
|
-
await Reflect.apply(mutate, procedure, call.origin === void 0 ? [input] : [input, commandOrigin(call.origin)]);
|
|
3881
|
+
await Reflect.apply(mutate, procedure, call.origin === void 0 ? [input] : [input, commandOrigin$1(call.origin)]);
|
|
3826
3882
|
};
|
|
3827
3883
|
}
|
|
3828
3884
|
/**
|
|
@@ -35,6 +35,7 @@ export type ActionRowBody = {
|
|
|
35
35
|
readonly name: string;
|
|
36
36
|
readonly steps: z.infer<typeof ActionStepSchema>[];
|
|
37
37
|
readonly variables?: z.infer<typeof ActionVariableSchema>[];
|
|
38
|
+
readonly minDelaySec?: number;
|
|
38
39
|
readonly createdAt: number;
|
|
39
40
|
readonly updatedAt: number;
|
|
40
41
|
};
|
|
@@ -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-BpTL3uNe.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-DP4HbT3W.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 {
|
|
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 { $ as DeviceRunSchema, H as DEVICE_HISTORY_ENERGY_KEY, Ps as RecordTooLargeError, Sr as deviceRunsCapability, Tr as deviceTransitionsCapability, cc as defineRecordKinds, gc as historyUnitFor, ht as HISTORY_ITEM_CATALOG, il as DeviceType, ms as DeviceTransitionSchema, mt as HISTORY_CATALOG, os as wattMillisecondsToKwh, sl as EventCategory, ss as BaseAddon, uc as emitReadiness, vs as InvalidRecordError, wc as isReadingQuantity, wn as armRemovalReconcile, xr as deviceRemovalHookCapability, yr as deviceHistoryCapability } from "../../dist-BgRMQHuL.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-C-rHYVFq.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-BpTL3uNe.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-Dn2z4fnA.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");
|
|
@@ -11584,11 +11584,16 @@ function addonCommandActor(addonId, origin, nodeId) {
|
|
|
11584
11584
|
runId: origin.runId,
|
|
11585
11585
|
...origin.automationId !== void 0 ? { automationId: origin.automationId } : {}
|
|
11586
11586
|
};
|
|
11587
|
-
return {
|
|
11587
|
+
if (origin.kind === "scheduler") return {
|
|
11588
11588
|
kind: "scheduler",
|
|
11589
11589
|
addonId,
|
|
11590
11590
|
schedulerId: origin.schedulerId
|
|
11591
11591
|
};
|
|
11592
|
+
return {
|
|
11593
|
+
kind: "addon",
|
|
11594
|
+
addonId,
|
|
11595
|
+
...nodeId !== void 0 ? { nodeId } : {}
|
|
11596
|
+
};
|
|
11592
11597
|
}
|
|
11593
11598
|
function deferred() {
|
|
11594
11599
|
let resolve = () => void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cc as isKeychainStoredField, Cr as deviceStateCapability, Dc as isSecretMarker, Dr as enumerateItemArrayFields, Dt as MINUTES_PER_DAY, Fa as runtimeStatePolicyFor, Fn as buildStreamParamsConfigSchema, Gc as secretTreeFromPaths, Hc as resolveSecretMarkers, Hs as WELL_KNOWN_TAB_MAP, J as DEVICE_TEMPLATE_MAX_LENGTH, Jc as sleep$2, Ji as parseStreamParamsFormPatch, Kr as generateDeviceAlias, Ls as SECRET_CLEAR, Nr as expandContainer, Oc as isSecretMarkerLike, Or as enumerateSchemaFields, Pa as runtimeFieldUnit, Qc as userError, Qt as STREAM_PROFILE_META, R as DAY_NAMES, Rn as canonicalIconKey, Tc as isSecretClear, Vi as normalizeUnit, Vn as checkDeviceAlias, Wr as formatMinutes, Xc as toSecretFieldView, Y as DEVICE_TEMPLATE_MAX_OUTPUT, Ys as auditedFields, Zc as transformSecretWrite, al as errMsg$1, b as CAP_NAMES_WITH_STATUS, bc as isDeviceConfigCap, br as deviceManagerCapability, cc as defineRecordKinds, dt as FieldClaimModeSchema, ec as collectZodSecretPaths$1, et as DeviceStatusSchema, fc as expandCapMethods$1, ft as FieldClaimSchema, il as DeviceType$1, ja as resolveTemplateRef, k as ConditionMirror, mi as legacyAutoLinkIds, nl as DeviceFeature, nt as DiscoveryProposalBodySchema, or as createDeviceExtensionProvider, pr as defineExtensionSlotProvider, q as DEVICE_TEMPLATE_FILTERS, qa as siteZoneKey, rl as DeviceRole, s as ALL_CAPABILITY_DEFINITIONS, sl as EventCategory$1, ss as BaseAddon, tc as commandEffect, tt as DeviceTombstoneSchema, v as CAMERA_SWITCH_ORDER, vc as isCommand$1, vr as deviceExtensionCapability, wr as deviceStatusCapability, yi as locationIconKey } from "../../dist-BgRMQHuL.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-Cp0_nwAI.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";
|
|
@@ -11577,11 +11577,16 @@ function addonCommandActor(addonId, origin, nodeId) {
|
|
|
11577
11577
|
runId: origin.runId,
|
|
11578
11578
|
...origin.automationId !== void 0 ? { automationId: origin.automationId } : {}
|
|
11579
11579
|
};
|
|
11580
|
-
return {
|
|
11580
|
+
if (origin.kind === "scheduler") return {
|
|
11581
11581
|
kind: "scheduler",
|
|
11582
11582
|
addonId,
|
|
11583
11583
|
schedulerId: origin.schedulerId
|
|
11584
11584
|
};
|
|
11585
|
+
return {
|
|
11586
|
+
kind: "addon",
|
|
11587
|
+
addonId,
|
|
11588
|
+
...nodeId !== void 0 ? { nodeId } : {}
|
|
11589
|
+
};
|
|
11585
11590
|
}
|
|
11586
11591
|
function deferred() {
|
|
11587
11592
|
let resolve = () => void 0;
|
|
@@ -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-BpTL3uNe.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 { Si as logDestinationCapability, ss as BaseAddon } from "../../dist-BgRMQHuL.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-BpTL3uNe.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-B7_R5WJh.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-DYNePgj4.js");
|
|
10
|
+
const require_constants = require("../../constants-jk7JccZ0.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 { Ct as KeychainResetRecordSchema, Fc as normalizeSecretOwner, Rc as parseSecretRef, St as KeychainAuditEntrySchema, cc as defineRecordKinds, fi as keychainAdminCapability, pc as formatSecretScope, pi as keychainCapability, sl as EventCategory, ss as BaseAddon, xt as KEYCHAIN_RESET_TRIGGER_ACTOR } from "../../dist-BgRMQHuL.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-DZ_OQiCc.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-1GnkpMgH.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-DzGFnCKZ.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-BpTL3uNe.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 { Ei as mayWriteToLocation, Kt as RecordingStatusSchema, Ut as RECORDING_SOURCE_CAMSTACK_ADDON, al as errMsg, rc as createEvent, sl as EventCategory, ss as BaseAddon } from "../../dist-BgRMQHuL.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-BpTL3uNe.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-B7_R5WJh.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 {
|
|
2
|
+
import { Ac as makeSecretMarker, Bt as PreferenceNamespaceSchema, Dc as isSecretMarker, E as CREDENTIAL_TOKEN_AUDIENCE, Mn as buildDeviceEnrollmentLink, N as CredentialTokenClaimsSchema, Nn as buildDeviceSignatureMessage, Pt as PREFERENCES_MAX_VALUE_BYTES, Qc as userError, Tn as authProviderCapability, Ur as formatDeviceRevoker, V as DEVICE_ENROLLMENT_TTL_MS, Vt as PreferenceValueSchema, W as DEVICE_NONCE_TTL_MS, _r as deviceCredentialsCapability, cc as defineRecordKinds, fn as UserRecordSchema, ho as userManagementCapability, ii as isCredentialTokenPayload, rn as SsoBridgeClaimsSchema, ss as BaseAddon, tn as ScopedTokenSchema, un as TokenScopeSchema, zt as PreferenceDeviceIdSchema } from "../../dist-BgRMQHuL.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-DZ_OQiCc.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
|
/**
|
|
@@ -11912,8 +11912,8 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
11912
11912
|
users: this.userManager,
|
|
11913
11913
|
dataDir: this.ctx.nodeDataDir,
|
|
11914
11914
|
fs: {
|
|
11915
|
-
exists: (filePath) => fs.existsSync(filePath),
|
|
11916
|
-
remove: (filePath) => fs.rmSync(filePath, { force: true })
|
|
11915
|
+
exists: (filePath) => fs$1.existsSync(filePath),
|
|
11916
|
+
remove: (filePath) => fs$1.rmSync(filePath, { force: true })
|
|
11917
11917
|
},
|
|
11918
11918
|
logger: this.ctx.logger
|
|
11919
11919
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-BpTL3uNe.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DPUaYAD3.js");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
let node_net = require("node:net");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ca as resolveHubAddressRoles, Da as resolveNotificationTapAddress, Ga as shortHostname, Hn as checkRoleAddress, Mt as NetworkTunnelStartedDataSchema, Zi as pickAppLinkHub, _o as validateCustomAddress, _t as HUB_MDNS_TXT_KEYS, ac as defineAddonMigrations, ai as isDefaultAppConnectionEndpoint, al as errMsg, gt as HUB_MDNS_SERVICE_TYPE, na as preconditionOf, sl as EventCategory, ss as BaseAddon, ti as isAppLinkBase, va as resolveAppConnections, vi as localNetworkCapability, y as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-BgRMQHuL.mjs";
|
|
2
2
|
import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
3
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
3
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-DIcBingB.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isIP } from "node:net";
|
|
6
6
|
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-BpTL3uNe.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
|