@camstack/server 1.2.735 → 1.2.736
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/core/cap-providers.js +114 -8
- package/dist/api/trpc/generated-cap-mounts.js +17 -1
- package/dist/api/trpc/generated-cap-routers.js +1789 -1708
- package/dist/core/addon/addon-registry.service.js +2 -0
- package/dist/core/addon/addon-settings-provider.js +4 -0
- package/dist/core/addon/integration-instances-provider.js +21 -0
- package/package.json +4 -4
- package/system/dist/{agent-https-DrCbFr4p.js → agent-https-Bi3JY1e0.js} +1 -1
- package/system/dist/{agent-https-BVCIU0eH.mjs → agent-https-DiK6iQzW.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 +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +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 +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- 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 +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 +440 -25
- package/system/dist/builtins/loki-logging/index.mjs +438 -25
- package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +23 -14
- package/system/dist/builtins/loki-logging/loki-record-kinds.d.ts +33 -0
- package/system/dist/builtins/loki-logging/migrations/connection-to-records.d.ts +47 -0
- package/system/dist/builtins/loki-logging/migrations/index.d.ts +8 -0
- 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 +2 -22
- package/system/dist/builtins/record-entries/index.mjs +2 -22
- 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 +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 +7 -7
- 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-BV9n2ivT.js → composition-sources-DQLGJMMh.js} +1 -1
- package/system/dist/{composition-sources-CI2tZzAo.mjs → composition-sources-lnsR-YuH.mjs} +1 -1
- package/system/dist/{constants-Bskr2h1W.mjs → constants-D7I0cM20.mjs} +1 -1
- package/system/dist/{constants-dYIQm8ab.js → constants-DA5jgmYT.js} +1 -1
- package/system/dist/{device-ca-04o7NByo.mjs → device-ca-Clr2bCe-.mjs} +1 -1
- package/system/dist/{device-ca-BF8N9fC6.js → device-ca-GPjZE-Mm.js} +1 -1
- package/system/dist/{dist-CnC8-kF6.mjs → dist-Cyj93AvD.mjs} +529 -152
- package/system/dist/{dist-B4r3_aYb.js → dist-Xi7ZQ7UI.js} +564 -151
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-MdXDARI0.js → hub-mdns-ciao-BMgUdxgG.js} +2 -2
- package/system/dist/{hub-mdns-ciao-BE1vqriF.mjs → hub-mdns-ciao-ouzCfqVS.mjs} +2 -2
- package/system/dist/index.js +7 -7
- package/system/dist/index.mjs +7 -7
- package/system/dist/{restore-archive-Dx9F-3zV.mjs → restore-archive-BG22FodH.mjs} +5 -5
- package/system/dist/{restore-archive-BEUIhG8U.js → restore-archive-CZozfCX-.js} +1 -1
- package/system/dist/{retention-fsBjIfxP.mjs → retention-BfC_C1vy.mjs} +1 -1
- package/system/dist/{retention-nNCAON-6.js → retention-DCrdPMot.js} +1 -1
- package/system/dist/{wal-maintenance-0XhlopB5.mjs → wal-maintenance-C2GNRuvy.mjs} +0 -0
- package/system/dist/{wal-maintenance-UKXXEEoS.js → wal-maintenance-PjOoh6-K.js} +0 -0
- package/system/package.json +4 -1
|
@@ -1162,7 +1162,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1162
1162
|
return DeviceRole;
|
|
1163
1163
|
}({});
|
|
1164
1164
|
//#endregion
|
|
1165
|
-
//#region ../types/dist/sleep-
|
|
1165
|
+
//#region ../types/dist/sleep-CdJHPm-k.mjs
|
|
1166
1166
|
/**
|
|
1167
1167
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1168
1168
|
* window to float samples (D455).
|
|
@@ -1274,21 +1274,21 @@ function collectSecretConfigKeys(schema) {
|
|
|
1274
1274
|
for (const section of sectionsOf(schema)) for (const field of fieldsOf(section)) walkField(field, keys);
|
|
1275
1275
|
return keys;
|
|
1276
1276
|
}
|
|
1277
|
-
function isRecord$
|
|
1277
|
+
function isRecord$8(value) {
|
|
1278
1278
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1279
1279
|
}
|
|
1280
1280
|
function sectionsOf(schema) {
|
|
1281
|
-
if (!isRecord$
|
|
1281
|
+
if (!isRecord$8(schema)) return [];
|
|
1282
1282
|
const sections = schema["sections"];
|
|
1283
1283
|
return Array.isArray(sections) ? sections : [];
|
|
1284
1284
|
}
|
|
1285
1285
|
function fieldsOf(node) {
|
|
1286
|
-
if (!isRecord$
|
|
1286
|
+
if (!isRecord$8(node)) return [];
|
|
1287
1287
|
const fields = node["fields"];
|
|
1288
1288
|
return Array.isArray(fields) ? fields : [];
|
|
1289
1289
|
}
|
|
1290
1290
|
function walkField(field, out) {
|
|
1291
|
-
if (!isRecord$
|
|
1291
|
+
if (!isRecord$8(field)) return;
|
|
1292
1292
|
const type = field["type"];
|
|
1293
1293
|
const key = field["key"];
|
|
1294
1294
|
if ((type === "password" || field["secret"] === true) && typeof key === "string" && key.length > 0) out.add(key);
|
|
@@ -1326,7 +1326,7 @@ function walkField(field, out) {
|
|
|
1326
1326
|
var SECRET_CLEAR = { $secretClear: true };
|
|
1327
1327
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
1328
1328
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
1329
|
-
function isRecord$
|
|
1329
|
+
function isRecord$7(value) {
|
|
1330
1330
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1331
1331
|
}
|
|
1332
1332
|
function makeSecretMarker(ref) {
|
|
@@ -1337,16 +1337,19 @@ function makeSecretMarker(ref) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
1339
1339
|
function isSecretMarker(value) {
|
|
1340
|
-
if (!isRecord$
|
|
1340
|
+
if (!isRecord$7(value)) return false;
|
|
1341
1341
|
const ref = value["$secret"];
|
|
1342
1342
|
return typeof ref === "string" && ref.length > 0;
|
|
1343
1343
|
}
|
|
1344
1344
|
/** Anything carrying a `$secret` key — a stored marker or a UI view of one. */
|
|
1345
1345
|
function isSecretMarkerLike(value) {
|
|
1346
|
-
return isRecord$
|
|
1346
|
+
return isRecord$7(value) && Object.prototype.hasOwnProperty.call(value, "$secret");
|
|
1347
1347
|
}
|
|
1348
1348
|
function isSecretClear(value) {
|
|
1349
|
-
return isRecord$
|
|
1349
|
+
return isRecord$7(value) && value["$secretClear"] === true;
|
|
1350
|
+
}
|
|
1351
|
+
function isSecretFieldView(value) {
|
|
1352
|
+
return isRecord$7(value) && value["set"] === true && isSecretMarkerLike(value);
|
|
1350
1353
|
}
|
|
1351
1354
|
/**
|
|
1352
1355
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -1746,6 +1749,53 @@ function emitReadiness(bus, params) {
|
|
|
1746
1749
|
ts
|
|
1747
1750
|
}));
|
|
1748
1751
|
}
|
|
1752
|
+
/** Why a catalogue entry is not a runnable body of its declared kind. */
|
|
1753
|
+
var AddonMigrationDefinitionError = class extends Error {
|
|
1754
|
+
id;
|
|
1755
|
+
constructor(id, message) {
|
|
1756
|
+
super(`${id}: ${message}`);
|
|
1757
|
+
this.id = id;
|
|
1758
|
+
this.name = "AddonMigrationDefinitionError";
|
|
1759
|
+
}
|
|
1760
|
+
};
|
|
1761
|
+
/**
|
|
1762
|
+
* Bind a catalogue to the addon's ports. Throws {@link AddonMigrationDefinitionError} when
|
|
1763
|
+
* an entry's `bodyKind` does not match the body it carries, or is `sql` (a hub-only
|
|
1764
|
+
* body). A throwing body never escapes `execute`: it is reported as a failed result.
|
|
1765
|
+
*/
|
|
1766
|
+
function defineAddonMigrations(catalogue, ports) {
|
|
1767
|
+
return catalogue.map((entry) => {
|
|
1768
|
+
const { meta } = entry;
|
|
1769
|
+
if ("plan" in entry) {
|
|
1770
|
+
if (meta.bodyKind !== "plan") throw new AddonMigrationDefinitionError(meta.id, `carries a plan body but declares "${meta.bodyKind}"`);
|
|
1771
|
+
return {
|
|
1772
|
+
meta,
|
|
1773
|
+
execute: () => guarded(async () => ({
|
|
1774
|
+
kind: "plan",
|
|
1775
|
+
plan: await entry.plan(ports)
|
|
1776
|
+
}))
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
if (meta.bodyKind !== "procedure") throw new AddonMigrationDefinitionError(meta.id, `carries a procedure body but declares "${meta.bodyKind}"`);
|
|
1780
|
+
return {
|
|
1781
|
+
meta,
|
|
1782
|
+
execute: () => guarded(async () => ({
|
|
1783
|
+
kind: "procedure",
|
|
1784
|
+
result: await entry.procedure(ports)
|
|
1785
|
+
}))
|
|
1786
|
+
};
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
async function guarded(work) {
|
|
1790
|
+
try {
|
|
1791
|
+
return await work();
|
|
1792
|
+
} catch (err) {
|
|
1793
|
+
return {
|
|
1794
|
+
kind: "failed",
|
|
1795
|
+
error: errMsg(err)
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1749
1799
|
var NOT_RUN = {
|
|
1750
1800
|
declared: false,
|
|
1751
1801
|
snapshot: null,
|
|
@@ -2111,7 +2161,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
2111
2161
|
}
|
|
2112
2162
|
};
|
|
2113
2163
|
var KEEP = { kind: "keep" };
|
|
2114
|
-
function isRecord$
|
|
2164
|
+
function isRecord$6(value) {
|
|
2115
2165
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2116
2166
|
}
|
|
2117
2167
|
function defaultMintId() {
|
|
@@ -2124,7 +2174,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
2124
2174
|
return out;
|
|
2125
2175
|
}
|
|
2126
2176
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
2127
|
-
else if (isRecord$
|
|
2177
|
+
else if (isRecord$6(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
2128
2178
|
return out;
|
|
2129
2179
|
}
|
|
2130
2180
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -2179,7 +2229,7 @@ function rowId(row, idKey) {
|
|
|
2179
2229
|
return null;
|
|
2180
2230
|
}
|
|
2181
2231
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
2182
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
2232
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$6) : [];
|
|
2183
2233
|
if (!Array.isArray(incoming)) {
|
|
2184
2234
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
2185
2235
|
return {
|
|
@@ -2195,7 +2245,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
2195
2245
|
const kept = /* @__PURE__ */ new Set();
|
|
2196
2246
|
const rows = [];
|
|
2197
2247
|
for (const row of incoming) {
|
|
2198
|
-
if (!isRecord$
|
|
2248
|
+
if (!isRecord$6(row)) {
|
|
2199
2249
|
rows.push(row);
|
|
2200
2250
|
continue;
|
|
2201
2251
|
}
|
|
@@ -2220,7 +2270,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
2220
2270
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
2221
2271
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
2222
2272
|
case "object": {
|
|
2223
|
-
if (!isRecord$
|
|
2273
|
+
if (!isRecord$6(incoming)) {
|
|
2224
2274
|
if (incoming === void 0) return KEEP;
|
|
2225
2275
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
2226
2276
|
return {
|
|
@@ -2228,7 +2278,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
2228
2278
|
value: incoming
|
|
2229
2279
|
};
|
|
2230
2280
|
}
|
|
2231
|
-
const storedObj = isRecord$
|
|
2281
|
+
const storedObj = isRecord$6(stored) ? stored : {};
|
|
2232
2282
|
return {
|
|
2233
2283
|
kind: "value",
|
|
2234
2284
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -2351,7 +2401,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
2351
2401
|
value: items
|
|
2352
2402
|
};
|
|
2353
2403
|
}
|
|
2354
|
-
if (isRecord$
|
|
2404
|
+
if (isRecord$6(v)) {
|
|
2355
2405
|
const out = {};
|
|
2356
2406
|
for (const [k, child] of Object.entries(v)) {
|
|
2357
2407
|
const s = substitute(child);
|
|
@@ -2383,7 +2433,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
2383
2433
|
this.name = "SecretOverwriteRefusedError";
|
|
2384
2434
|
}
|
|
2385
2435
|
};
|
|
2386
|
-
function isRecord$
|
|
2436
|
+
function isRecord$5(value) {
|
|
2387
2437
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2388
2438
|
}
|
|
2389
2439
|
function resolvedValue(pass, marker) {
|
|
@@ -2412,7 +2462,7 @@ function inArray(pass, incoming, stored) {
|
|
|
2412
2462
|
return incoming.map((item, index) => {
|
|
2413
2463
|
const twin = stored[index];
|
|
2414
2464
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
2415
|
-
if (isRecord$
|
|
2465
|
+
if (isRecord$5(item) && isRecord$5(twin)) return inArrayRow(pass, item, twin);
|
|
2416
2466
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
2417
2467
|
return item;
|
|
2418
2468
|
});
|
|
@@ -2423,7 +2473,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
2423
2473
|
const twin = stored[key];
|
|
2424
2474
|
if (isSecretMarker(twin)) {
|
|
2425
2475
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
2426
|
-
} else if (isRecord$
|
|
2476
|
+
} else if (isRecord$5(value) && isRecord$5(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
2427
2477
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
2428
2478
|
}
|
|
2429
2479
|
return out;
|
|
@@ -2431,7 +2481,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
2431
2481
|
async function walk(pass, incoming, stored) {
|
|
2432
2482
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
2433
2483
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
2434
|
-
if (!isRecord$
|
|
2484
|
+
if (!isRecord$5(incoming) || !isRecord$5(stored)) return incoming;
|
|
2435
2485
|
const out = { ...incoming };
|
|
2436
2486
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
2437
2487
|
return out;
|
|
@@ -2462,7 +2512,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
2462
2512
|
function isJsonEqual(a, b) {
|
|
2463
2513
|
if (Object.is(a, b)) return true;
|
|
2464
2514
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
2465
|
-
if (isRecord$
|
|
2515
|
+
if (isRecord$5(a) && isRecord$5(b)) {
|
|
2466
2516
|
const keys = Object.keys(a);
|
|
2467
2517
|
if (keys.length !== Object.keys(b).length) return false;
|
|
2468
2518
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -2486,7 +2536,7 @@ function markerKeysOf(blob, owner) {
|
|
|
2486
2536
|
}
|
|
2487
2537
|
function nodeFromStored(value, owner) {
|
|
2488
2538
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
2489
|
-
if (!isRecord$
|
|
2539
|
+
if (!isRecord$5(value)) return null;
|
|
2490
2540
|
const children = /* @__PURE__ */ new Map();
|
|
2491
2541
|
for (const [key, child] of Object.entries(value)) {
|
|
2492
2542
|
const node = nodeFromStored(child, owner);
|
|
@@ -3960,61 +4010,6 @@ function nodeIdOfScopedKey(key) {
|
|
|
3960
4010
|
const nodeId = key.slice(at + 1);
|
|
3961
4011
|
return nodeId === "" ? null : nodeId;
|
|
3962
4012
|
}
|
|
3963
|
-
/**
|
|
3964
|
-
* Per-listener shared-secret header the hub injects on every reverse-proxied
|
|
3965
|
-
* data-plane request and the addon's framework wrapper validates — so only the
|
|
3966
|
-
* hub can reach the addon's `127.0.0.1` listener. Defined here (shared by the
|
|
3967
|
-
* core proxy and the kernel listener) to keep both off a kernel↔core import.
|
|
3968
|
-
*/
|
|
3969
|
-
var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
|
|
3970
|
-
/**
|
|
3971
|
-
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
3972
|
-
* and validates them (`ShareViewGrantSchema` builds its
|
|
3973
|
-
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
3974
|
-
*/
|
|
3975
|
-
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
3976
|
-
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
3977
|
-
var PeerBytesTicketSchema = z.object({
|
|
3978
|
-
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
3979
|
-
url: z.string().min(1),
|
|
3980
|
-
/**
|
|
3981
|
-
* The HOST node this URL means something on — the hub or a named agent,
|
|
3982
|
-
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
3983
|
-
* refuses `cross-node` by name when they differ, without dialling.
|
|
3984
|
-
*/
|
|
3985
|
-
hostNodeId: z.string().min(1),
|
|
3986
|
-
expiresAtMs: z.number().int().nonnegative(),
|
|
3987
|
-
/**
|
|
3988
|
-
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
3989
|
-
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
3990
|
-
* must be able to tell "the producer did not say" from "the body is empty".
|
|
3991
|
-
*/
|
|
3992
|
-
declaredBytes: z.number().int().nonnegative().nullable()
|
|
3993
|
-
});
|
|
3994
|
-
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
3995
|
-
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
3996
|
-
var RECORD_DATABASES = ["settings", "events"];
|
|
3997
|
-
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
3998
|
-
var RECORD_CLASSES = [
|
|
3999
|
-
"config",
|
|
4000
|
-
"ledger",
|
|
4001
|
-
"audit",
|
|
4002
|
-
"mirror",
|
|
4003
|
-
"ephemeral"
|
|
4004
|
-
];
|
|
4005
|
-
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
4006
|
-
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
4007
|
-
var RECORD_BATCH_MAX = 1e3;
|
|
4008
|
-
var RECORD_BATCH_MAX_BYTES = 4 * 1024 * 1024;
|
|
4009
|
-
var RECORD_QUERY_MAX = 1e3;
|
|
4010
|
-
/** Rows one DELETE statement removes before the serving thread yields. */
|
|
4011
|
-
var RECORD_DELETE_BATCH = 5e3;
|
|
4012
|
-
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
4013
|
-
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
4014
|
-
/** The engine's TTL sweep cadence. */
|
|
4015
|
-
var RECORD_SWEEP_INTERVAL_MS = 10 * 6e4;
|
|
4016
|
-
/** The `Column`-free proof prefix: a ref collection for a kind's secret fields. */
|
|
4017
|
-
var RECORD_SECRET_COLLECTION_PREFIX = "records:";
|
|
4018
4013
|
var PREFIX = "records/";
|
|
4019
4014
|
/** The base of every records failure. `detail` is the human part of the message. */
|
|
4020
4015
|
var RecordsError = class extends Error {
|
|
@@ -4089,6 +4084,13 @@ var ForeignSecretMarkerError = class extends RecordsError {
|
|
|
4089
4084
|
this.name = "ForeignSecretMarkerError";
|
|
4090
4085
|
}
|
|
4091
4086
|
};
|
|
4087
|
+
/** The keychain could not store or serve a value: explicit, never an empty string. */
|
|
4088
|
+
var RecordSecretUnavailableError = class extends RecordsError {
|
|
4089
|
+
constructor(detail) {
|
|
4090
|
+
super("secret-unavailable", detail);
|
|
4091
|
+
this.name = "RecordSecretUnavailableError";
|
|
4092
|
+
}
|
|
4093
|
+
};
|
|
4092
4094
|
var InvalidRecordError = class extends RecordsError {
|
|
4093
4095
|
constructor(detail) {
|
|
4094
4096
|
super("invalid-record", detail);
|
|
@@ -4125,73 +4127,30 @@ var TransactRefusedError = class extends RecordsError {
|
|
|
4125
4127
|
this.name = "TransactRefusedError";
|
|
4126
4128
|
}
|
|
4127
4129
|
};
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
var
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
/**
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
* `.transform` on `in`).
|
|
4153
|
-
*/
|
|
4154
|
-
function layersOf(schema) {
|
|
4155
|
-
const out = [];
|
|
4156
|
-
const queue = [schema];
|
|
4157
|
-
while (queue.length > 0) {
|
|
4158
|
-
const s = queue.shift();
|
|
4159
|
-
if (!s || out.includes(s)) continue;
|
|
4160
|
-
out.push(s);
|
|
4161
|
-
const def = defOf(s);
|
|
4162
|
-
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
4163
|
-
if (def.type === "pipe") {
|
|
4164
|
-
if (def.in) queue.push(def.in);
|
|
4165
|
-
if (def.out) queue.push(def.out);
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
return out;
|
|
4169
|
-
}
|
|
4170
|
-
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
4171
|
-
function isZodSecret(schema) {
|
|
4172
|
-
return layersOf(schema).some(declaredHere);
|
|
4173
|
-
}
|
|
4174
|
-
/**
|
|
4175
|
-
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
4176
|
-
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
4177
|
-
* object or array is reported as one path and not descended into — everything
|
|
4178
|
-
* under it is secret.
|
|
4179
|
-
*/
|
|
4180
|
-
function collectZodSecretPaths(schema, prefix = "") {
|
|
4181
|
-
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
4182
|
-
const paths = [];
|
|
4183
|
-
for (const layer of layersOf(schema)) {
|
|
4184
|
-
const def = defOf(layer);
|
|
4185
|
-
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
4186
|
-
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
4187
|
-
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
4188
|
-
else if (def.type === "intersection") {
|
|
4189
|
-
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
4190
|
-
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
4191
|
-
}
|
|
4192
|
-
}
|
|
4193
|
-
return [...new Set(paths)];
|
|
4194
|
-
}
|
|
4130
|
+
/** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
|
|
4131
|
+
/** The files a kind may live in. `history` is device-history's (D850), never records. */
|
|
4132
|
+
var RECORD_DATABASES = ["settings", "events"];
|
|
4133
|
+
/** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
|
|
4134
|
+
var RECORD_CLASSES = [
|
|
4135
|
+
"config",
|
|
4136
|
+
"ledger",
|
|
4137
|
+
"audit",
|
|
4138
|
+
"mirror",
|
|
4139
|
+
"ephemeral"
|
|
4140
|
+
];
|
|
4141
|
+
var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
|
|
4142
|
+
var RECORD_MAX_DATA_BYTES = 1024 * 1024;
|
|
4143
|
+
var RECORD_BATCH_MAX = 1e3;
|
|
4144
|
+
var RECORD_BATCH_MAX_BYTES = 4 * 1024 * 1024;
|
|
4145
|
+
var RECORD_QUERY_MAX = 1e3;
|
|
4146
|
+
/** Rows one DELETE statement removes before the serving thread yields. */
|
|
4147
|
+
var RECORD_DELETE_BATCH = 5e3;
|
|
4148
|
+
/** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
|
|
4149
|
+
var RECORD_SETTINGS_MAX_ROWS = 5e4;
|
|
4150
|
+
/** The engine's TTL sweep cadence. */
|
|
4151
|
+
var RECORD_SWEEP_INTERVAL_MS = 10 * 6e4;
|
|
4152
|
+
/** The `Column`-free proof prefix: a ref collection for a kind's secret fields. */
|
|
4153
|
+
var RECORD_SECRET_COLLECTION_PREFIX = "records:";
|
|
4195
4154
|
/**
|
|
4196
4155
|
* Secret fields of a record, addressed the way a Zod schema declares them
|
|
4197
4156
|
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
@@ -4228,11 +4187,11 @@ function secretArrayPrefixes(path) {
|
|
|
4228
4187
|
}
|
|
4229
4188
|
return prefixes;
|
|
4230
4189
|
}
|
|
4231
|
-
function isRecord$
|
|
4190
|
+
function isRecord$4(value) {
|
|
4232
4191
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4233
4192
|
}
|
|
4234
4193
|
function elementId(element, idKey, declared, prefix) {
|
|
4235
|
-
const id = isRecord$
|
|
4194
|
+
const id = isRecord$4(element) ? element[idKey] : void 0;
|
|
4236
4195
|
if (typeof id !== "string" || id.length === 0) throw new InvalidRecordError(`"${declared}": every element of "${prefix}" needs a non-empty string "${idKey}" to carry a secret`);
|
|
4237
4196
|
return id;
|
|
4238
4197
|
}
|
|
@@ -4243,7 +4202,7 @@ function elementId(element, idKey, declared, prefix) {
|
|
|
4243
4202
|
*/
|
|
4244
4203
|
var REMOVE_LEAF = Symbol("remove-leaf");
|
|
4245
4204
|
function mapAt(node, segments, index, walkedKeys, concretePrefix, declared, arrayKeys, visit) {
|
|
4246
|
-
if (!isRecord$
|
|
4205
|
+
if (!isRecord$4(node)) return node;
|
|
4247
4206
|
const segment = segments[index];
|
|
4248
4207
|
if (segment === void 0) return node;
|
|
4249
4208
|
if (!Object.prototype.hasOwnProperty.call(node, segment.key)) return node;
|
|
@@ -4319,6 +4278,129 @@ function recordSecretRef(owner, kind, rowId, concretePath) {
|
|
|
4319
4278
|
});
|
|
4320
4279
|
}
|
|
4321
4280
|
/**
|
|
4281
|
+
* A stored secret, as an admin read shows it: a VIEW naming the row's own
|
|
4282
|
+
* keychain ref (`set: true`), never the value and no longer the bare redaction
|
|
4283
|
+
* token. The form hands it to the secret field, which reveals the value by ref
|
|
4284
|
+
* through the audited `keychain-admin.reveal`; sent back untouched it keeps the
|
|
4285
|
+
* stored secret (the records door reads a view as KEEP).
|
|
4286
|
+
*
|
|
4287
|
+
* ONE implementation for the entries service and for every addon that serves
|
|
4288
|
+
* its own instances (`RecordIntegrationInstances`).
|
|
4289
|
+
*/
|
|
4290
|
+
function isRecord$3(value) {
|
|
4291
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4292
|
+
}
|
|
4293
|
+
function secretViewsOf(owner, kind, id, decl, data) {
|
|
4294
|
+
if (decl.secretPaths.length === 0) return data;
|
|
4295
|
+
const shown = mapSecretLeaves(data, decl.secretPaths, decl.secretArrayKeys, (leaf) => {
|
|
4296
|
+
if (leaf.value !== "__camstack_redacted__") return leaf.value;
|
|
4297
|
+
return {
|
|
4298
|
+
$secret: recordSecretRef(owner, kind, id, leaf.concrete),
|
|
4299
|
+
v: 1,
|
|
4300
|
+
set: true
|
|
4301
|
+
};
|
|
4302
|
+
});
|
|
4303
|
+
return isRecord$3(shown) ? shown : data;
|
|
4304
|
+
}
|
|
4305
|
+
/**
|
|
4306
|
+
* Per-listener shared-secret header the hub injects on every reverse-proxied
|
|
4307
|
+
* data-plane request and the addon's framework wrapper validates — so only the
|
|
4308
|
+
* hub can reach the addon's `127.0.0.1` listener. Defined here (shared by the
|
|
4309
|
+
* core proxy and the kernel listener) to keep both off a kernel↔core import.
|
|
4310
|
+
*/
|
|
4311
|
+
var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
|
|
4312
|
+
/**
|
|
4313
|
+
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
4314
|
+
* and validates them (`ShareViewGrantSchema` builds its
|
|
4315
|
+
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
4316
|
+
*/
|
|
4317
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
4318
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
4319
|
+
var PeerBytesTicketSchema = z.object({
|
|
4320
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
4321
|
+
url: z.string().min(1),
|
|
4322
|
+
/**
|
|
4323
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
4324
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
4325
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
4326
|
+
*/
|
|
4327
|
+
hostNodeId: z.string().min(1),
|
|
4328
|
+
expiresAtMs: z.number().int().nonnegative(),
|
|
4329
|
+
/**
|
|
4330
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
4331
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
4332
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
4333
|
+
*/
|
|
4334
|
+
declaredBytes: z.number().int().nonnegative().nullable()
|
|
4335
|
+
});
|
|
4336
|
+
function defOf(schema) {
|
|
4337
|
+
const zodBag = Reflect.get(schema, "_zod");
|
|
4338
|
+
if (typeof zodBag !== "object" || zodBag === null) return {};
|
|
4339
|
+
const def = Reflect.get(zodBag, "def");
|
|
4340
|
+
if (typeof def !== "object" || def === null) return {};
|
|
4341
|
+
return def;
|
|
4342
|
+
}
|
|
4343
|
+
function declaredHere(schema) {
|
|
4344
|
+
return z.globalRegistry.get(schema)?.secret === true;
|
|
4345
|
+
}
|
|
4346
|
+
/** Wrapper kinds whose `innerType` is the field itself. */
|
|
4347
|
+
var WRAPPERS = new Set([
|
|
4348
|
+
"optional",
|
|
4349
|
+
"nullable",
|
|
4350
|
+
"default",
|
|
4351
|
+
"prefault",
|
|
4352
|
+
"catch",
|
|
4353
|
+
"readonly",
|
|
4354
|
+
"nonoptional"
|
|
4355
|
+
]);
|
|
4356
|
+
/**
|
|
4357
|
+
* The schema layers that make up ONE field: the schema itself and every
|
|
4358
|
+
* wrapper below it (optional / default / nullable / readonly / catch), plus
|
|
4359
|
+
* both sides of a pipe (`z.preprocess` puts the real schema on `out`,
|
|
4360
|
+
* `.transform` on `in`).
|
|
4361
|
+
*/
|
|
4362
|
+
function layersOf(schema) {
|
|
4363
|
+
const out = [];
|
|
4364
|
+
const queue = [schema];
|
|
4365
|
+
while (queue.length > 0) {
|
|
4366
|
+
const s = queue.shift();
|
|
4367
|
+
if (!s || out.includes(s)) continue;
|
|
4368
|
+
out.push(s);
|
|
4369
|
+
const def = defOf(s);
|
|
4370
|
+
if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
|
|
4371
|
+
if (def.type === "pipe") {
|
|
4372
|
+
if (def.in) queue.push(def.in);
|
|
4373
|
+
if (def.out) queue.push(def.out);
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
return out;
|
|
4377
|
+
}
|
|
4378
|
+
/** True when any layer of this field declares `.meta({ secret: true })`. */
|
|
4379
|
+
function isZodSecret(schema) {
|
|
4380
|
+
return layersOf(schema).some(declaredHere);
|
|
4381
|
+
}
|
|
4382
|
+
/**
|
|
4383
|
+
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
4384
|
+
* element of this array" (`connection.password`, `rows[].token`). A declared
|
|
4385
|
+
* object or array is reported as one path and not descended into — everything
|
|
4386
|
+
* under it is secret.
|
|
4387
|
+
*/
|
|
4388
|
+
function collectZodSecretPaths(schema, prefix = "") {
|
|
4389
|
+
if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
|
|
4390
|
+
const paths = [];
|
|
4391
|
+
for (const layer of layersOf(schema)) {
|
|
4392
|
+
const def = defOf(layer);
|
|
4393
|
+
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
4394
|
+
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
4395
|
+
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
4396
|
+
else if (def.type === "intersection") {
|
|
4397
|
+
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
4398
|
+
if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
return [...new Set(paths)];
|
|
4402
|
+
}
|
|
4403
|
+
/**
|
|
4322
4404
|
* Record kinds (D881): the declaration an addon makes of one kind of fact, the
|
|
4323
4405
|
* Zod row schema that describes it, and the helper that turns the two into the
|
|
4324
4406
|
* JSON the engine stores.
|
|
@@ -4491,6 +4573,27 @@ function assertTransactScope(members) {
|
|
|
4491
4573
|
if (missing.length > 0) throw new TransactRefusedError(`no-family: ${missing.map((m) => m.kind).join(", ")} declare no transactFamily; kinds that must agree through transact share one`);
|
|
4492
4574
|
if (new Set(kinds.map((m) => m.declaration.transactFamily)).size > 1) throw new TransactRefusedError(`cross-family: the ops span more than one transactFamily (${kinds.map((m) => `${m.kind}=${String(m.declaration.transactFamily)}`).join(", ")})`);
|
|
4493
4575
|
}
|
|
4576
|
+
/**
|
|
4577
|
+
* Declare one entry kind. An entry is configuration: never trimmed by the
|
|
4578
|
+
* engine, never aged, belonging to no device.
|
|
4579
|
+
*/
|
|
4580
|
+
function defineEntryKind(name, spec) {
|
|
4581
|
+
const defined = defineRecordKinds({ [name]: {
|
|
4582
|
+
schema: spec.schema,
|
|
4583
|
+
class: "config",
|
|
4584
|
+
writeTrigger: spec.writeTrigger ?? "an operator adds or edits an entry in the entries UI",
|
|
4585
|
+
retention: { none: "an entry goes only when the operator deletes it" },
|
|
4586
|
+
...spec.database === void 0 ? {} : { database: spec.database },
|
|
4587
|
+
...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
|
|
4588
|
+
...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
|
|
4589
|
+
entry: {
|
|
4590
|
+
title: spec.title,
|
|
4591
|
+
...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
|
|
4592
|
+
}
|
|
4593
|
+
} })[name];
|
|
4594
|
+
if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
|
|
4595
|
+
return defined;
|
|
4596
|
+
}
|
|
4494
4597
|
z.object({
|
|
4495
4598
|
field: z.string().min(1),
|
|
4496
4599
|
on: z.literal("advance")
|
|
@@ -6026,6 +6129,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6026
6129
|
"humidity-sensor",
|
|
6027
6130
|
"image",
|
|
6028
6131
|
"image-settings",
|
|
6132
|
+
"integration-instances",
|
|
6029
6133
|
"integrations",
|
|
6030
6134
|
"intercom",
|
|
6031
6135
|
"ir-transmitter",
|
|
@@ -10865,6 +10969,134 @@ var IntegrationInstanceRefSchema = z.object({
|
|
|
10865
10969
|
]),
|
|
10866
10970
|
candidateStableId: z.string().optional()
|
|
10867
10971
|
});
|
|
10972
|
+
/** The most instances one addon lists (an integrations page, not a table). */
|
|
10973
|
+
var INSTANCES_LIST_MAX = 1e3;
|
|
10974
|
+
/** The keys of the kind's secret fields that sit at the top level of the body. */
|
|
10975
|
+
function topLevelSecretKeys(paths) {
|
|
10976
|
+
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[")));
|
|
10977
|
+
}
|
|
10978
|
+
var RecordIntegrationInstances = class {
|
|
10979
|
+
records;
|
|
10980
|
+
kind;
|
|
10981
|
+
hooks;
|
|
10982
|
+
handle;
|
|
10983
|
+
secretKeys;
|
|
10984
|
+
nameField;
|
|
10985
|
+
constructor(records, kind, hooks) {
|
|
10986
|
+
this.records = records;
|
|
10987
|
+
this.kind = kind;
|
|
10988
|
+
this.hooks = hooks;
|
|
10989
|
+
this.handle = records.kind(kind);
|
|
10990
|
+
this.secretKeys = topLevelSecretKeys(kind.declaration.secretPaths);
|
|
10991
|
+
this.nameField = kind.declaration.entry?.nameField ?? "name";
|
|
10992
|
+
}
|
|
10993
|
+
/**
|
|
10994
|
+
* One instance read for the addon's own runtime; null when absent. When the keychain is
|
|
10995
|
+
* locked the row is served WITHOUT its secrets and says so (`secrets: 'unavailable'`), so the
|
|
10996
|
+
* caller can keep what it had instead of reconfiguring with an empty secret (D49).
|
|
10997
|
+
*/
|
|
10998
|
+
async readResolved(id) {
|
|
10999
|
+
try {
|
|
11000
|
+
const record = await this.handle.getResolved(id);
|
|
11001
|
+
return record === null ? null : {
|
|
11002
|
+
id,
|
|
11003
|
+
body: record.data,
|
|
11004
|
+
secrets: "resolved"
|
|
11005
|
+
};
|
|
11006
|
+
} catch (err) {
|
|
11007
|
+
if (!(err instanceof RecordSecretUnavailableError)) throw err;
|
|
11008
|
+
const stored = await this.handle.get(id);
|
|
11009
|
+
if (stored === null) return null;
|
|
11010
|
+
return {
|
|
11011
|
+
id,
|
|
11012
|
+
body: Object.fromEntries(Object.entries(stored.data).filter(([key]) => !this.secretKeys.has(key))),
|
|
11013
|
+
secrets: "unavailable"
|
|
11014
|
+
};
|
|
11015
|
+
}
|
|
11016
|
+
}
|
|
11017
|
+
/** The body of {@link readResolved} alone; a locked keychain yields the row without secrets. */
|
|
11018
|
+
async getResolved(id) {
|
|
11019
|
+
return (await this.readResolved(id))?.body ?? null;
|
|
11020
|
+
}
|
|
11021
|
+
/** Every instance, secrets resolved where the keychain allows; an absent one is skipped. */
|
|
11022
|
+
async listResolved() {
|
|
11023
|
+
const page = await this.handle.query({ limit: INSTANCES_LIST_MAX });
|
|
11024
|
+
const out = [];
|
|
11025
|
+
for (const record of page.records) {
|
|
11026
|
+
const read = await this.readResolved(record.id);
|
|
11027
|
+
if (read !== null) out.push(read);
|
|
11028
|
+
}
|
|
11029
|
+
return out;
|
|
11030
|
+
}
|
|
11031
|
+
viewOf(record) {
|
|
11032
|
+
const shown = secretViewsOf(this.records.owner, this.kind.name, record.id, this.kind.declaration, record.data);
|
|
11033
|
+
const rawName = record.data[this.nameField];
|
|
11034
|
+
return {
|
|
11035
|
+
id: record.id,
|
|
11036
|
+
name: typeof rawName === "string" ? rawName : record.id,
|
|
11037
|
+
configured: this.hooks.configured(record.data),
|
|
11038
|
+
formValues: shown
|
|
11039
|
+
};
|
|
11040
|
+
}
|
|
11041
|
+
describe = async () => this.hooks.description;
|
|
11042
|
+
instanceFormSchema = async ({ id }) => this.hooks.formSchema(id);
|
|
11043
|
+
listInstances = async () => {
|
|
11044
|
+
return (await this.handle.query({ limit: INSTANCES_LIST_MAX })).records.map((record) => this.viewOf(record));
|
|
11045
|
+
};
|
|
11046
|
+
getInstance = async ({ id }) => {
|
|
11047
|
+
const record = await this.handle.get(id);
|
|
11048
|
+
return record === null ? null : this.viewOf(record);
|
|
11049
|
+
};
|
|
11050
|
+
/** Insert ONE row (`ifRev: 0`: an existing id is refused, never overwritten). */
|
|
11051
|
+
createInstance = async ({ id, name }) => {
|
|
11052
|
+
await this.handle.put({
|
|
11053
|
+
id,
|
|
11054
|
+
data: this.hooks.initialBody(name)
|
|
11055
|
+
}, { ifRev: 0 });
|
|
11056
|
+
await this.hooks.onChanged?.(id);
|
|
11057
|
+
return { id };
|
|
11058
|
+
};
|
|
11059
|
+
updateInstance = async ({ id, name, values }) => {
|
|
11060
|
+
const patch = {};
|
|
11061
|
+
for (const [key, value] of Object.entries(values)) {
|
|
11062
|
+
if (value === void 0) continue;
|
|
11063
|
+
if (!this.secretKeys.has(key)) patch[key] = value;
|
|
11064
|
+
else if (isSecretClear(value)) patch[key] = null;
|
|
11065
|
+
else if (typeof value === "string" && value !== "" && value !== "__camstack_redacted__" && !isSecretFieldView(value)) patch[key] = value;
|
|
11066
|
+
}
|
|
11067
|
+
if (name !== void 0) patch[this.nameField] = name;
|
|
11068
|
+
await this.handle.patch(id, patch);
|
|
11069
|
+
await this.hooks.onChanged?.(id);
|
|
11070
|
+
return { ok: true };
|
|
11071
|
+
};
|
|
11072
|
+
/** The row and its keychain refs go together (the records door). */
|
|
11073
|
+
deleteInstance = async ({ id }) => {
|
|
11074
|
+
await this.handle.delete(id);
|
|
11075
|
+
await this.hooks.onChanged?.(id);
|
|
11076
|
+
return { ok: true };
|
|
11077
|
+
};
|
|
11078
|
+
testInstance = async (input) => {
|
|
11079
|
+
if (this.hooks.test === void 0) return {
|
|
11080
|
+
success: false,
|
|
11081
|
+
status: "unsupported",
|
|
11082
|
+
error: "This integration declares no connection test"
|
|
11083
|
+
};
|
|
11084
|
+
return this.hooks.test(input);
|
|
11085
|
+
};
|
|
11086
|
+
/** The flat provider object to hand to `registerProvider`. */
|
|
11087
|
+
toProvider() {
|
|
11088
|
+
return {
|
|
11089
|
+
describe: this.describe,
|
|
11090
|
+
instanceFormSchema: this.instanceFormSchema,
|
|
11091
|
+
listInstances: this.listInstances,
|
|
11092
|
+
getInstance: this.getInstance,
|
|
11093
|
+
createInstance: this.createInstance,
|
|
11094
|
+
updateInstance: this.updateInstance,
|
|
11095
|
+
deleteInstance: this.deleteInstance,
|
|
11096
|
+
testInstance: this.testInstance
|
|
11097
|
+
};
|
|
11098
|
+
}
|
|
11099
|
+
};
|
|
10868
11100
|
/**
|
|
10869
11101
|
* Shared video / audio encode profile schemas used by every consumer
|
|
10870
11102
|
* that asks the stream broker to spawn a derived stream
|
|
@@ -19826,6 +20058,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
19826
20058
|
"load-contribution": system(INTERNAL),
|
|
19827
20059
|
"local-network": system(NETWORK),
|
|
19828
20060
|
"log-channels": system(INTERNAL),
|
|
20061
|
+
"integration-instances": system(INTERNAL),
|
|
19829
20062
|
"log-destination": system(INTERNAL),
|
|
19830
20063
|
"login-method": system(IDENTITY),
|
|
19831
20064
|
"mesh-network": system(NETWORK),
|
|
@@ -43737,7 +43970,7 @@ var TargetKindCapsSchema = z.object({
|
|
|
43737
43970
|
* the union is large and not meant for runtime validation here; the exported
|
|
43738
43971
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
43739
43972
|
*/
|
|
43740
|
-
var ConfigSchemaPassthrough$
|
|
43973
|
+
var ConfigSchemaPassthrough$4 = z.unknown();
|
|
43741
43974
|
var TargetKindSchema = z.object({
|
|
43742
43975
|
kind: z.string(),
|
|
43743
43976
|
label: z.string(),
|
|
@@ -43774,7 +44007,7 @@ var TargetKindSchema = z.object({
|
|
|
43774
44007
|
* its raster path, which is the safe default for an unknown image.
|
|
43775
44008
|
*/
|
|
43776
44009
|
iconMediaType: z.string().optional(),
|
|
43777
|
-
configSchema: ConfigSchemaPassthrough$
|
|
44010
|
+
configSchema: ConfigSchemaPassthrough$4,
|
|
43778
44011
|
/**
|
|
43779
44012
|
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
43780
44013
|
* base URL, instance, chat, recipient). A save that changes any of them
|
|
@@ -61362,9 +61595,15 @@ var AvailableIntegrationTypeSchema = z.object({
|
|
|
61362
61595
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
61363
61596
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
61364
61597
|
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
61365
|
-
* legacy config → discovery flow.
|
|
61598
|
+
* legacy config → discovery flow. `connection` is an addon that only holds a
|
|
61599
|
+
* connection as typed records (`integration-instances`, D985): no devices,
|
|
61600
|
+
* no discovery.
|
|
61366
61601
|
*/
|
|
61367
|
-
kind: z.enum([
|
|
61602
|
+
kind: z.enum([
|
|
61603
|
+
"device-adoption",
|
|
61604
|
+
"device-provider",
|
|
61605
|
+
"connection"
|
|
61606
|
+
]),
|
|
61368
61607
|
/**
|
|
61369
61608
|
* For `device-adoption` addons: the broker kind to create/link
|
|
61370
61609
|
* (e.g. `home-assistant`), declared in the addon manifest. `null` for
|
|
@@ -61495,6 +61734,87 @@ var integrationsCapability = {
|
|
|
61495
61734
|
mount: { kind: "server-provided" }
|
|
61496
61735
|
};
|
|
61497
61736
|
/**
|
|
61737
|
+
* `integration-instances` - the connection of an addon that holds ONE or SEVERAL
|
|
61738
|
+
* (an account, a relay, a destination) as typed records, shown on the
|
|
61739
|
+
* Integrations page like every other integration (D985, D986).
|
|
61740
|
+
*
|
|
61741
|
+
* A collection of providers: each addon that holds connections registers one
|
|
61742
|
+
* and the hub aggregator (`integrations.*`) reaches a provider with the pinned
|
|
61743
|
+
* `addonId`. It is internal and has no route: the operator-facing surface is
|
|
61744
|
+
* the `integrations` cap, which keeps ONE list.
|
|
61745
|
+
*
|
|
61746
|
+
* Identity: the instance id IS the `integrations` registry id (`int_NNNN`,
|
|
61747
|
+
* immutable, already in the `/integrations/<id>` URL). A second operator-chosen
|
|
61748
|
+
* slug would be a second authority over one identity (D224). `name` is the
|
|
61749
|
+
* editable label.
|
|
61750
|
+
*
|
|
61751
|
+
* Secrets: every field the instance kind marks `.meta({ secret: true })` reaches
|
|
61752
|
+
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
61753
|
+
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
61754
|
+
* clears it.
|
|
61755
|
+
*/
|
|
61756
|
+
var ConfigSchemaPassthrough$3 = z.custom();
|
|
61757
|
+
var IntegrationInstanceIdSchema = z.string().min(1);
|
|
61758
|
+
var IntegrationInstanceModeSchema = z.enum(["single", "multiple"]);
|
|
61759
|
+
var IntegrationInstanceDescriptionSchema = z.object({
|
|
61760
|
+
/** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
|
|
61761
|
+
instanceMode: IntegrationInstanceModeSchema,
|
|
61762
|
+
/** What the instance is, for the UI (`destination`, `relay`, `account`). */
|
|
61763
|
+
kind: z.string(),
|
|
61764
|
+
/** True when `testInstance` really probes the remote. */
|
|
61765
|
+
canTest: z.boolean()
|
|
61766
|
+
});
|
|
61767
|
+
var IntegrationInstanceStatusSchema = z.object({
|
|
61768
|
+
state: z.enum([
|
|
61769
|
+
"ok",
|
|
61770
|
+
"off",
|
|
61771
|
+
"error",
|
|
61772
|
+
"unknown"
|
|
61773
|
+
]),
|
|
61774
|
+
detail: z.string().optional()
|
|
61775
|
+
});
|
|
61776
|
+
var IntegrationInstanceSchema = z.object({
|
|
61777
|
+
id: IntegrationInstanceIdSchema,
|
|
61778
|
+
name: z.string(),
|
|
61779
|
+
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
61780
|
+
configured: z.boolean(),
|
|
61781
|
+
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
61782
|
+
formValues: z.record(z.string(), z.unknown()),
|
|
61783
|
+
status: IntegrationInstanceStatusSchema.optional()
|
|
61784
|
+
});
|
|
61785
|
+
var IntegrationInstancePatchSchema = z.object({
|
|
61786
|
+
id: IntegrationInstanceIdSchema,
|
|
61787
|
+
name: z.string().min(1).optional(),
|
|
61788
|
+
/** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
|
|
61789
|
+
values: z.record(z.string(), z.unknown())
|
|
61790
|
+
});
|
|
61791
|
+
var integrationInstancesCapability = {
|
|
61792
|
+
name: "integration-instances",
|
|
61793
|
+
scope: "system",
|
|
61794
|
+
mode: "collection",
|
|
61795
|
+
internal: true,
|
|
61796
|
+
methods: {
|
|
61797
|
+
describe: method(z.void(), IntegrationInstanceDescriptionSchema),
|
|
61798
|
+
/** The form; `id: null` is the create form. */
|
|
61799
|
+
instanceFormSchema: method(z.object({ id: IntegrationInstanceIdSchema.nullable() }), ConfigSchemaPassthrough$3),
|
|
61800
|
+
listInstances: method(z.void(), z.array(IntegrationInstanceSchema).readonly()),
|
|
61801
|
+
getInstance: method(z.object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable()),
|
|
61802
|
+
/** Insert the typed record for a registry row that already exists. */
|
|
61803
|
+
createInstance: method(z.object({
|
|
61804
|
+
id: IntegrationInstanceIdSchema,
|
|
61805
|
+
name: z.string().min(1)
|
|
61806
|
+
}), z.object({ id: z.string() }), { kind: "mutation" }),
|
|
61807
|
+
updateInstance: method(IntegrationInstancePatchSchema, z.object({ ok: z.literal(true) }), { kind: "mutation" }),
|
|
61808
|
+
/** Delete the record and its keychain refs together. */
|
|
61809
|
+
deleteInstance: method(z.object({ id: IntegrationInstanceIdSchema }), z.object({ ok: z.literal(true) }), { kind: "mutation" }),
|
|
61810
|
+
testInstance: optionalMethod(z.object({
|
|
61811
|
+
id: IntegrationInstanceIdSchema.nullable(),
|
|
61812
|
+
values: z.record(z.string(), z.unknown())
|
|
61813
|
+
}), TestConnectionResultSchema$1, { kind: "mutation" })
|
|
61814
|
+
},
|
|
61815
|
+
mount: { kind: "skip" }
|
|
61816
|
+
};
|
|
61817
|
+
/**
|
|
61498
61818
|
* Two-way audio / talk-back cap. Clients open a WebRTC audio-only
|
|
61499
61819
|
* session (server-initiated offer pattern, identical to the main
|
|
61500
61820
|
* video WebRTC flow) and the browser captures the mic; the server
|
|
@@ -90816,6 +91136,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
90816
91136
|
humiditySensorCapability,
|
|
90817
91137
|
imageCapability,
|
|
90818
91138
|
imageSettingsCapability,
|
|
91139
|
+
integrationInstancesCapability,
|
|
90819
91140
|
integrationsCapability,
|
|
90820
91141
|
intercomCapability,
|
|
90821
91142
|
irTransmitterCapability,
|
|
@@ -97219,6 +97540,62 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
97219
97540
|
access: "create",
|
|
97220
97541
|
role: "admin"
|
|
97221
97542
|
},
|
|
97543
|
+
"integrationInstances.createInstance": {
|
|
97544
|
+
capName: "integration-instances",
|
|
97545
|
+
capScope: "system",
|
|
97546
|
+
addonId: null,
|
|
97547
|
+
access: "create",
|
|
97548
|
+
role: "admin"
|
|
97549
|
+
},
|
|
97550
|
+
"integrationInstances.deleteInstance": {
|
|
97551
|
+
capName: "integration-instances",
|
|
97552
|
+
capScope: "system",
|
|
97553
|
+
addonId: null,
|
|
97554
|
+
access: "delete",
|
|
97555
|
+
role: "admin"
|
|
97556
|
+
},
|
|
97557
|
+
"integrationInstances.describe": {
|
|
97558
|
+
capName: "integration-instances",
|
|
97559
|
+
capScope: "system",
|
|
97560
|
+
addonId: null,
|
|
97561
|
+
access: "view",
|
|
97562
|
+
role: "admin"
|
|
97563
|
+
},
|
|
97564
|
+
"integrationInstances.getInstance": {
|
|
97565
|
+
capName: "integration-instances",
|
|
97566
|
+
capScope: "system",
|
|
97567
|
+
addonId: null,
|
|
97568
|
+
access: "view",
|
|
97569
|
+
role: "admin"
|
|
97570
|
+
},
|
|
97571
|
+
"integrationInstances.instanceFormSchema": {
|
|
97572
|
+
capName: "integration-instances",
|
|
97573
|
+
capScope: "system",
|
|
97574
|
+
addonId: null,
|
|
97575
|
+
access: "view",
|
|
97576
|
+
role: "admin"
|
|
97577
|
+
},
|
|
97578
|
+
"integrationInstances.listInstances": {
|
|
97579
|
+
capName: "integration-instances",
|
|
97580
|
+
capScope: "system",
|
|
97581
|
+
addonId: null,
|
|
97582
|
+
access: "view",
|
|
97583
|
+
role: "admin"
|
|
97584
|
+
},
|
|
97585
|
+
"integrationInstances.testInstance": {
|
|
97586
|
+
capName: "integration-instances",
|
|
97587
|
+
capScope: "system",
|
|
97588
|
+
addonId: null,
|
|
97589
|
+
access: "create",
|
|
97590
|
+
role: "admin"
|
|
97591
|
+
},
|
|
97592
|
+
"integrationInstances.updateInstance": {
|
|
97593
|
+
capName: "integration-instances",
|
|
97594
|
+
capScope: "system",
|
|
97595
|
+
addonId: null,
|
|
97596
|
+
access: "create",
|
|
97597
|
+
role: "admin"
|
|
97598
|
+
},
|
|
97222
97599
|
"integrations.create": {
|
|
97223
97600
|
capName: "integrations",
|
|
97224
97601
|
capScope: "system",
|
|
@@ -109380,4 +109757,4 @@ z.object({
|
|
|
109380
109757
|
commands: z.record(z.string(), z.unknown())
|
|
109381
109758
|
});
|
|
109382
109759
|
//#endregion
|
|
109383
|
-
export { EMPTY_REMOTE_CONFIG as $, helperMembers as $a, scoreRuntimes as $i, deviceExtensionCapability as $n, collectSecretMarkerRefs as $o, mayReadLocation as $r, UserRecordSchema as $t, CredentialTokenClaimsSchema as A, vocabActionIdFor as Aa, recordEntriesCapability as Ai, collectWhenMirrorSources as An, REMOVE_LEAF as Ao, isAppLinkBase as Ar, parseSecretRef as As, PreferenceValueSchema as At, DEVICE_ID_FIELD as B, MINUTE_MS as Ba, resolveCoreBlockFiles as Bi, coverCapability as Bn, StoredRecordKindDeclarationSchema as Bo, keychainAdminCapability as Br, toSecretFieldView as Bs, SchedulerError as Bt, CORE_BLOCK_ADDON_PREFIX as C, validateComposition as Ca, platformProbeCapability as Ci, cameraGridLayoutCapability as Cn, PlaintextSecretError as Co, gbToBytes as Cr, mapSecretLeaves as Cs, MediaPlayerStatusSchema as Ct, ConditionMirror as D, vectorDimFromBase64 as Da, problemsBlockSave as Di, checkRoleAddress as Dn, RECORD_SECRET_COLLECTION_PREFIX as Do, interpolate as Dr, normalizeSecretOwner as Ds, PREFERENCES_MAX_VALUE_BYTES as Dt, CatalogFileSchema as E, valveCapability as Ea, preconditionOf as Ei, catalogueIssues as En, RECORD_DELETE_BATCH as Eo, internalActionId as Er, normalizeNodeId as Es, NetworkTunnelStartedDataSchema as Et, DAY_NAMES as F, DAY_MS as Fa, replacedFieldKeys as Fi, coreBlockAddonId as Fn, RecordNotFoundError as Fo, isInternalActionId as Fr, scopeKey as Fs, RemoteAssumedStateSchema as Ft, DataStoreDatabaseSchema as G, compositionFeatureEnabled as Ga, resolveNotificationTapAddress as Gi, databaseSnapshotCapability as Gn, asJsonObject as Go, localDateOf as Gr, DeviceRole as Gs, StorageCleanupJobSchema as Gt, DEVICE_SAN_CREDENTIAL_PREFIX as H, cloneStatefulExpressionMemory as Ha, resolveLocationMode as Hi, customKeyOfRole as Hn, UnindexedFilterError as Ho, legacyAutoLinkIds as Hr, userError as Hs, ScopedTokenSchema as Ht, DEFAULT_HOLD_OVERRIDE as I, DEFAULT_HISTORY_RETENTION as Ia, resolveActionVariables as Ii, coreBlockComposition as In, RecordTooLargeError as Io, isLocationEnabled as Ir, secretTreeFromPaths as Is, RemoteConfigSchema as It, DeviceStatusSchema as J, compositionSourceKey as Ja, runSteps as Ji, decodeVectorBase64 as Jn, assertTransactScope as Jo, lockControlCapability as Jr, EventCategory as Js, StorageMigrationJobSchema as Jt, DeclaredDevices as K, compositionItemFieldPath as Ka, resolveStepArgs as Ki, declarationOwnerNodeId as Kn, asNumber as Ko, localNetworkCapability as Kr, DeviceType as Ks, StorageLocationModeSchema as Kt, DERIVED_CAMERA_SILENCED_CAP_NAMES as L, HISTORY_FAST_MS as La, resolveAppConnections as Li, coreBlockIdFromAddonId as Ln, RecordUniqueViolationError as Lo, isObjectInput as Lr, secretTreeFromSchema as Ls, RunningStateStatusSchema as Lt, DATABASE_SNAPSHOT_SUFFIX as M, withLocationMode as Ma, reducePoints as Mi, composerCapability as Mn, ReadinessRegistry as Mo, isCollectionArrayMethod as Mr, recordSecretRef as Ms, RECORDING_SOURCE_CAMSTACK_ADDON as Mt, DATABASE_SNAPSHOT_TIMEOUT_MS as N, zoneOnlySite as Na, remoteCapability as Ni, compositionFieldKey as Nn, ReadinessTimeoutError as No, isCredentialTokenPayload as Nr, resolveCapMount as Ns, ROOT_BUCKET_KEY as Nt, ControlStatusSchema as O, vectorIndexDimConflictError as Oa, procedureAuthKey as Oi, checkTemplatePayload as On, RECORD_SWEEP_INTERVAL_MS as Oo, isAlertEpisodeOpen as Or, parseJsonObject as Os, PreferenceDeviceIdSchema as Ot, DATA_STORE_DATABASES as P, COMPOSER_ADDON_ID as Pa, remoteLayoutComponentsCapability as Pi, compositionSourceRefs as Pn, RecordKindDeclarationSchema as Po, isDefaultAppConnectionEndpoint as Pr, resolveSecretMarkers as Ps, RecordingStatusSchema as Pt, EMPTY_REMOTE_ASSUMED_STATE as Q, evaluateStatistic as Qa, scopesAllowDeviceCap as Qi, deviceCredentialsCapability as Qn, collectSecretLeaves as Qo, looseSchema as Qr, UNATTRIBUTED_BUCKET_KEY as Qt, DEVICE_ENROLLMENT_TTL_MS as R, HISTORY_SLOW_MS as Ra, resolveBucketMs as Ri, coreBlockSourceKind as Rn, RevConflictError as Ro, isVoidInput as Rr, sleep as Rs, STORAGE_ACCESS_FALLBACK as Rt, CORE_BLOCKS_ADDON_ID as S, userManagementCapability as Sa, planComposition as Si, calendarsCapability as Sn, NoCallerError as So, formatMinutes as Sr, makeSecretMarker as Ss, MOTION_CLOSE_AFTER_MS as St, CalendarPreferencesSchema as T, validateSchedulerInput as Ta, powerSourceLinkOfComposition as Ti, capUnitResolver as Tn, RECORD_BATCH_MAX_BYTES as To, groupTemplate as Tr, nodePin as Ts, MigrationMetaSchema as Tt, DEVICE_SAN_USER_PREFIX as U, composedDeviceRef as Ua, resolveMethodAuth as Ui, customRole as Un, UnknownRecordKindError as Uo, legacyModeOf as Ur, withoutCallerStamp as Us, ServerNameSchema as Ut, DEVICE_NONCE_TTL_MS as V, buildFfmpegArgs as Va, resolveHubAddressRoles as Vi, createDeviceExtensionProvider as Vn, TransactRefusedError as Vo, keychainCapability as Vr, transformSecretWrite as Vs, SchedulerSchema as Vt, DEVICE_TOMBSTONE_RETENTION_MS as W, composedDeviceStableId as Wa, resolveMutate as Wi, dataStoreProviderCapability as Wn, WELL_KNOWN_TAB_MAP as Wo, lifecycleJobSchema as Wr, DeviceFeature as Ws, SsoBridgeClaimsSchema as Wt, DiscoveryProposalBodySchema as X, disarmRoseMemory as Xa, schedulersCapability as Xi, deriveBatteryPresence as Xn, buildSecretRef as Xo, logDestinationCapability as Xr, TemplateKindSchema as Xt, DeviceTombstoneSchema as Y, createStatefulExpressionMemory as Ya, runtimeStatePolicyFor as Yi, defineExtensionSlotProvider as Yn, assertValidDeclaration as Yo, lockDoorLinkOfComposition as Yr, SwitchStatusSchema as Yt, EMPTY_AUTOMATION_STATE as Z, evaluateDerivative as Za, scopesAllowAddon as Zi, describeComposableCaps as Zn, collectSecretConfigKeys as Zo, logLevelAtMost as Zr, TokenScopeSchema as Zt, CAMSTACK_APP_LINK_ORIGIN as _, switchCapability as _a, orderMigrations as _i, buildActionSteps as _n, DeclarationRefusedError as _o, fanPresetsCapability as _r, isReadingQuantity as _s, KeychainResetRecordSchema as _t, AGENT_MDNS_TXT_KEYS as a, siteFor as aa, migrationsCapability as ai, addonSettingsCapability as an, openStatistic as ao, deviceStatusCapability as ar, emitDownForOwnedCaps as as, FieldClaimModeSchema as at, COMPOSED_ITEM_FIXED_FIELDS as b, timedRunLimitOf as ba, parseStreamParamsFormPatch as bi, buildDeviceSignatureMessage as bn, HISTORY_DEFAULT_MIN_INTERVAL_MS as bo, foldSnapshotByFunction as br, isSecretMarkerLike as bs, METHOD_ACCESS_MAP as bt, ActionStepSchema as c, splitTranslationRef as ca, nextOccurrence as ci, alertEpisodePayload as cn, statisticCadenceMs as co, enumerateSchemaFields as cr, formatSecretScope as cs, HISTORY_CATALOG as ct, AlertSchema as d, storageMigrationCapability as da, normalizeCoreBlockWrite as di, armRemovalReconcile as dn, BaseAddon as do, evictionPolicyOfLocation as dr, historyUnitFor as ds, HUB_MDNS_TXT_KEYS as dt, settingsStoreCapability as ea, mayWriteToLocation as ei, actionEffect as en, integrateReading as eo, deviceHistoryCapability as er, collectZodSecretPaths as es, FAN_CAPTURE_FIELDS as et, AutomationStateDocSchema as f, storageOccupancyCapability as fa, normalizeStepTargets as fi, authProviderCapability as fn, BatchTooLargeError as fo, expandContainer as fr, hydrateSchema as fs, HvacModeSchema as ft, CAMERA_SWITCH_ORDER as g, supportedRuntimes as ga, occurrenceOn as gi, brightnessCapability as gn, DEVICE_STATUS_METHOD as go, fanOutTargets as gr, isKeychainStoredField as gs, KeychainAuditEntrySchema as gt, BatteryStatusSchema as h, streamQualityLabel as ha, objectInputDeclaresRequiredDeviceId as hi, batteryCapability as hn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as ho, fanControlCapability as hr, isEvent as hs, KEYCHAIN_RESET_TRIGGER_ACTOR as ht, AGENT_MDNS_SERVICE_TYPE as i, shortHostname as ia, metricsProviderCapability as ii, addonPagesCapability as in, openReset as io, deviceStateCapability as ir, defineRecordKinds as is, FanPresetSchema as it, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as j, weekdayOfLocalDate as ja, recordsCapability as ji, colorCapability as jn, RUNTIME_DEFAULTS as jo, isArrayOutputSchema as jr, readinessKey as js, QuantityUnitError as jt, CoreBlockSchema as k, vectorStoreCapability as ka, ptzAutotrackCapability as ki, climateControlCapability as kn, REDACTED_SECRET as ko, isAlertEpisodeSeverity as kr, parseJsonUnknown as ks, PreferenceNamespaceSchema as kt, ActionTargetResolver as l, storageAdminCapability as la, normalizeActionUnits as li, alertsCapability as ln, toExpressionValue as lo, evaluateCompositionField as lr, getDebugInterest as ls, HISTORY_ITEM_CATALOG as lt, BaseDevice as m, streamCatalogCapability as ma, objectInputDeclaresAddonId as mi, bareAddonId as mn, DATAPLANE_SECRET_HEADER as mo, extractNestedAddonId as mr, isDeviceConfigCap as ms, INTERNAL_ACTION_PREFIX as mt, ACTUATOR_METHODS as n, sharedActuatorMethods as na, memoizePinnedFfmpeg as ni, actionsCapability as nn, isHistoryHelper as no, deviceRemovalHookCapability as nr, customAction as ns, FanControlStatusSchema as nt, ALL_CAPABILITY_DEFINITIONS as o, siteZoneKey as oa, modeMayWrite as oi, addonWidgetsCapability as on, planResetTier as oo, enumerateInferenceDevices as or, emitReadiness as os, FieldClaimSchema as ot, BUILTIN_REMOTE_COMPONENTS as p, storageProviderCapability as pa, normalizeUnit as pi, backupCapability as pn, CALLER_STAMPED_CAPABILITIES as po, expressionContainsBuiltinCall as pr, isDebugChannelName as ps, IDLE_ACTION_STATUS as pt, DeviceRunSchema as q, compositionSliceKey as qa, runFanOut as qi, declaredSeriesKind as qn, asString$1 as qo, locationIconKey as qr, errMsg as qs, StorageLocationTypeSchema as qt, ACTUATOR_TEMPLATE_IDS as r, sharedColorModes as ra, methodRefusal as ri, addonIdOfActionId as rn, nextLocalMidnight as ro, deviceRunsCapability as rr, defineCustomActions as rs, FanDirectionSchema as rt, ActionError as s, snapshotCapability as sa, motionCapability as si, alertEpisodeId as sn, planStatisticTier as so, enumerateItemArrayFields as sr, expandCapMethods as ss, GroupCommandResultSchema as st, ACTION_TARGET_INVALIDATION_EVENTS as t, sharedActuatorFeatures as ta, mediaPlayerCapability as ti, actionSourceCapability as tn, isForwardInputRef as to, deviceManagerCapability as tr, createEvent as ts, FIRST_LEVEL_MACRO_CLASSES as tt, ActionVariableSchema as u, storageCapability as ua, normalizeCapStep as ui, appendTrace as un, wattMillisecondsToKwh as uo, evaluateWhenTree as ur, historyItemFieldPath as us, HUB_MDNS_SERVICE_TYPE as ut, CAP_NAMES_WITH_STATUS as v, templateCapability as va, parseAcceleratorFactsJson as vi, buildCapabilityLookup as vn, FilterRequiredError as vo, featureForwards as vr, isSecretClear as vs, LOG_LEVEL_RANK as vt, CREDENTIAL_TOKEN_AUDIENCE as w, validateCustomAddress as wa, powerSourceCapability as wi, canonicalIconKey as wn, RECORD_BATCH_MAX as wo, groupCommandsCapability as wr, nodeIdOfScopedKey as ws, MigrationLedgerEntrySchema as wt, COMPOSER_RUNNER_ID as x, timedRunSeconds as xa, pickAppLinkHub as xi, buildStreamParamsConfigSchema as xn, InvalidRecordError as xo, formatDeviceRevoker as xr, isSecretRefOwnedBy as xs, MINUTES_PER_DAY as xt, CATALOG_LANGS as y, timedRunCapability as ya, parseColorInput as yi, buildDeviceEnrollmentLink as yn, ForeignSecretMarkerError as yo, filesystemBrowseCapability as yr, isSecretMarker as ys, LegacyStorageLocationDefaultSchema as yt, DEVICE_HISTORY_ENERGY_KEY as z, HOUR_MS as za, resolveCoreBlockEntry as zi, coreBlocksCapability as zn, SECRET_CLEAR as zo, kebabToCamel as zr, toNodeId as zs, STREAM_PROFILE_META as zt };
|
|
109760
|
+
export { EMPTY_REMOTE_CONFIG as $, evaluateDerivative as $a, scopesAllowAddon as $i, deviceCredentialsCapability as $n, collectSecretConfigKeys as $o, logLevelAtMost as $r, errMsg as $s, UNATTRIBUTED_BUCKET_KEY as $t, CredentialTokenClaimsSchema as A, vectorIndexDimConflictError as Aa, procedureAuthKey as Ai, climateControlCapability as An, RECORD_SWEEP_INTERVAL_MS as Ao, isAlertEpisodeOpen as Ar, nodePin as As, PreferenceValueSchema as At, DEVICE_ID_FIELD as B, HISTORY_SLOW_MS as Ba, resolveBucketMs as Bi, coreBlocksCapability as Bn, RevConflictError as Bo, isVoidInput as Br, scopeKey as Bs, STREAM_PROFILE_META as Bt, CORE_BLOCK_ADDON_PREFIX as C, timedRunSeconds as Ca, pickAppLinkHub as Ci, calendarsCapability as Cn, InvalidRecordError as Co, formatMinutes as Cr, isSecretFieldView as Cs, MediaPlayerStatusSchema as Ct, ConditionMirror as D, validateSchedulerInput as Da, powerSourceLinkOfComposition as Di, catalogueIssues as Dn, RECORD_BATCH_MAX_BYTES as Do, integrationInstancesCapability as Dr, makeSecretMarker as Ds, PREFERENCES_MAX_VALUE_BYTES as Dt, CatalogFileSchema as E, validateCustomAddress as Ea, powerSourceCapability as Ei, capUnitResolver as En, RECORD_BATCH_MAX as Eo, groupTemplate as Er, isSecretRefOwnedBy as Es, NetworkTunnelStartedDataSchema as Et, DAY_NAMES as F, zoneOnlySite as Fa, remoteCapability as Fi, compositionSourceRefs as Fn, ReadinessTimeoutError as Fo, isCredentialTokenPayload as Fr, parseSecretRef as Fs, RecordingStatusSchema as Ft, DataStoreDatabaseSchema as G, composedDeviceRef as Ga, resolveMethodAuth as Gi, dataStoreProviderCapability as Gn, UnknownRecordKindError as Go, legacyModeOf as Gr, toNodeId as Gs, SsoBridgeClaimsSchema as Gt, DEVICE_SAN_CREDENTIAL_PREFIX as H, MINUTE_MS as Ha, resolveCoreBlockFiles as Hi, createDeviceExtensionProvider as Hn, StoredRecordKindDeclarationSchema as Ho, keychainAdminCapability as Hr, secretTreeFromSchema as Hs, SchedulerSchema as Ht, DEFAULT_HOLD_OVERRIDE as I, COMPOSER_ADDON_ID as Ia, remoteLayoutComponentsCapability as Ii, coreBlockAddonId as In, RecordKindDeclarationSchema as Io, isDefaultAppConnectionEndpoint as Ir, readinessKey as Is, RemoteAssumedStateSchema as It, DeviceStatusSchema as J, compositionItemFieldPath as Ja, resolveStepArgs as Ji, declaredSeriesKind as Jn, asNumber as Jo, localNetworkCapability as Jr, userError as Js, StorageLocationTypeSchema as Jt, DeclaredDevices as K, composedDeviceStableId as Ka, resolveMutate as Ki, databaseSnapshotCapability as Kn, WELL_KNOWN_TAB_MAP as Ko, lifecycleJobSchema as Kr, toSecretFieldView as Ks, StorageCleanupJobSchema as Kt, DERIVED_CAMERA_SILENCED_CAP_NAMES as L, DAY_MS as La, replacedFieldKeys as Li, coreBlockComposition as Ln, RecordNotFoundError as Lo, isInternalActionId as Lr, recordSecretRef as Ls, RemoteConfigSchema as Lt, DATABASE_SNAPSHOT_SUFFIX as M, vocabActionIdFor as Ma, recordEntriesCapability as Mi, colorCapability as Mn, REMOVE_LEAF as Mo, isAppLinkBase as Mr, normalizeSecretOwner as Ms, RECORDING_SOURCE_CAMSTACK_ADDON as Mt, DATABASE_SNAPSHOT_TIMEOUT_MS as N, weekdayOfLocalDate as Na, recordsCapability as Ni, composerCapability as Nn, RUNTIME_DEFAULTS as No, isArrayOutputSchema as Nr, parseJsonObject as Ns, ROOT_BUCKET_KEY as Nt, ControlStatusSchema as O, valveCapability as Oa, preconditionOf as Oi, checkRoleAddress as On, RECORD_DELETE_BATCH as Oo, internalActionId as Or, mapSecretLeaves as Os, PreferenceDeviceIdSchema as Ot, DATA_STORE_DATABASES as P, withLocationMode as Pa, reducePoints as Pi, compositionFieldKey as Pn, ReadinessRegistry as Po, isCollectionArrayMethod as Pr, parseJsonUnknown as Ps, RecordIntegrationInstances as Pt, EMPTY_REMOTE_ASSUMED_STATE as Q, disarmRoseMemory as Qa, schedulersCapability as Qi, describeComposableCaps as Qn, buildSecretRef as Qo, logDestinationCapability as Qr, DeviceType as Qs, TokenScopeSchema as Qt, DEVICE_ENROLLMENT_TTL_MS as R, DEFAULT_HISTORY_RETENTION as Ra, resolveActionVariables as Ri, coreBlockIdFromAddonId as Rn, RecordTooLargeError as Ro, isLocationEnabled as Rr, resolveCapMount as Rs, RunningStateStatusSchema as Rt, CORE_BLOCKS_ADDON_ID as S, timedRunLimitOf as Sa, parseStreamParamsFormPatch as Si, buildStreamParamsConfigSchema as Sn, HISTORY_DEFAULT_MIN_INTERVAL_MS as So, formatDeviceRevoker as Sr, isSecretClear as Ss, MOTION_CLOSE_AFTER_MS as St, CalendarPreferencesSchema as T, validateComposition as Ta, platformProbeCapability as Ti, canonicalIconKey as Tn, PlaintextSecretError as To, groupCommandsCapability as Tr, isSecretMarkerLike as Ts, MigrationMetaSchema as Tt, DEVICE_SAN_USER_PREFIX as U, buildFfmpegArgs as Ua, resolveHubAddressRoles as Ui, customKeyOfRole as Un, TransactRefusedError as Uo, keychainCapability as Ur, secretViewsOf as Us, ScopedTokenSchema as Ut, DEVICE_NONCE_TTL_MS as V, HOUR_MS as Va, resolveCoreBlockEntry as Vi, coverCapability as Vn, SECRET_CLEAR as Vo, kebabToCamel as Vr, secretTreeFromPaths as Vs, SchedulerError as Vt, DEVICE_TOMBSTONE_RETENTION_MS as W, cloneStatefulExpressionMemory as Wa, resolveLocationMode as Wi, customRole as Wn, UnindexedFilterError as Wo, legacyAutoLinkIds as Wr, sleep as Ws, ServerNameSchema as Wt, DiscoveryProposalBodySchema as X, compositionSourceKey as Xa, runSteps as Xi, defineExtensionSlotProvider as Xn, assertTransactScope as Xo, lockControlCapability as Xr, DeviceFeature as Xs, SwitchStatusSchema as Xt, DeviceTombstoneSchema as Y, compositionSliceKey as Ya, runFanOut as Yi, decodeVectorBase64 as Yn, asString$1 as Yo, locationIconKey as Yr, withoutCallerStamp as Ys, StorageMigrationJobSchema as Yt, EMPTY_AUTOMATION_STATE as Z, createStatefulExpressionMemory as Za, runtimeStatePolicyFor as Zi, deriveBatteryPresence as Zn, assertValidDeclaration as Zo, lockDoorLinkOfComposition as Zr, DeviceRole as Zs, TemplateKindSchema as Zt, CAMSTACK_APP_LINK_ORIGIN as _, streamQualityLabel as _a, objectInputDeclaresRequiredDeviceId as _i, brightnessCapability as _n, DEVICE_SETTINGS_CONTRIBUTION_METHODS as _o, fanOutTargets as _r, isDebugChannelName as _s, KeychainResetRecordSchema as _t, AGENT_MDNS_TXT_KEYS as a, sharedColorModes as aa, methodRefusal as ai, addonPagesCapability as an, nextLocalMidnight as ao, deviceStateCapability as ar, defineAddonMigrations as as, FieldClaimModeSchema as at, COMPOSED_ITEM_FIXED_FIELDS as b, templateCapability as ba, parseAcceleratorFactsJson as bi, buildDeviceEnrollmentLink as bn, FilterRequiredError as bo, filesystemBrowseCapability as br, isKeychainStoredField as bs, METHOD_ACCESS_MAP as bt, ActionStepSchema as c, siteZoneKey as ca, modeMayWrite as ci, alertEpisodeId as cn, planResetTier as co, enumerateItemArrayFields as cr, defineRecordKinds as cs, HISTORY_CATALOG as ct, AlertSchema as d, storageAdminCapability as da, normalizeActionUnits as di, appendTrace as dn, toExpressionValue as do, evaluateWhenTree as dr, expandCapMethods as ds, HUB_MDNS_TXT_KEYS as dt, scopesAllowDeviceCap as ea, EventCategory as ec, looseSchema as ei, UserRecordSchema as en, evaluateStatistic as eo, deviceExtensionCapability as er, collectSecretLeaves as es, FAN_CAPTURE_FIELDS as et, AutomationStateDocSchema as f, storageCapability as fa, normalizeCapStep as fi, armRemovalReconcile as fn, wattMillisecondsToKwh as fo, evictionPolicyOfLocation as fr, formatSecretScope as fs, HvacModeSchema as ft, CAMERA_SWITCH_ORDER as g, streamCatalogCapability as ga, objectInputDeclaresAddonId as gi, batteryCapability as gn, DATAPLANE_SECRET_HEADER as go, fanControlCapability as gr, hydrateSchema as gs, KeychainAuditEntrySchema as gt, BatteryStatusSchema as h, storageProviderCapability as ha, normalizeUnit as hi, bareAddonId as hn, CALLER_STAMPED_CAPABILITIES as ho, extractNestedAddonId as hr, historyUnitFor as hs, KEYCHAIN_RESET_TRIGGER_ACTOR as ht, AGENT_MDNS_SERVICE_TYPE as i, sharedActuatorMethods as ia, memoizePinnedFfmpeg as ii, addonIdOfActionId as in, isHistoryHelper as io, deviceRunsCapability as ir, customAction as is, FanPresetSchema as it, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as j, vectorStoreCapability as ja, ptzAutotrackCapability as ji, collectWhenMirrorSources as jn, REDACTED_SECRET as jo, isAlertEpisodeSeverity as jr, normalizeNodeId as js, QuantityUnitError as jt, CoreBlockSchema as k, vectorDimFromBase64 as ka, problemsBlockSave as ki, checkTemplatePayload as kn, RECORD_SECRET_COLLECTION_PREFIX as ko, interpolate as kr, nodeIdOfScopedKey as ks, PreferenceNamespaceSchema as kt, ActionTargetResolver as l, snapshotCapability as la, motionCapability as li, alertEpisodePayload as ln, planStatisticTier as lo, enumerateSchemaFields as lr, emitDownForOwnedCaps as ls, HISTORY_ITEM_CATALOG as lt, BaseDevice as m, storageOccupancyCapability as ma, normalizeStepTargets as mi, backupCapability as mn, BatchTooLargeError as mo, expressionContainsBuiltinCall as mr, historyItemFieldPath as ms, INTERNAL_ACTION_PREFIX as mt, ACTUATOR_METHODS as n, settingsStoreCapability as na, mayWriteToLocation as ni, actionSourceCapability as nn, integrateReading as no, deviceManagerCapability as nr, collectZodSecretPaths as ns, FanControlStatusSchema as nt, ALL_CAPABILITY_DEFINITIONS as o, shortHostname as oa, metricsProviderCapability as oi, addonSettingsCapability as on, openReset as oo, deviceStatusCapability as or, defineCustomActions as os, FieldClaimSchema as ot, BUILTIN_REMOTE_COMPONENTS as p, storageMigrationCapability as pa, normalizeCoreBlockWrite as pi, authProviderCapability as pn, BaseAddon as po, expandContainer as pr, getDebugInterest as ps, IDLE_ACTION_STATUS as pt, DeviceRunSchema as q, compositionFeatureEnabled as qa, resolveNotificationTapAddress as qi, declarationOwnerNodeId as qn, asJsonObject as qo, localDateOf as qr, transformSecretWrite as qs, StorageLocationModeSchema as qt, ACTUATOR_TEMPLATE_IDS as r, sharedActuatorFeatures as ra, mediaPlayerCapability as ri, actionsCapability as rn, isForwardInputRef as ro, deviceRemovalHookCapability as rr, createEvent as rs, FanDirectionSchema as rt, ActionError as s, siteFor as sa, migrationsCapability as si, addonWidgetsCapability as sn, openStatistic as so, enumerateInferenceDevices as sr, defineEntryKind as ss, GroupCommandResultSchema as st, ACTION_TARGET_INVALIDATION_EVENTS as t, scoreRuntimes as ta, mayReadLocation as ti, actionEffect as tn, helperMembers as to, deviceHistoryCapability as tr, collectSecretMarkerRefs as ts, FIRST_LEVEL_MACRO_CLASSES as tt, ActionVariableSchema as u, splitTranslationRef as ua, nextOccurrence as ui, alertsCapability as un, statisticCadenceMs as uo, evaluateCompositionField as ur, emitReadiness as us, HUB_MDNS_SERVICE_TYPE as ut, CAP_NAMES_WITH_STATUS as v, supportedRuntimes as va, occurrenceOn as vi, buildActionSteps as vn, DEVICE_STATUS_METHOD as vo, fanPresetsCapability as vr, isDeviceConfigCap as vs, LOG_LEVEL_RANK as vt, CREDENTIAL_TOKEN_AUDIENCE as w, userManagementCapability as wa, planComposition as wi, cameraGridLayoutCapability as wn, NoCallerError as wo, gbToBytes as wr, isSecretMarker as ws, MigrationLedgerEntrySchema as wt, COMPOSER_RUNNER_ID as x, timedRunCapability as xa, parseColorInput as xi, buildDeviceSignatureMessage as xn, ForeignSecretMarkerError as xo, foldSnapshotByFunction as xr, isReadingQuantity as xs, MINUTES_PER_DAY as xt, CATALOG_LANGS as y, switchCapability as ya, orderMigrations as yi, buildCapabilityLookup as yn, DeclarationRefusedError as yo, featureForwards as yr, isEvent as ys, LegacyStorageLocationDefaultSchema as yt, DEVICE_HISTORY_ENERGY_KEY as z, HISTORY_FAST_MS as za, resolveAppConnections as zi, coreBlockSourceKind as zn, RecordUniqueViolationError as zo, isObjectInput as zr, resolveSecretMarkers as zs, STORAGE_ACCESS_FALLBACK as zt };
|