@camstack/server 1.2.741 → 1.2.743
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/api/core/cap-providers.js +167 -43
- package/dist/api/core/integration-role.js +20 -0
- package/dist/api/trpc/generated-cap-mounts.js +18 -1
- package/dist/api/trpc/generated-cap-routers.js +2427 -2381
- package/package.json +10 -14
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-BtTMjLgk.mjs → agent-https-BXFwvxco.mjs} +1 -1
- package/system/dist/{agent-https-CNf7_i1z.js → agent-https-CTLbLv1Z.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 +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 +4 -4
- package/system/dist/builtins/alerts/alerts.addon.mjs +4 -4
- 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 +4 -4
- package/system/dist/builtins/camera-grid/index.mjs +4 -4
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- 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 +193 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +193 -3
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -0
- package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +43 -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 +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- 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 +30 -27
- package/system/dist/builtins/loki-logging/index.mjs +30 -27
- package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +7 -0
- package/system/dist/builtins/loki-logging/migrations/index.d.ts +7 -0
- package/system/dist/builtins/loki-logging/retire-enabled-flag.d.ts +8 -23
- 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/integration-registry.d.ts +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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/{composition-sources-DUmnnLrw.mjs → composition-sources-BsdQWUId.mjs} +1 -1
- package/system/dist/{composition-sources-D9GBwT5d.js → composition-sources-T2lA4x2c.js} +1 -1
- package/system/dist/{constants-BkiDA8Cf.mjs → constants-3SpeBQ9e.mjs} +1 -1
- package/system/dist/{constants-Cy5svHxz.js → constants-BrhaiRkm.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
- package/system/dist/{device-ca-CxlqxrvG.js → device-ca-BCeNjQxi.js} +1 -1
- package/system/dist/{device-ca-Cxu7j6aY.mjs → device-ca-Dp9VZmay.mjs} +1 -1
- package/system/dist/{dist-C5sQPOZX.mjs → dist-CYQNDx7D.mjs} +317 -133
- package/system/dist/{dist-Cyc4oyGh.js → dist-hoy7lFFU.js} +322 -132
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CTPWSgwo.mjs → hub-mdns-ciao-Bmgiu2PS.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-YxQ97aHW.js → hub-mdns-ciao-Btg3hLbv.js} +2 -2
- package/system/dist/index.js +14 -9
- package/system/dist/index.mjs +225 -220
- package/system/dist/migrations/hub/2026-11-02-integration-addon-id-bare.d.ts +3 -0
- package/system/dist/{restore-archive-08Uthry1.mjs → restore-archive-Da6R2OpB.mjs} +94 -94
- package/system/dist/{restore-archive-b5rBXY1e.js → restore-archive-NPXKTdgW.js} +1 -1
- package/system/dist/{retention-i8aZ6vE5.mjs → retention-BnRv1V1H.mjs} +1 -1
- package/system/dist/{retention-DWCHp91p.js → retention-YUgpamYA.js} +1 -1
- package/system/dist/{wal-maintenance-DNE7RTcS.js → wal-maintenance-B0jahuQG.js} +0 -0
- package/system/dist/{wal-maintenance-CEi8PqMh.mjs → wal-maintenance-pDyTGZ-n.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -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-hoy7lFFU.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-T2lA4x2c.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -19,6 +19,7 @@ let node_os = require("node:os");
|
|
|
19
19
|
node_os = require_chunk.__toESM(node_os);
|
|
20
20
|
let node_url = require("node:url");
|
|
21
21
|
//#region src/builtins/core-blocks/block-package.ts
|
|
22
|
+
var import_read_all_rows = require_read_all_rows$1.require_read_all_rows();
|
|
22
23
|
/**
|
|
23
24
|
* Turning a stored block into something the addon runner can fork.
|
|
24
25
|
*
|
|
@@ -703,7 +704,6 @@ _coreBlocksRecordKinds["action-links"];
|
|
|
703
704
|
_coreBlocksRecordKinds["timed-runs"];
|
|
704
705
|
//#endregion
|
|
705
706
|
//#region src/kernel/addon-settings-store.ts
|
|
706
|
-
var import_read_all_rows = require_read_all_rows$1.require_read_all_rows();
|
|
707
707
|
/** The collection every addon's settings share. Named nowhere else (with sections' own module). */
|
|
708
708
|
var ADDON_SETTINGS_COLLECTION = "addon-settings";
|
|
709
709
|
/** Row data of a field: `nodeId` only on a node row (the key says which node). */
|
|
@@ -1866,6 +1866,195 @@ var CoreBlockStore = class CoreBlockStore {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
};
|
|
1868
1868
|
//#endregion
|
|
1869
|
+
//#region src/builtins/core-blocks/migrations/pump-cycle-split.ts
|
|
1870
|
+
/**
|
|
1871
|
+
* The pump duty cycle leaves the `pet-fountain` feature of a stored composition
|
|
1872
|
+
* (planning#366).
|
|
1873
|
+
*
|
|
1874
|
+
* A fountain composed by the previous preset carries `pumpIntervalEnabled`,
|
|
1875
|
+
* `pumpOnTime` and `pumpOffTime` as fields of `pet-fountain` and the three
|
|
1876
|
+
* forwards `setPumpInterval`, `setPumpOnMinutes`, `setPumpOffMinutes`. The cap no
|
|
1877
|
+
* longer has them: the cycle is the optional `pump-cycle` cap. This rewrites each
|
|
1878
|
+
* such block so it validates against the new cap and keeps working:
|
|
1879
|
+
*
|
|
1880
|
+
* - the three fields and three forwards leave `pet-fountain`;
|
|
1881
|
+
* - when all three forwards existed, a `pump-cycle` feature is inserted right after
|
|
1882
|
+
* it, carrying the old cycle switch as `enabled`, the two times unknown (a number
|
|
1883
|
+
* box cannot be read back) and the three forwards renamed to the new methods;
|
|
1884
|
+
* - when they did not all exist there is no cycle to keep: the three fields go and
|
|
1885
|
+
* no `pump-cycle` is added.
|
|
1886
|
+
*
|
|
1887
|
+
* Only compositions that BUILD a pet fountain are touched. A row that does not parse,
|
|
1888
|
+
* a code block, a customization of an existing device, and a fountain already in the
|
|
1889
|
+
* new shape are left exactly as they are, so a rerun edits nothing. The block's
|
|
1890
|
+
* `updatedAt` moves (it is the version an editor's `expectedUpdatedAt` is checked
|
|
1891
|
+
* against); every other field, the name and the enabled flag included, is kept.
|
|
1892
|
+
*/
|
|
1893
|
+
var PUMP_CYCLE_SPLIT_ID = "core-blocks/2026-11-02-pump-cycle-split";
|
|
1894
|
+
/** The ports over the real `core_blocks` kind. */
|
|
1895
|
+
function coreBlocksMigrationPorts(blocks, logger, now) {
|
|
1896
|
+
return {
|
|
1897
|
+
listBlockRows: async () => {
|
|
1898
|
+
return (await (0, import_read_all_rows.readAllRows)(blocks)).map((row) => ({
|
|
1899
|
+
id: row.id,
|
|
1900
|
+
rev: row.rev,
|
|
1901
|
+
data: row.data
|
|
1902
|
+
}));
|
|
1903
|
+
},
|
|
1904
|
+
replaceBlockRow: async (id, data, ifRev) => {
|
|
1905
|
+
await blocks.put({
|
|
1906
|
+
id,
|
|
1907
|
+
data
|
|
1908
|
+
}, { ifRev });
|
|
1909
|
+
},
|
|
1910
|
+
now,
|
|
1911
|
+
warn: (message, meta) => {
|
|
1912
|
+
logger.warn(message, { meta });
|
|
1913
|
+
}
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
var OLD_FIELDS = [
|
|
1917
|
+
"pumpIntervalEnabled",
|
|
1918
|
+
"pumpOnTime",
|
|
1919
|
+
"pumpOffTime"
|
|
1920
|
+
];
|
|
1921
|
+
var OLD_COMMANDS = [
|
|
1922
|
+
"setPumpInterval",
|
|
1923
|
+
"setPumpOnMinutes",
|
|
1924
|
+
"setPumpOffMinutes"
|
|
1925
|
+
];
|
|
1926
|
+
var UNKNOWN = {
|
|
1927
|
+
kind: "expression",
|
|
1928
|
+
expr: "null",
|
|
1929
|
+
bindings: {}
|
|
1930
|
+
};
|
|
1931
|
+
var NOW = {
|
|
1932
|
+
kind: "expression",
|
|
1933
|
+
expr: "now",
|
|
1934
|
+
bindings: {}
|
|
1935
|
+
};
|
|
1936
|
+
function without(record, keys) {
|
|
1937
|
+
return Object.fromEntries(Object.entries(record).filter(([key]) => !keys.includes(key)));
|
|
1938
|
+
}
|
|
1939
|
+
function hasOldShape(feature) {
|
|
1940
|
+
const commands = feature.commands ?? {};
|
|
1941
|
+
return OLD_FIELDS.some((key) => key in feature.fields) || OLD_COMMANDS.some((key) => key in commands);
|
|
1942
|
+
}
|
|
1943
|
+
function cycleFeature(old) {
|
|
1944
|
+
const enabled = old.fields["pumpIntervalEnabled"];
|
|
1945
|
+
const commands = old.commands ?? {};
|
|
1946
|
+
const setEnabled = commands["setPumpInterval"];
|
|
1947
|
+
const setOn = commands["setPumpOnMinutes"];
|
|
1948
|
+
const setOff = commands["setPumpOffMinutes"];
|
|
1949
|
+
if (enabled === void 0 || setEnabled === void 0 || setOn === void 0 || setOff === void 0) return null;
|
|
1950
|
+
return {
|
|
1951
|
+
kind: "fields",
|
|
1952
|
+
cap: "pump-cycle",
|
|
1953
|
+
fields: {
|
|
1954
|
+
enabled,
|
|
1955
|
+
onTime: UNKNOWN,
|
|
1956
|
+
offTime: UNKNOWN,
|
|
1957
|
+
lastFetchedAt: NOW
|
|
1958
|
+
},
|
|
1959
|
+
commands: {
|
|
1960
|
+
setEnabled,
|
|
1961
|
+
setOnMinutes: setOn,
|
|
1962
|
+
setOffMinutes: setOff
|
|
1963
|
+
}
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
/** The split composition, or null when this one has nothing to split. */
|
|
1967
|
+
function splitComposition(composition) {
|
|
1968
|
+
if (composition.target.kind !== "new" || composition.target.type !== require_dist.DeviceType.PetFountain) return null;
|
|
1969
|
+
const features = composition.features.flatMap((feature) => {
|
|
1970
|
+
if (feature.kind !== "fields" || feature.cap !== "pet-fountain" || !hasOldShape(feature)) return [feature];
|
|
1971
|
+
const core = {
|
|
1972
|
+
...feature,
|
|
1973
|
+
fields: without(feature.fields, OLD_FIELDS),
|
|
1974
|
+
commands: without(feature.commands ?? {}, OLD_COMMANDS)
|
|
1975
|
+
};
|
|
1976
|
+
const cycle = cycleFeature(feature);
|
|
1977
|
+
return cycle === null ? [core] : [core, cycle];
|
|
1978
|
+
});
|
|
1979
|
+
return features.length !== composition.features.length || features.some((feature, index) => feature !== composition.features[index]) ? {
|
|
1980
|
+
...composition,
|
|
1981
|
+
features
|
|
1982
|
+
} : null;
|
|
1983
|
+
}
|
|
1984
|
+
function splitBlock(block) {
|
|
1985
|
+
const source = block.source;
|
|
1986
|
+
if (source === void 0 || source.kind !== "composition") return null;
|
|
1987
|
+
const composition = splitComposition(source.composition);
|
|
1988
|
+
if (composition === null) return null;
|
|
1989
|
+
return {
|
|
1990
|
+
...block,
|
|
1991
|
+
source: {
|
|
1992
|
+
kind: "composition",
|
|
1993
|
+
composition
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
}
|
|
1997
|
+
function rewriteOf(row, ports) {
|
|
1998
|
+
const parsed = require_dist.CoreBlockSchema.safeParse(row.data.block);
|
|
1999
|
+
if (!parsed.success) return null;
|
|
2000
|
+
const split = splitBlock(parsed.data);
|
|
2001
|
+
if (split === null) return null;
|
|
2002
|
+
const updatedAt = Math.max(parsed.data.updatedAt + 1, ports.now());
|
|
2003
|
+
const next = require_dist.CoreBlockSchema.safeParse({
|
|
2004
|
+
...split,
|
|
2005
|
+
updatedAt
|
|
2006
|
+
});
|
|
2007
|
+
if (!next.success) {
|
|
2008
|
+
ports.warn("core block left as it is: the split composition does not validate", {
|
|
2009
|
+
blockId: row.id,
|
|
2010
|
+
error: next.error.message
|
|
2011
|
+
});
|
|
2012
|
+
return null;
|
|
2013
|
+
}
|
|
2014
|
+
return {
|
|
2015
|
+
row,
|
|
2016
|
+
data: {
|
|
2017
|
+
...row.data,
|
|
2018
|
+
updatedAt,
|
|
2019
|
+
block: next.data
|
|
2020
|
+
}
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
async function splitPumpCycleFromFountain(ports) {
|
|
2024
|
+
const rewrites = (await ports.listBlockRows()).flatMap((row) => {
|
|
2025
|
+
const rewrite = rewriteOf(row, ports);
|
|
2026
|
+
return rewrite === null ? [] : [rewrite];
|
|
2027
|
+
});
|
|
2028
|
+
if (rewrites.length === 0) return {
|
|
2029
|
+
outcome: "already-done",
|
|
2030
|
+
summary: { blocks: 0 }
|
|
2031
|
+
};
|
|
2032
|
+
for (const { row, data } of rewrites) await ports.replaceBlockRow(row.id, data, row.rev);
|
|
2033
|
+
return {
|
|
2034
|
+
outcome: "done",
|
|
2035
|
+
summary: { blocks: rewrites.length }
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
//#endregion
|
|
2039
|
+
//#region src/builtins/core-blocks/migrations/index.ts
|
|
2040
|
+
/** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
|
|
2041
|
+
var ADDON_MIGRATIONS = [{
|
|
2042
|
+
meta: {
|
|
2043
|
+
id: PUMP_CYCLE_SPLIT_ID,
|
|
2044
|
+
owner: "core-blocks",
|
|
2045
|
+
level: "addon-state",
|
|
2046
|
+
seq: 1,
|
|
2047
|
+
dependsOn: [],
|
|
2048
|
+
store: "settings",
|
|
2049
|
+
scope: "cluster",
|
|
2050
|
+
onFailure: "block-owner",
|
|
2051
|
+
bodyKind: "procedure",
|
|
2052
|
+
description: "Move the pump duty cycle of a stored pet-fountain composition from the pet-fountain feature to a pump-cycle feature",
|
|
2053
|
+
fixtureMark: "the block createdBy and name, which the migration does not know"
|
|
2054
|
+
},
|
|
2055
|
+
procedure: splitPumpCycleFromFountain
|
|
2056
|
+
}];
|
|
2057
|
+
//#endregion
|
|
1869
2058
|
//#region src/builtins/core-blocks/runs-ledger.ts
|
|
1870
2059
|
/**
|
|
1871
2060
|
* The hub's runs ledger: what each automation block and each Action run DID.
|
|
@@ -6672,6 +6861,7 @@ var CoreBlocksAddon = class extends require_dist.BaseAddon {
|
|
|
6672
6861
|
const records = this.ctx.records;
|
|
6673
6862
|
if (records === void 0) throw new Error("core-blocks needs ctx.records on the hub");
|
|
6674
6863
|
await records.declare(coreBlocksRecordKinds);
|
|
6864
|
+
await this.runMigrations(require_dist.defineAddonMigrations(ADDON_MIGRATIONS, coreBlocksMigrationPorts(records.kind(coreBlocksRecordKinds.blocks), this.ctx.logger.child("migrations"), () => Date.now())));
|
|
6675
6865
|
this.store = CoreBlockStore.of(records, this.ctx.logger.child("store"));
|
|
6676
6866
|
this.prefs = new BlockSettingsStore({
|
|
6677
6867
|
store: settingsStore,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as EMPTY_REMOTE_CONFIG,
|
|
1
|
+
import { $ as EMPTY_REMOTE_CONFIG, Ai as problemsBlockSave, Bn as coreBlocksCapability, C as CORE_BLOCK_ADDON_PREFIX, Ca as timedRunCapability, Ct as MediaPlayerStatusSchema, D as ConditionMirror, Da as validateComposition, Di as powerSourceCapability, En as capUnitResolver, Es as isSecretMarker, Fa as weekdayOfLocalDate, Fn as compositionSourceRefs, Hi as resolveCoreBlockEntry, Hr as kebabToCamel, Ht as SchedulerSchema, I as DEFAULT_HOLD_OVERRIDE, Ii as remoteCapability, In as coreBlockAddonId, It as RemoteAssumedStateSchema, Jr as localDateOf, K as DeclaredDevices, La as zoneOnlySite, Li as remoteLayoutComponentsCapability, Ln as coreBlockComposition, Lr as isInternalActionId, Lt as RemoteConfigSchema, O as ControlStatusSchema, Oi as powerSourceLinkOfComposition, Or as internalActionId, Os as isSecretRefOwnedBy, Pa as vocabActionIdFor, Q as EMPTY_REMOTE_ASSUMED_STATE, Qa as compositionSourceKey, Qi as runSteps, Qn as describeComposableCaps, Qr as lockDoorLinkOfComposition, Ri as replacedFieldKeys, Rn as coreBlockIdFromAddonId, Rt as RunningStateStatusSchema, S as CORE_BLOCKS_ADDON_ID, Sa as templateCapability, Ta as timedRunSeconds, Ti as planComposition, Ui as resolveCoreBlockFiles, Un as customKeyOfRole, Vs as resolveSecretMarkers, Vt as SchedulerError, Wn as customRole, Ws as secretTreeFromSchema, Xi as resolveStepArgs, Xt as SwitchStatusSchema, Ys as transformSecretWrite, Z as EMPTY_AUTOMATION_STATE, Zt as TemplateKindSchema, c as ActionStepSchema, di as nextOccurrence, dn as appendTrace, dr as evaluateWhenTree, ea as schedulersCapability, ec as DeviceType$1, et as FAN_CAPTURE_FIELDS, f as AutomationStateDocSchema, fi as normalizeActionUnits, hi as normalizeStepTargets, ho as BaseAddon, in as addonIdOfActionId, it as FanPresetSchema, jn as collectWhenMirrorSources, jt as QuantityUnitError, k as CoreBlockSchema, ka as validateSchedulerInput, kn as checkTemplatePayload, l as ActionTargetResolver, la as siteFor, mi as normalizeCoreBlockWrite, mt as INTERNAL_ACTION_PREFIX, nc as EventCategory$1, nn as actionSourceCapability, nt as FanControlStatusSchema, o as ALL_CAPABILITY_DEFINITIONS, p as BUILTIN_REMOTE_COMPONENTS, pi as normalizeCapStep, pt as IDLE_ACTION_STATUS, qa as composedDeviceRef, rn as actionsCapability, ro as helperMembers, rs as collectSecretMarkerRefs, s as ActionError, ss as defineAddonMigrations, t as ACTION_TARGET_INVALIDATION_EVENTS, tc as errMsg$1, tn as actionEffect, u as ActionVariableSchema, us as defineRecordKinds, vn as buildActionSteps, vr as fanPresetsCapability, vs as hydrateSchema, wa as timedRunLimitOf, x as COMPOSER_RUNNER_ID, yi as occurrenceOn, yn as buildCapabilityLookup, zi as resolveActionVariables, zn as coreBlockSourceKind } from "../../dist-CYQNDx7D.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-
|
|
3
|
+
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-BsdQWUId.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -14,6 +14,7 @@ import { nodeIdOfScopedKey } from "@camstack/types/addon";
|
|
|
14
14
|
import * as os$1 from "node:os";
|
|
15
15
|
import { pathToFileURL } from "node:url";
|
|
16
16
|
//#region src/builtins/core-blocks/block-package.ts
|
|
17
|
+
var import_read_all_rows = require_read_all_rows();
|
|
17
18
|
/**
|
|
18
19
|
* Turning a stored block into something the addon runner can fork.
|
|
19
20
|
*
|
|
@@ -697,7 +698,6 @@ _coreBlocksRecordKinds["action-links"];
|
|
|
697
698
|
_coreBlocksRecordKinds["timed-runs"];
|
|
698
699
|
//#endregion
|
|
699
700
|
//#region src/kernel/addon-settings-store.ts
|
|
700
|
-
var import_read_all_rows = require_read_all_rows();
|
|
701
701
|
/** The collection every addon's settings share. Named nowhere else (with sections' own module). */
|
|
702
702
|
var ADDON_SETTINGS_COLLECTION = "addon-settings";
|
|
703
703
|
/** Row data of a field: `nodeId` only on a node row (the key says which node). */
|
|
@@ -1860,6 +1860,195 @@ var CoreBlockStore = class CoreBlockStore {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
};
|
|
1862
1862
|
//#endregion
|
|
1863
|
+
//#region src/builtins/core-blocks/migrations/pump-cycle-split.ts
|
|
1864
|
+
/**
|
|
1865
|
+
* The pump duty cycle leaves the `pet-fountain` feature of a stored composition
|
|
1866
|
+
* (planning#366).
|
|
1867
|
+
*
|
|
1868
|
+
* A fountain composed by the previous preset carries `pumpIntervalEnabled`,
|
|
1869
|
+
* `pumpOnTime` and `pumpOffTime` as fields of `pet-fountain` and the three
|
|
1870
|
+
* forwards `setPumpInterval`, `setPumpOnMinutes`, `setPumpOffMinutes`. The cap no
|
|
1871
|
+
* longer has them: the cycle is the optional `pump-cycle` cap. This rewrites each
|
|
1872
|
+
* such block so it validates against the new cap and keeps working:
|
|
1873
|
+
*
|
|
1874
|
+
* - the three fields and three forwards leave `pet-fountain`;
|
|
1875
|
+
* - when all three forwards existed, a `pump-cycle` feature is inserted right after
|
|
1876
|
+
* it, carrying the old cycle switch as `enabled`, the two times unknown (a number
|
|
1877
|
+
* box cannot be read back) and the three forwards renamed to the new methods;
|
|
1878
|
+
* - when they did not all exist there is no cycle to keep: the three fields go and
|
|
1879
|
+
* no `pump-cycle` is added.
|
|
1880
|
+
*
|
|
1881
|
+
* Only compositions that BUILD a pet fountain are touched. A row that does not parse,
|
|
1882
|
+
* a code block, a customization of an existing device, and a fountain already in the
|
|
1883
|
+
* new shape are left exactly as they are, so a rerun edits nothing. The block's
|
|
1884
|
+
* `updatedAt` moves (it is the version an editor's `expectedUpdatedAt` is checked
|
|
1885
|
+
* against); every other field, the name and the enabled flag included, is kept.
|
|
1886
|
+
*/
|
|
1887
|
+
var PUMP_CYCLE_SPLIT_ID = "core-blocks/2026-11-02-pump-cycle-split";
|
|
1888
|
+
/** The ports over the real `core_blocks` kind. */
|
|
1889
|
+
function coreBlocksMigrationPorts(blocks, logger, now) {
|
|
1890
|
+
return {
|
|
1891
|
+
listBlockRows: async () => {
|
|
1892
|
+
return (await (0, import_read_all_rows.readAllRows)(blocks)).map((row) => ({
|
|
1893
|
+
id: row.id,
|
|
1894
|
+
rev: row.rev,
|
|
1895
|
+
data: row.data
|
|
1896
|
+
}));
|
|
1897
|
+
},
|
|
1898
|
+
replaceBlockRow: async (id, data, ifRev) => {
|
|
1899
|
+
await blocks.put({
|
|
1900
|
+
id,
|
|
1901
|
+
data
|
|
1902
|
+
}, { ifRev });
|
|
1903
|
+
},
|
|
1904
|
+
now,
|
|
1905
|
+
warn: (message, meta) => {
|
|
1906
|
+
logger.warn(message, { meta });
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
var OLD_FIELDS = [
|
|
1911
|
+
"pumpIntervalEnabled",
|
|
1912
|
+
"pumpOnTime",
|
|
1913
|
+
"pumpOffTime"
|
|
1914
|
+
];
|
|
1915
|
+
var OLD_COMMANDS = [
|
|
1916
|
+
"setPumpInterval",
|
|
1917
|
+
"setPumpOnMinutes",
|
|
1918
|
+
"setPumpOffMinutes"
|
|
1919
|
+
];
|
|
1920
|
+
var UNKNOWN = {
|
|
1921
|
+
kind: "expression",
|
|
1922
|
+
expr: "null",
|
|
1923
|
+
bindings: {}
|
|
1924
|
+
};
|
|
1925
|
+
var NOW = {
|
|
1926
|
+
kind: "expression",
|
|
1927
|
+
expr: "now",
|
|
1928
|
+
bindings: {}
|
|
1929
|
+
};
|
|
1930
|
+
function without(record, keys) {
|
|
1931
|
+
return Object.fromEntries(Object.entries(record).filter(([key]) => !keys.includes(key)));
|
|
1932
|
+
}
|
|
1933
|
+
function hasOldShape(feature) {
|
|
1934
|
+
const commands = feature.commands ?? {};
|
|
1935
|
+
return OLD_FIELDS.some((key) => key in feature.fields) || OLD_COMMANDS.some((key) => key in commands);
|
|
1936
|
+
}
|
|
1937
|
+
function cycleFeature(old) {
|
|
1938
|
+
const enabled = old.fields["pumpIntervalEnabled"];
|
|
1939
|
+
const commands = old.commands ?? {};
|
|
1940
|
+
const setEnabled = commands["setPumpInterval"];
|
|
1941
|
+
const setOn = commands["setPumpOnMinutes"];
|
|
1942
|
+
const setOff = commands["setPumpOffMinutes"];
|
|
1943
|
+
if (enabled === void 0 || setEnabled === void 0 || setOn === void 0 || setOff === void 0) return null;
|
|
1944
|
+
return {
|
|
1945
|
+
kind: "fields",
|
|
1946
|
+
cap: "pump-cycle",
|
|
1947
|
+
fields: {
|
|
1948
|
+
enabled,
|
|
1949
|
+
onTime: UNKNOWN,
|
|
1950
|
+
offTime: UNKNOWN,
|
|
1951
|
+
lastFetchedAt: NOW
|
|
1952
|
+
},
|
|
1953
|
+
commands: {
|
|
1954
|
+
setEnabled,
|
|
1955
|
+
setOnMinutes: setOn,
|
|
1956
|
+
setOffMinutes: setOff
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
/** The split composition, or null when this one has nothing to split. */
|
|
1961
|
+
function splitComposition(composition) {
|
|
1962
|
+
if (composition.target.kind !== "new" || composition.target.type !== DeviceType$1.PetFountain) return null;
|
|
1963
|
+
const features = composition.features.flatMap((feature) => {
|
|
1964
|
+
if (feature.kind !== "fields" || feature.cap !== "pet-fountain" || !hasOldShape(feature)) return [feature];
|
|
1965
|
+
const core = {
|
|
1966
|
+
...feature,
|
|
1967
|
+
fields: without(feature.fields, OLD_FIELDS),
|
|
1968
|
+
commands: without(feature.commands ?? {}, OLD_COMMANDS)
|
|
1969
|
+
};
|
|
1970
|
+
const cycle = cycleFeature(feature);
|
|
1971
|
+
return cycle === null ? [core] : [core, cycle];
|
|
1972
|
+
});
|
|
1973
|
+
return features.length !== composition.features.length || features.some((feature, index) => feature !== composition.features[index]) ? {
|
|
1974
|
+
...composition,
|
|
1975
|
+
features
|
|
1976
|
+
} : null;
|
|
1977
|
+
}
|
|
1978
|
+
function splitBlock(block) {
|
|
1979
|
+
const source = block.source;
|
|
1980
|
+
if (source === void 0 || source.kind !== "composition") return null;
|
|
1981
|
+
const composition = splitComposition(source.composition);
|
|
1982
|
+
if (composition === null) return null;
|
|
1983
|
+
return {
|
|
1984
|
+
...block,
|
|
1985
|
+
source: {
|
|
1986
|
+
kind: "composition",
|
|
1987
|
+
composition
|
|
1988
|
+
}
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
function rewriteOf(row, ports) {
|
|
1992
|
+
const parsed = CoreBlockSchema.safeParse(row.data.block);
|
|
1993
|
+
if (!parsed.success) return null;
|
|
1994
|
+
const split = splitBlock(parsed.data);
|
|
1995
|
+
if (split === null) return null;
|
|
1996
|
+
const updatedAt = Math.max(parsed.data.updatedAt + 1, ports.now());
|
|
1997
|
+
const next = CoreBlockSchema.safeParse({
|
|
1998
|
+
...split,
|
|
1999
|
+
updatedAt
|
|
2000
|
+
});
|
|
2001
|
+
if (!next.success) {
|
|
2002
|
+
ports.warn("core block left as it is: the split composition does not validate", {
|
|
2003
|
+
blockId: row.id,
|
|
2004
|
+
error: next.error.message
|
|
2005
|
+
});
|
|
2006
|
+
return null;
|
|
2007
|
+
}
|
|
2008
|
+
return {
|
|
2009
|
+
row,
|
|
2010
|
+
data: {
|
|
2011
|
+
...row.data,
|
|
2012
|
+
updatedAt,
|
|
2013
|
+
block: next.data
|
|
2014
|
+
}
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2017
|
+
async function splitPumpCycleFromFountain(ports) {
|
|
2018
|
+
const rewrites = (await ports.listBlockRows()).flatMap((row) => {
|
|
2019
|
+
const rewrite = rewriteOf(row, ports);
|
|
2020
|
+
return rewrite === null ? [] : [rewrite];
|
|
2021
|
+
});
|
|
2022
|
+
if (rewrites.length === 0) return {
|
|
2023
|
+
outcome: "already-done",
|
|
2024
|
+
summary: { blocks: 0 }
|
|
2025
|
+
};
|
|
2026
|
+
for (const { row, data } of rewrites) await ports.replaceBlockRow(row.id, data, row.rev);
|
|
2027
|
+
return {
|
|
2028
|
+
outcome: "done",
|
|
2029
|
+
summary: { blocks: rewrites.length }
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
//#endregion
|
|
2033
|
+
//#region src/builtins/core-blocks/migrations/index.ts
|
|
2034
|
+
/** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
|
|
2035
|
+
var ADDON_MIGRATIONS = [{
|
|
2036
|
+
meta: {
|
|
2037
|
+
id: PUMP_CYCLE_SPLIT_ID,
|
|
2038
|
+
owner: "core-blocks",
|
|
2039
|
+
level: "addon-state",
|
|
2040
|
+
seq: 1,
|
|
2041
|
+
dependsOn: [],
|
|
2042
|
+
store: "settings",
|
|
2043
|
+
scope: "cluster",
|
|
2044
|
+
onFailure: "block-owner",
|
|
2045
|
+
bodyKind: "procedure",
|
|
2046
|
+
description: "Move the pump duty cycle of a stored pet-fountain composition from the pet-fountain feature to a pump-cycle feature",
|
|
2047
|
+
fixtureMark: "the block createdBy and name, which the migration does not know"
|
|
2048
|
+
},
|
|
2049
|
+
procedure: splitPumpCycleFromFountain
|
|
2050
|
+
}];
|
|
2051
|
+
//#endregion
|
|
1863
2052
|
//#region src/builtins/core-blocks/runs-ledger.ts
|
|
1864
2053
|
/**
|
|
1865
2054
|
* The hub's runs ledger: what each automation block and each Action run DID.
|
|
@@ -6666,6 +6855,7 @@ var CoreBlocksAddon = class extends BaseAddon {
|
|
|
6666
6855
|
const records = this.ctx.records;
|
|
6667
6856
|
if (records === void 0) throw new Error("core-blocks needs ctx.records on the hub");
|
|
6668
6857
|
await records.declare(coreBlocksRecordKinds);
|
|
6858
|
+
await this.runMigrations(defineAddonMigrations(ADDON_MIGRATIONS, coreBlocksMigrationPorts(records.kind(coreBlocksRecordKinds.blocks), this.ctx.logger.child("migrations"), () => Date.now())));
|
|
6669
6859
|
this.store = CoreBlockStore.of(records, this.ctx.logger.child("store"));
|
|
6670
6860
|
this.prefs = new BlockSettingsStore({
|
|
6671
6861
|
store: settingsStore,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AddonMigration } from "@camstack/types";
|
|
2
|
+
import { type CoreBlocksMigrationPorts } from "./pump-cycle-split.js";
|
|
3
|
+
export { coreBlocksMigrationPorts, PUMP_CYCLE_SPLIT_ID, type CoreBlocksMigrationPorts, type StoredBlockRow } from "./pump-cycle-split.js";
|
|
4
|
+
/** The `core-blocks` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
|
|
5
|
+
export declare const ADDON_MIGRATIONS: readonly AddonMigration<CoreBlocksMigrationPorts>[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pump duty cycle leaves the `pet-fountain` feature of a stored composition
|
|
3
|
+
* (planning#366).
|
|
4
|
+
*
|
|
5
|
+
* A fountain composed by the previous preset carries `pumpIntervalEnabled`,
|
|
6
|
+
* `pumpOnTime` and `pumpOffTime` as fields of `pet-fountain` and the three
|
|
7
|
+
* forwards `setPumpInterval`, `setPumpOnMinutes`, `setPumpOffMinutes`. The cap no
|
|
8
|
+
* longer has them: the cycle is the optional `pump-cycle` cap. This rewrites each
|
|
9
|
+
* such block so it validates against the new cap and keeps working:
|
|
10
|
+
*
|
|
11
|
+
* - the three fields and three forwards leave `pet-fountain`;
|
|
12
|
+
* - when all three forwards existed, a `pump-cycle` feature is inserted right after
|
|
13
|
+
* it, carrying the old cycle switch as `enabled`, the two times unknown (a number
|
|
14
|
+
* box cannot be read back) and the three forwards renamed to the new methods;
|
|
15
|
+
* - when they did not all exist there is no cycle to keep: the three fields go and
|
|
16
|
+
* no `pump-cycle` is added.
|
|
17
|
+
*
|
|
18
|
+
* Only compositions that BUILD a pet fountain are touched. A row that does not parse,
|
|
19
|
+
* a code block, a customization of an existing device, and a fountain already in the
|
|
20
|
+
* new shape are left exactly as they are, so a rerun edits nothing. The block's
|
|
21
|
+
* `updatedAt` moves (it is the version an editor's `expectedUpdatedAt` is checked
|
|
22
|
+
* against); every other field, the name and the enabled flag included, is kept.
|
|
23
|
+
*/
|
|
24
|
+
import { type IScopedLogger, type MigrationProcedureResult, type RecordKindHandle } from "@camstack/types";
|
|
25
|
+
import type { CoreBlockRowBody } from "../record-kinds.js";
|
|
26
|
+
export declare const PUMP_CYCLE_SPLIT_ID = "core-blocks/2026-11-02-pump-cycle-split";
|
|
27
|
+
/** A stored block row as the migration reads it: the version it read is the version it writes over. */
|
|
28
|
+
export interface StoredBlockRow {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly rev: number;
|
|
31
|
+
readonly data: CoreBlockRowBody;
|
|
32
|
+
}
|
|
33
|
+
export interface CoreBlocksMigrationPorts {
|
|
34
|
+
/** Every stored block row. Throws when they cannot be read in full. */
|
|
35
|
+
listBlockRows(): Promise<readonly StoredBlockRow[]>;
|
|
36
|
+
/** Replace a row's body, refused when the row changed since it was read. */
|
|
37
|
+
replaceBlockRow(id: string, data: CoreBlockRowBody, ifRev: number): Promise<void>;
|
|
38
|
+
now(): number;
|
|
39
|
+
warn(message: string, meta: Readonly<Record<string, unknown>>): void;
|
|
40
|
+
}
|
|
41
|
+
/** The ports over the real `core_blocks` kind. */
|
|
42
|
+
export declare function coreBlocksMigrationPorts(blocks: RecordKindHandle<CoreBlockRowBody>, logger: IScopedLogger, now: () => number): CoreBlocksMigrationPorts;
|
|
43
|
+
export declare function splitPumpCycleFromFountain(ports: CoreBlocksMigrationPorts): Promise<MigrationProcedureResult>;
|
|
@@ -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_retention = require("../../retention-
|
|
6
|
+
const require_dist = require("../../dist-hoy7lFFU.js");
|
|
7
|
+
const require_retention = require("../../retention-YUgpamYA.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
10
10
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as subjectIdOf, _ as readUnit, a as FIVE_MINUTES_MS, b as SeriesRegistry, c as bucketEndOf, d as CAP_KEY_PREFIX, f as CaptureEngine, g as readPath, h as catalogMetrics, i as DAY_MS, l as bucketStartOf, m as capSeriesKey, n as RetentionJob, o as HOUR_MS, p as capItemSeriesKey, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo, v as DeviceDirectory, x as identityOf, y as isRealDeviceType } from "../../retention-
|
|
1
|
+
import { Cs as isReadingQuantity, _s as historyUnitFor, ct as HISTORY_CATALOG, ec as DeviceType, fn as armRemovalReconcile, fs as emitReadiness, ho as BaseAddon, ir as deviceRunsCapability, lt as HISTORY_ITEM_CATALOG, mo as wattMillisecondsToKwh, nc as EventCategory, q as DeviceRunSchema, rr as deviceRemovalHookCapability, tr as deviceHistoryCapability, us as defineRecordKinds, z as DEVICE_HISTORY_ENERGY_KEY } from "../../dist-CYQNDx7D.mjs";
|
|
2
|
+
import { S as subjectIdOf, _ as readUnit, a as FIVE_MINUTES_MS, b as SeriesRegistry, c as bucketEndOf, d as CAP_KEY_PREFIX, f as CaptureEngine, g as readPath, h as catalogMetrics, i as DAY_MS, l as bucketStartOf, m as capSeriesKey, n as RetentionJob, o as HOUR_MS, p as capItemSeriesKey, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo, v as DeviceDirectory, x as identityOf, y as isRealDeviceType } from "../../retention-BnRv1V1H.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
5
5
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -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-hoy7lFFU.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 { $i as runtimeStatePolicyFor, $s as DeviceRole, Bt as STREAM_PROFILE_META, Ci as parseStreamParamsFormPatch, Cr as formatMinutes, Ds as isSecretMarkerLike, Es as isSecretMarker, F as DAY_NAMES, Gr as legacyAutoLinkIds, Hn as createDeviceExtensionProvider, J as DeviceStatusSchema, Jo as WELL_KNOWN_TAB_MAP, Js as toSecretFieldView, Ks as sleep$1, Qs as DeviceFeature, Sn as buildStreamParamsConfigSchema, Ss as isKeychainStoredField, Tn as canonicalIconKey, Uo as SECRET_CLEAR, Us as secretTreeFromPaths, Vs as resolveSecretMarkers, X as DiscoveryProposalBodySchema, Xn as defineExtensionSlotProvider, Xr as locationIconKey, Xs as userError, Y as DeviceTombstoneSchema, Ys as transformSecretWrite, ar as deviceStateCapability, at as FieldClaimModeSchema, bs as isDeviceConfigCap, cr as enumerateItemArrayFields, ec as DeviceType, er as deviceExtensionCapability, g as CAMERA_SWITCH_ORDER, gi as normalizeUnit, ho as BaseAddon, is as collectZodSecretPaths, lr as enumerateSchemaFields, nc as EventCategory, nr as deviceManagerCapability, o as ALL_CAPABILITY_DEFINITIONS, or as deviceStatusCapability, ot as FieldClaimSchema, pr as expandContainer, tc as errMsg, ua as siteZoneKey, us as defineRecordKinds, v as CAP_NAMES_WITH_STATUS, ws as isSecretClear, xt as MINUTES_PER_DAY } from "../../dist-CYQNDx7D.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-hoy7lFFU.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 { $r as logDestinationCapability, ho as BaseAddon } from "../../dist-CYQNDx7D.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,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-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-hoy7lFFU.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-BCeNjQxi.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_constants = require("../../constants-BrhaiRkm.js");
|
|
10
10
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
11
11
|
let node_crypto = require("node:crypto");
|
|
12
12
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { Ls as parseSecretRef, Ps as normalizeSecretOwner, Ur as keychainAdminCapability, Wr as keychainCapability, _t as KeychainResetRecordSchema, gt as KeychainAuditEntrySchema, ho as BaseAddon, ht as KEYCHAIN_RESET_TRIGGER_ACTOR, ms as formatSecretScope, nc as EventCategory, us as defineRecordKinds } from "../../dist-CYQNDx7D.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-Dp9VZmay.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-3SpeBQ9e.mjs";
|
|
5
5
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
6
6
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
7
7
|
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-hoy7lFFU.js");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as RecordingStatusSchema, Mt as RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
1
|
+
import { Ft as RecordingStatusSchema, Mt as RECORDING_SOURCE_CAMSTACK_ADDON, as as createEvent, ho as BaseAddon, nc as EventCategory, ri as mayWriteToLocation, tc as errMsg } from "../../dist-CYQNDx7D.mjs";
|
|
2
2
|
import * as fsp from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { constants } from "node:fs";
|
|
@@ -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-hoy7lFFU.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-BCeNjQxi.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");
|