@camstack/server 1.2.785 → 1.2.786
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 +7 -0
- package/dist/api/core/cap-providers.js +44 -7
- package/dist/api/trpc/generated-cap-routers.js +0 -9
- package/package.json +39 -11
- package/system/dist/addon-runner.js +11 -2
- package/system/dist/addon-runner.mjs +12 -3
- package/system/dist/{agent-https-CACfLh65.mjs → agent-https-D779EYj3.mjs} +1 -1
- package/system/dist/{agent-https-B7lqIrF1.js → agent-https-snFEmSqQ.js} +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 +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composed-device.d.ts +16 -0
- package/system/dist/builtins/composer/composer.addon.js +62 -13
- package/system/dist/builtins/composer/composer.addon.mjs +62 -13
- 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 +16 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +235 -37
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +235 -37
- package/system/dist/builtins/core-blocks/migrations/fountain-drink-drop.d.ts +21 -0
- package/system/dist/builtins/core-blocks/migrations/index.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 +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +2 -2
- package/system/dist/builtins/loki-logging/index.mjs +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- 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-Dw82x5UW.mjs → capture-engine-DkTEWrRe.mjs} +1 -1
- package/system/dist/{capture-engine-n5mJUHzf.js → capture-engine-NZ11ORZS.js} +1 -1
- package/system/dist/{composition-sources-Cdow6PNn.js → composition-sources-B6GYTy_7.js} +1 -1
- package/system/dist/{composition-sources-D-bbLadz.mjs → composition-sources-B9-lkIvO.mjs} +1 -1
- package/system/dist/{constants-C6UsfDdP.mjs → constants--9ui1LK0.mjs} +1 -1
- package/system/dist/{constants-Dmc-T4Zw.js → constants-DR8hdi45.js} +1 -1
- package/system/dist/{device-ca-OQqtK7Yy.mjs → device-ca-D-7tAHJ_.mjs} +1 -1
- package/system/dist/{device-ca-v8lGdWVk.js → device-ca-sIFmKkGM.js} +1 -1
- package/system/dist/{dist-CRWinpyX.mjs → dist-D-iGSnX_.mjs} +1039 -821
- package/system/dist/{dist-1X5ccoX2.js → dist-h3Yla8gE.js} +1092 -820
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-hBZgojNT.js → hub-mdns-ciao-C5DkUEZF.js} +2 -2
- package/system/dist/{hub-mdns-ciao-BQqm5eSM.mjs → hub-mdns-ciao-DuEfM0fI.mjs} +2 -2
- package/system/dist/index.js +19 -10
- package/system/dist/index.mjs +20 -11
- package/system/dist/kernel/moleculer/migration-api-facade.d.ts +2 -0
- package/system/dist/kernel/transport/local-child-client.d.ts +9 -0
- package/system/dist/{legacy-integration-rows-door-B7bwfRev.mjs → legacy-integration-rows-door-BTdhD-Yp.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BUjw8YoW.js → legacy-integration-rows-door-DTDD5wwC.js} +1 -1
- package/system/dist/{restore-archive-D9vM-Kzb.js → restore-archive-CkAD_-E9.js} +1 -1
- package/system/dist/{restore-archive-TST7tvBk.mjs → restore-archive-DQWz5Wp-.mjs} +82 -82
- package/system/dist/{wal-maintenance-wfVwXxO4.js → wal-maintenance-CB-O-GPP.js} +0 -0
- package/system/dist/{wal-maintenance-C7dJSaPS.mjs → wal-maintenance-DouX1XsY.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as EMPTY_AUTOMATION_STATE, $a as vocabActionIdFor, A as ControlStatusSchema, As as defineAddonMigrations, Ba as templateCapability, Bn as collectWhenMirrorSources, C as CORE_BLOCKS_ADDON_ID, Da as siteFor, Di as normalizeCapStep, Dn as buildActionSteps, Ec as EventCategory$1, Ei as normalizeActionUnits, Es as collectSecretMarkerRefs, Et as MediaPlayerStatusSchema, Fn as capUnitResolver, Ft as PowerSourceInfoSchema, Gt as RemoteConfigSchema, Ha as timedRunLimitOf, J as DeclaredDevices, Ja as validateSchedulerInput, Jn as coreBlockAddonId, Ka as validateComposition, Ki as problemsBlockSave, Kn as compositionSourceRefs, Kt as RunningStateStatusSchema, Lo as BaseAddon, Ni as occurrenceOn, Ns as defineRecordKinds, O as ConditionMirror, Oi as normalizeCoreBlockWrite, On as buildCapabilityLookup, Qn as coreBlocksCapability, Qs as isSecretRefOwnedBy, R as DEFAULT_HOLD_OVERRIDE, Rn as checkTemplatePayload, S as COMPOSER_RUNNER_ID, Tc as errMsg$1, Ti as nextOccurrence, To as historyRetentionFromSettings, Ua as timedRunSeconds, Ui as powerSourceCapability, Un as compileScalarOverride, Va as timedRunCapability, Vi as planComposition, Vr as internalActionId, Vs as hydrateSchema, Vt as REMOTE_MEDIA_COMMANDS, Wi as powerSourceLinkOfComposition, Wt as RemoteAssumedStateSchema, Xn as coreBlockIdFromAddonId, Xr as isInternalActionId, Xs as isSecretMarker, Xt as SchedulerSchema, Yi as proposeRunningThreshold, Yn as coreBlockComposition, Yt as SchedulerError, Zn as coreBlockSourceKind, an as TemplateKindSchema, ao as DAY_MS, bn as appendTrace, c as ActionError, d as ActionVariableSchema, dc as resolveSecretMarkers, di as lockDoorLinkOfComposition, dn as actionWaitTotalMs, ea as remoteCapability, eo as weekdayOfLocalDate, et as EMPTY_REMOTE_ASSUMED_STATE, fn as actionsCapability, ga as runSteps, gt as INTERNAL_ACTION_PREFIX, ht as IDLE_ACTION_STATUS, in as SwitchStatusSchema, io as CompositionSchema, it as FanControlStatusSchema, j as CoreBlockSchema, jr as fanPresetsCapability, ki as normalizeStepTargets, l as ActionStepSchema, ln as actionEffect, m as BUILTIN_REMOTE_COMPONENTS, ma as resolveStepArgs, mc as secretTreeFromSchema, mo as composedDeviceRef, n as ACTION_TARGET_INVALIDATION_EVENTS, na as replacedFieldKeys, no as zoneOnlySite, nr as customRole, nt as FAN_CAPTURE_FIELDS, oa as resolveCoreBlockEntry, ot as FanPresetSchema, p as AutomationStateDocSchema, pn as addonIdOfActionId, ra as resolveActionVariables, s as ALL_CAPABILITY_DEFINITIONS, sa as resolveCoreBlockFiles, si as localDateOf, ta as remoteLayoutComponentsCapability, ti as kebabToCamel, tr as customKeyOfRole, tt as EMPTY_REMOTE_CONFIG, u as ActionTargetResolver, un as actionSourceCapability, uo as HelperMemberSchema, ur as describeComposableCaps, va as schedulersCapability, w as CORE_BLOCK_ADDON_PREFIX, wc as DeviceType$1, wo as helperMembers, wr as evaluateWhenTree, yc as transformSecretWrite, yo as compositionSourceKey, zt as QuantityUnitError } from "../../dist-D-iGSnX_.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-
|
|
4
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
3
|
+
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-B9-lkIvO.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-DkTEWrRe.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 { createRequire } from "node:module";
|
|
@@ -1861,6 +1861,110 @@ var CoreBlockStore = class CoreBlockStore {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
};
|
|
1863
1863
|
//#endregion
|
|
1864
|
+
//#region src/builtins/core-blocks/migrations/fountain-drink-drop.ts
|
|
1865
|
+
/**
|
|
1866
|
+
* The drink counters leave the `pet-fountain` feature of a stored composition.
|
|
1867
|
+
*
|
|
1868
|
+
* The cap no longer has `lastDrink`, `currentHourDrink`, `last24hDrink` or
|
|
1869
|
+
* `todayDrink`, nor the `resetDailyConsumption` method (a fountain's tank is now a
|
|
1870
|
+
* `water` consumable derived from `waterLevel`). A fountain composed by the
|
|
1871
|
+
* previous preset still names them as fields and forwards the reset to a button,
|
|
1872
|
+
* which no longer validates. This removes the four fields and the one forward from
|
|
1873
|
+
* the `pet-fountain` feature and nothing else: the pump forward, the other fields,
|
|
1874
|
+
* the other features, the name and the enabled flag are kept.
|
|
1875
|
+
*
|
|
1876
|
+
* Only compositions that BUILD a pet fountain are touched. A row that does not
|
|
1877
|
+
* parse, a code block, a customization of an existing device, and a fountain
|
|
1878
|
+
* already without the counters are left exactly as they are, so a rerun edits
|
|
1879
|
+
* nothing. The block's `updatedAt` moves (it is the version an editor's
|
|
1880
|
+
* `expectedUpdatedAt` is checked against).
|
|
1881
|
+
*/
|
|
1882
|
+
var FOUNTAIN_DRINK_DROP_ID = "core-blocks/2026-11-06-fountain-drink-drop";
|
|
1883
|
+
var DROPPED_FIELDS = [
|
|
1884
|
+
"lastDrink",
|
|
1885
|
+
"currentHourDrink",
|
|
1886
|
+
"last24hDrink",
|
|
1887
|
+
"todayDrink"
|
|
1888
|
+
];
|
|
1889
|
+
var DROPPED_COMMANDS = ["resetDailyConsumption"];
|
|
1890
|
+
function without$1(record, keys) {
|
|
1891
|
+
return Object.fromEntries(Object.entries(record).filter(([key]) => !keys.includes(key)));
|
|
1892
|
+
}
|
|
1893
|
+
/** The composition without the counters, or null when this one has none. */
|
|
1894
|
+
function dropCounters(composition) {
|
|
1895
|
+
if (composition.target.kind !== "new" || composition.target.type !== DeviceType$1.PetFountain) return null;
|
|
1896
|
+
let changed = false;
|
|
1897
|
+
const features = composition.features.map((feature) => {
|
|
1898
|
+
if (feature.kind !== "fields" || feature.cap !== "pet-fountain") return feature;
|
|
1899
|
+
const commands = feature.commands ?? {};
|
|
1900
|
+
if (!(DROPPED_FIELDS.some((key) => key in feature.fields) || DROPPED_COMMANDS.some((key) => key in commands))) return feature;
|
|
1901
|
+
changed = true;
|
|
1902
|
+
return {
|
|
1903
|
+
...feature,
|
|
1904
|
+
fields: without$1(feature.fields, DROPPED_FIELDS),
|
|
1905
|
+
commands: without$1(commands, DROPPED_COMMANDS)
|
|
1906
|
+
};
|
|
1907
|
+
});
|
|
1908
|
+
return changed ? {
|
|
1909
|
+
...composition,
|
|
1910
|
+
features
|
|
1911
|
+
} : null;
|
|
1912
|
+
}
|
|
1913
|
+
function dropFromBlock(block) {
|
|
1914
|
+
const source = block.source;
|
|
1915
|
+
if (source === void 0 || source.kind !== "composition") return null;
|
|
1916
|
+
const composition = dropCounters(source.composition);
|
|
1917
|
+
if (composition === null) return null;
|
|
1918
|
+
return {
|
|
1919
|
+
...block,
|
|
1920
|
+
source: {
|
|
1921
|
+
kind: "composition",
|
|
1922
|
+
composition
|
|
1923
|
+
}
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
function rewriteOf$2(row, ports) {
|
|
1927
|
+
const parsed = CoreBlockSchema.safeParse(row.data.block);
|
|
1928
|
+
if (!parsed.success) return null;
|
|
1929
|
+
const dropped = dropFromBlock(parsed.data);
|
|
1930
|
+
if (dropped === null) return null;
|
|
1931
|
+
const updatedAt = Math.max(parsed.data.updatedAt + 1, ports.now());
|
|
1932
|
+
const next = CoreBlockSchema.safeParse({
|
|
1933
|
+
...dropped,
|
|
1934
|
+
updatedAt
|
|
1935
|
+
});
|
|
1936
|
+
if (!next.success) {
|
|
1937
|
+
ports.warn("core block left as it is: the fountain without drink counters does not validate", {
|
|
1938
|
+
blockId: row.id,
|
|
1939
|
+
error: next.error.message
|
|
1940
|
+
});
|
|
1941
|
+
return null;
|
|
1942
|
+
}
|
|
1943
|
+
return {
|
|
1944
|
+
row,
|
|
1945
|
+
data: {
|
|
1946
|
+
...row.data,
|
|
1947
|
+
updatedAt,
|
|
1948
|
+
block: next.data
|
|
1949
|
+
}
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
async function dropFountainDrinkCounters(ports) {
|
|
1953
|
+
const rewrites = (await ports.listBlockRows()).flatMap((row) => {
|
|
1954
|
+
const rewrite = rewriteOf$2(row, ports);
|
|
1955
|
+
return rewrite === null ? [] : [rewrite];
|
|
1956
|
+
});
|
|
1957
|
+
if (rewrites.length === 0) return {
|
|
1958
|
+
outcome: "already-done",
|
|
1959
|
+
summary: { blocks: 0 }
|
|
1960
|
+
};
|
|
1961
|
+
for (const { row, data } of rewrites) await ports.replaceBlockRow(row.id, data, row.rev);
|
|
1962
|
+
return {
|
|
1963
|
+
outcome: "done",
|
|
1964
|
+
summary: { blocks: rewrites.length }
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
//#endregion
|
|
1864
1968
|
//#region src/builtins/core-blocks/migrations/helper-to-customize.ts
|
|
1865
1969
|
/**
|
|
1866
1970
|
* The appliance and heater helper compositions become plain Customize
|
|
@@ -2314,37 +2418,56 @@ async function splitPumpCycleFromFountain(ports) {
|
|
|
2314
2418
|
//#endregion
|
|
2315
2419
|
//#region src/builtins/core-blocks/migrations/index.ts
|
|
2316
2420
|
/** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
|
|
2317
|
-
var ADDON_MIGRATIONS = [
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2421
|
+
var ADDON_MIGRATIONS = [
|
|
2422
|
+
{
|
|
2423
|
+
meta: {
|
|
2424
|
+
id: PUMP_CYCLE_SPLIT_ID,
|
|
2425
|
+
owner: "core-blocks",
|
|
2426
|
+
level: "addon-state",
|
|
2427
|
+
seq: 1,
|
|
2428
|
+
dependsOn: [],
|
|
2429
|
+
store: "settings",
|
|
2430
|
+
scope: "cluster",
|
|
2431
|
+
onFailure: "block-owner",
|
|
2432
|
+
bodyKind: "procedure",
|
|
2433
|
+
description: "Move the pump duty cycle of a stored pet-fountain composition from the pet-fountain feature to a pump-cycle feature",
|
|
2434
|
+
fixtureMark: "the block createdBy and name, which the migration does not know"
|
|
2435
|
+
},
|
|
2436
|
+
procedure: splitPumpCycleFromFountain
|
|
2330
2437
|
},
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2438
|
+
{
|
|
2439
|
+
meta: {
|
|
2440
|
+
id: HELPER_TO_CUSTOMIZE_ID,
|
|
2441
|
+
owner: "core-blocks",
|
|
2442
|
+
level: "addon-state",
|
|
2443
|
+
seq: 2,
|
|
2444
|
+
dependsOn: [],
|
|
2445
|
+
store: "settings",
|
|
2446
|
+
scope: "cluster",
|
|
2447
|
+
onFailure: "block-owner",
|
|
2448
|
+
bodyKind: "procedure",
|
|
2449
|
+
description: "Rewrite each stored appliance and heater helper composition into plain Customize features (running-state, power-meter, power-source) with the same threshold, dwells and plugs, and drop the helper spec",
|
|
2450
|
+
fixtureMark: "the marked threshold, start and stop dwell, plug and offSeconds of each helper"
|
|
2451
|
+
},
|
|
2452
|
+
procedure: rewriteHelpersToCustomize
|
|
2345
2453
|
},
|
|
2346
|
-
|
|
2347
|
-
|
|
2454
|
+
{
|
|
2455
|
+
meta: {
|
|
2456
|
+
id: FOUNTAIN_DRINK_DROP_ID,
|
|
2457
|
+
owner: "core-blocks",
|
|
2458
|
+
level: "addon-state",
|
|
2459
|
+
seq: 3,
|
|
2460
|
+
dependsOn: [],
|
|
2461
|
+
store: "settings",
|
|
2462
|
+
scope: "cluster",
|
|
2463
|
+
onFailure: "block-owner",
|
|
2464
|
+
bodyKind: "procedure",
|
|
2465
|
+
description: "Remove the drink counters and the reset-daily-count forward from the pet-fountain feature of each stored fountain composition",
|
|
2466
|
+
fixtureMark: "the block createdBy and name, which the migration does not know"
|
|
2467
|
+
},
|
|
2468
|
+
procedure: dropFountainDrinkCounters
|
|
2469
|
+
}
|
|
2470
|
+
];
|
|
2348
2471
|
//#endregion
|
|
2349
2472
|
//#region src/builtins/core-blocks/runs-ledger.ts
|
|
2350
2473
|
/**
|
|
@@ -2508,9 +2631,13 @@ function isSkip(trace) {
|
|
|
2508
2631
|
*/
|
|
2509
2632
|
/** The ring an Action keeps. */
|
|
2510
2633
|
var ACTION_TRACE_KEEP = 20;
|
|
2634
|
+
/** After a timeout stops a run, the call is answered once the run ended or this long passed. */
|
|
2635
|
+
var STOP_GRACE_MS = 1e4;
|
|
2511
2636
|
/** A run in flight: the stop flag and whatever sleeps it can wake. */
|
|
2512
2637
|
var RunToken = class {
|
|
2513
2638
|
aborted = false;
|
|
2639
|
+
/** Set by the ceiling, so a stopped run is told apart from one the operator stopped. */
|
|
2640
|
+
timedOut = false;
|
|
2514
2641
|
wakers = /* @__PURE__ */ new Set();
|
|
2515
2642
|
sleep(ms) {
|
|
2516
2643
|
return new Promise((resolve) => {
|
|
@@ -2531,6 +2658,9 @@ var RunToken = class {
|
|
|
2531
2658
|
function errorMessage$2(err) {
|
|
2532
2659
|
return err instanceof Error ? err.message : String(err);
|
|
2533
2660
|
}
|
|
2661
|
+
function spanLabel(ms) {
|
|
2662
|
+
return ms < 12e4 ? `${Math.round(ms / 1e3)} seconds` : `${Math.round(ms / 6e4)} minutes`;
|
|
2663
|
+
}
|
|
2534
2664
|
var ActionsService = class {
|
|
2535
2665
|
store;
|
|
2536
2666
|
ledger;
|
|
@@ -2543,6 +2673,8 @@ var ActionsService = class {
|
|
|
2543
2673
|
units;
|
|
2544
2674
|
targets;
|
|
2545
2675
|
running = /* @__PURE__ */ new Map();
|
|
2676
|
+
maxRunMs;
|
|
2677
|
+
stopGraceMs;
|
|
2546
2678
|
constructor(deps) {
|
|
2547
2679
|
this.store = deps.store;
|
|
2548
2680
|
this.ledger = deps.ledger;
|
|
@@ -2552,6 +2684,8 @@ var ActionsService = class {
|
|
|
2552
2684
|
this.logger = deps.logger;
|
|
2553
2685
|
this.now = deps.now ?? Date.now;
|
|
2554
2686
|
this.newRunId = deps.newRunId ?? randomUUID;
|
|
2687
|
+
this.maxRunMs = deps.maxRunMs ?? 36e5;
|
|
2688
|
+
this.stopGraceMs = deps.stopGraceMs ?? STOP_GRACE_MS;
|
|
2555
2689
|
this.units = deps.units ?? capUnitResolver(ALL_CAPABILITY_DEFINITIONS);
|
|
2556
2690
|
this.targets = new ActionTargetResolver(deps.directory, deps.logger);
|
|
2557
2691
|
}
|
|
@@ -2710,8 +2844,9 @@ var ActionsService = class {
|
|
|
2710
2844
|
let outcome = "failed";
|
|
2711
2845
|
let steps = [];
|
|
2712
2846
|
let message;
|
|
2847
|
+
const deadline = this.armDeadline(entry.id, runId, token);
|
|
2713
2848
|
try {
|
|
2714
|
-
const
|
|
2849
|
+
const running = runSteps(this.runnableFor(entry, values, token), {
|
|
2715
2850
|
pathPrefix: "steps",
|
|
2716
2851
|
isAborted: () => token.aborted,
|
|
2717
2852
|
abortReason: "the run was stopped",
|
|
@@ -2728,9 +2863,16 @@ var ActionsService = class {
|
|
|
2728
2863
|
});
|
|
2729
2864
|
}
|
|
2730
2865
|
});
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2866
|
+
const result = await Promise.race([running, deadline.expired]);
|
|
2867
|
+
if (result !== "expired") {
|
|
2868
|
+
steps = result.steps;
|
|
2869
|
+
outcome = result.failed ? "failed" : result.aborted ? "aborted" : "ran";
|
|
2870
|
+
message = result.steps.find((s) => s.outcome === "error")?.message;
|
|
2871
|
+
}
|
|
2872
|
+
if (token.timedOut) {
|
|
2873
|
+
outcome = "failed";
|
|
2874
|
+
message = this.timeoutMessage();
|
|
2875
|
+
}
|
|
2734
2876
|
} catch (err) {
|
|
2735
2877
|
message = errorMessage$2(err);
|
|
2736
2878
|
this.logger.error("action run crashed", { meta: {
|
|
@@ -2738,6 +2880,8 @@ var ActionsService = class {
|
|
|
2738
2880
|
runId,
|
|
2739
2881
|
error: message
|
|
2740
2882
|
} });
|
|
2883
|
+
} finally {
|
|
2884
|
+
deadline.disarm();
|
|
2741
2885
|
}
|
|
2742
2886
|
const endedAt = this.now();
|
|
2743
2887
|
const trace = {
|
|
@@ -2763,10 +2907,49 @@ var ActionsService = class {
|
|
|
2763
2907
|
});
|
|
2764
2908
|
return {
|
|
2765
2909
|
runId,
|
|
2766
|
-
outcome,
|
|
2910
|
+
outcome: token.timedOut ? "timed-out" : outcome,
|
|
2767
2911
|
...message === void 0 ? {} : { message }
|
|
2768
2912
|
};
|
|
2769
2913
|
}
|
|
2914
|
+
timeoutMessage() {
|
|
2915
|
+
return `the run reached the ${spanLabel(this.maxRunMs)} limit and was stopped`;
|
|
2916
|
+
}
|
|
2917
|
+
/**
|
|
2918
|
+
* The run's ceiling. At `maxRunMs` the run is stopped through the same path
|
|
2919
|
+
* an operator's stop takes; a run that does not wind down within the grace
|
|
2920
|
+
* (an addon script that ignores the stop) is answered `expired` anyway, so a
|
|
2921
|
+
* waiting caller is never held past the limit.
|
|
2922
|
+
*/
|
|
2923
|
+
armDeadline(actionId, runId, token) {
|
|
2924
|
+
let grace = null;
|
|
2925
|
+
let expire = () => void 0;
|
|
2926
|
+
const expired = new Promise((resolve) => {
|
|
2927
|
+
expire = resolve;
|
|
2928
|
+
});
|
|
2929
|
+
const limit = setTimeout(() => {
|
|
2930
|
+
token.timedOut = true;
|
|
2931
|
+
this.logger.error("action run reached its time limit — stopping it", { meta: {
|
|
2932
|
+
actionId,
|
|
2933
|
+
runId,
|
|
2934
|
+
maxRunMs: this.maxRunMs
|
|
2935
|
+
} });
|
|
2936
|
+
this.stop({ actionId }).catch((err) => {
|
|
2937
|
+
this.logger.warn("stopping a timed-out action run failed", { meta: {
|
|
2938
|
+
actionId,
|
|
2939
|
+
runId,
|
|
2940
|
+
error: errorMessage$2(err)
|
|
2941
|
+
} });
|
|
2942
|
+
});
|
|
2943
|
+
grace = setTimeout(() => expire("expired"), this.stopGraceMs);
|
|
2944
|
+
}, this.maxRunMs);
|
|
2945
|
+
return {
|
|
2946
|
+
expired,
|
|
2947
|
+
disarm: () => {
|
|
2948
|
+
clearTimeout(limit);
|
|
2949
|
+
if (grace !== null) clearTimeout(grace);
|
|
2950
|
+
}
|
|
2951
|
+
};
|
|
2952
|
+
}
|
|
2770
2953
|
runnableFor(entry, values, token) {
|
|
2771
2954
|
if (entry.source === "internal") return buildActionSteps(entry.steps ?? [], values, {
|
|
2772
2955
|
invokeCap: (call) => this.invokeCap(call),
|
|
@@ -2816,6 +2999,7 @@ var ActionsService = class {
|
|
|
2816
2999
|
});
|
|
2817
3000
|
}
|
|
2818
3001
|
async create(input) {
|
|
3002
|
+
this.requireWithinCeiling(input.action.steps, input.action.name);
|
|
2819
3003
|
const { steps, warnings } = this.normalizeSteps(input.action.steps, input.action.name);
|
|
2820
3004
|
const action = await this.store.create({
|
|
2821
3005
|
...input.action,
|
|
@@ -2835,6 +3019,7 @@ var ActionsService = class {
|
|
|
2835
3019
|
const existing = await this.store.get(input.actionId);
|
|
2836
3020
|
if (existing === null) throw new ActionError("not-found", `no action "${input.actionId}"`);
|
|
2837
3021
|
const patch = input.action;
|
|
3022
|
+
if (patch.steps !== void 0) this.requireWithinCeiling(patch.steps, patch.name ?? existing.name);
|
|
2838
3023
|
const { steps, warnings } = this.normalizeSteps(patch.steps ?? existing.steps ?? [], patch.name ?? existing.name);
|
|
2839
3024
|
const action = await this.store.update(input.actionId, {
|
|
2840
3025
|
name: patch.name ?? existing.name,
|
|
@@ -2847,6 +3032,18 @@ var ActionsService = class {
|
|
|
2847
3032
|
...warnings.length > 0 ? { warnings } : {}
|
|
2848
3033
|
};
|
|
2849
3034
|
}
|
|
3035
|
+
/** An action whose waits alone exceed the run ceiling could never finish: refuse the save. */
|
|
3036
|
+
requireWithinCeiling(steps, actionName) {
|
|
3037
|
+
const total = actionWaitTotalMs(steps);
|
|
3038
|
+
if (total <= this.maxRunMs) return;
|
|
3039
|
+
const message = `the wait steps add up to ${spanLabel(total)}; an action may run at most ${spanLabel(this.maxRunMs)}`;
|
|
3040
|
+
this.logger.warn("action save refused — it could never finish within the run limit", { meta: {
|
|
3041
|
+
action: actionName,
|
|
3042
|
+
waitTotalMs: total,
|
|
3043
|
+
maxRunMs: this.maxRunMs
|
|
3044
|
+
} });
|
|
3045
|
+
throw new ActionError("invalid-steps", message);
|
|
3046
|
+
}
|
|
2850
3047
|
/**
|
|
2851
3048
|
* D972: a quantity arg sent as `{ value, unit }` is converted to the unit the
|
|
2852
3049
|
* method declares; a unit that cannot be that quantity refuses the save; a
|
|
@@ -5494,6 +5691,7 @@ var RemoteService = class {
|
|
|
5494
5691
|
duration: null,
|
|
5495
5692
|
shuffle: null,
|
|
5496
5693
|
repeat: null,
|
|
5694
|
+
positionUpdatedAt: null,
|
|
5497
5695
|
lastChangedAt: input.changedAt
|
|
5498
5696
|
};
|
|
5499
5697
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The drink counters leave the `pet-fountain` feature of a stored composition.
|
|
3
|
+
*
|
|
4
|
+
* The cap no longer has `lastDrink`, `currentHourDrink`, `last24hDrink` or
|
|
5
|
+
* `todayDrink`, nor the `resetDailyConsumption` method (a fountain's tank is now a
|
|
6
|
+
* `water` consumable derived from `waterLevel`). A fountain composed by the
|
|
7
|
+
* previous preset still names them as fields and forwards the reset to a button,
|
|
8
|
+
* which no longer validates. This removes the four fields and the one forward from
|
|
9
|
+
* the `pet-fountain` feature and nothing else: the pump forward, the other fields,
|
|
10
|
+
* the other features, the name and the enabled flag are kept.
|
|
11
|
+
*
|
|
12
|
+
* Only compositions that BUILD a pet fountain are touched. A row that does not
|
|
13
|
+
* parse, a code block, a customization of an existing device, and a fountain
|
|
14
|
+
* already without the counters are left exactly as they are, so a rerun edits
|
|
15
|
+
* nothing. The block's `updatedAt` moves (it is the version an editor's
|
|
16
|
+
* `expectedUpdatedAt` is checked against).
|
|
17
|
+
*/
|
|
18
|
+
import { type MigrationProcedureResult } from "@camstack/types";
|
|
19
|
+
import type { CoreBlocksMigrationPorts } from "./pump-cycle-split.js";
|
|
20
|
+
export declare const FOUNTAIN_DRINK_DROP_ID = "core-blocks/2026-11-06-fountain-drink-drop";
|
|
21
|
+
export declare function dropFountainDrinkCounters(ports: CoreBlocksMigrationPorts): Promise<MigrationProcedureResult>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AddonMigration } from "@camstack/types";
|
|
2
2
|
import { type CoreBlocksMigrationPorts } from "./pump-cycle-split.js";
|
|
3
|
+
export { FOUNTAIN_DRINK_DROP_ID } from "./fountain-drink-drop.js";
|
|
3
4
|
export { HELPER_TO_CUSTOMIZE_ID } from "./helper-to-customize.js";
|
|
4
5
|
export { coreBlocksMigrationPorts, PUMP_CYCLE_SPLIT_ID, type CoreBlocksMigrationPorts, type StoredBlockRow } from "./pump-cycle-split.js";
|
|
5
6
|
/** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
|
|
@@ -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-h3Yla8gE.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-NZ11ORZS.js");
|
|
8
8
|
const require_retention = require("../../retention-BNONb5X_.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 { Bs as historyUnitFor, Ec as EventCategory, Fs as emitReadiness, Io as wattMillisecondsToKwh, Lo as BaseAddon, Ns as defineRecordKinds, V as DEVICE_HISTORY_ENERGY_KEY, Y as DeviceRunSchema, _r as deviceRunsCapability, dt as HISTORY_ITEM_CATALOG, gr as deviceRemovalHookCapability, mr as deviceHistoryCapability, qs as isReadingQuantity, ut as HISTORY_CATALOG, wc as DeviceType, xn as armRemovalReconcile } from "../../dist-D-iGSnX_.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-DkTEWrRe.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-B9l9TnGE.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-h3Yla8gE.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ai as normalizeUnit, Cc as DeviceRole, Ds as collectZodSecretPaths, Ec as EventCategory, Er as expandContainer, Ir as formatMinutes, Js as isSecretClear, Jt as STREAM_PROFILE_META, Ks as isKeychainStoredField, L as DAY_NAMES, Li as parseStreamParamsFormPatch, Lo as BaseAddon, Ns as defineRecordKinds, Oa as siteZoneKey, Pn as canonicalIconKey, Q as DiscoveryProposalBodySchema, Sc as DeviceFeature, Sr as enumerateSchemaFields, Tc as errMsg, Us as isDeviceConfigCap, X as DeviceStatusSchema, Xs as isSecretMarker, Z as DeviceTombstoneSchema, Zs as isSecretMarkerLike, _ as CAMERA_SWITCH_ORDER, _a as runtimeStatePolicyFor, _s as WELL_KNOWN_TAB_MAP, bc as userError, cr as defineExtensionSlotProvider, ct as FieldClaimSchema, dc as resolveSecretMarkers, er as createDeviceExtensionProvider, fs as SECRET_CLEAR, gc as sleep$1, hr as deviceManagerCapability, ii as legacyAutoLinkIds, jn as buildStreamParamsConfigSchema, li as locationIconKey, pc as secretTreeFromPaths, pr as deviceExtensionCapability, s as ALL_CAPABILITY_DEFINITIONS, st as FieldClaimModeSchema, vc as toSecretFieldView, vr as deviceStateCapability, wc as DeviceType, wt as MINUTES_PER_DAY, xr as enumerateItemArrayFields, y as CAP_NAMES_WITH_STATUS, yc as transformSecretWrite, yr as deviceStatusCapability } from "../../dist-D-iGSnX_.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-h3Yla8gE.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 { Lo as BaseAddon, fi as logDestinationCapability } from "../../dist-D-iGSnX_.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-h3Yla8gE.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-sIFmKkGM.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-DTDD5wwC.js");
|
|
10
|
+
const require_constants = require("../../constants-DR8hdi45.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 { Ec as EventCategory, Lo as BaseAddon, Ls as formatSecretScope, Ns as defineRecordKinds, _t as KEYCHAIN_RESET_TRIGGER_ACTOR, ic as normalizeSecretOwner, ni as keychainAdminCapability, ri as keychainCapability, sc as parseSecretRef, vt as KeychainAuditEntrySchema, yt as KeychainResetRecordSchema } from "../../dist-D-iGSnX_.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-D-7tAHJ_.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-BTdhD-Yp.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants--9ui1LK0.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-h3Yla8gE.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 { Bt as RECORDING_SOURCE_CAMSTACK_ADDON, Ec as EventCategory, Lo as BaseAddon, Os as createEvent, Tc as errMsg, Ut as RecordingStatusSchema, gi as mayWriteToLocation } from "../../dist-D-iGSnX_.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-h3Yla8gE.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-sIFmKkGM.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,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { $s as makeSecretMarker, $t as SsoBridgeClaimsSchema, An as buildDeviceSignatureMessage, B as DEVICE_ENROLLMENT_TTL_MS, Fr as formatDeviceRevoker, Ga as userManagementCapability, It as PreferenceDeviceIdSchema, Jr as isCredentialTokenPayload, Lo as BaseAddon, Lt as PreferenceNamespaceSchema, M as CredentialTokenClaimsSchema, Ns as defineRecordKinds, Rt as PreferenceValueSchema, Sn as authProviderCapability, T as CREDENTIAL_TOKEN_AUDIENCE, U as DEVICE_NONCE_TTL_MS, Xs as isSecretMarker, Zt as ScopedTokenSchema, bc as userError, cn as UserRecordSchema, fr as deviceCredentialsCapability, jt as PREFERENCES_MAX_VALUE_BYTES, kn as buildDeviceEnrollmentLink, on as TokenScopeSchema } from "../../dist-D-iGSnX_.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-D-7tAHJ_.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";
|
|
@@ -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-h3Yla8gE.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-C5DkUEZF.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 { As as defineAddonMigrations, Bi as pickAppLinkHub, Ea as shortHostname, Ec as EventCategory, Gi as preconditionOf, Gr as isAppLinkBase, Ln as checkRoleAddress, Lo as BaseAddon, Tc as errMsg, Yr as isDefaultAppConnectionEndpoint, ca as resolveHubAddressRoles, ci as localNetworkCapability, fa as resolveNotificationTapAddress, ft as HUB_MDNS_SERVICE_TYPE, ia as resolveAppConnections, kt as NetworkTunnelStartedDataSchema, pt as HUB_MDNS_TXT_KEYS, qa as validateCustomAddress, v as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-D-iGSnX_.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-DuEfM0fI.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-h3Yla8gE.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
|
|
@@ -1387,7 +1387,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1387
1387
|
*/
|
|
1388
1388
|
destinationConfig(body) {
|
|
1389
1389
|
return {
|
|
1390
|
-
enabled: body
|
|
1390
|
+
enabled: require_dist.isInstanceEnabled(body),
|
|
1391
1391
|
url: body.url,
|
|
1392
1392
|
job: body.job,
|
|
1393
1393
|
node: this.ctx.kernel.localNodeId ?? "hub",
|