@camstack/types 1.2.539 → 1.2.541
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 +29 -0
- package/dist/addon.js +44 -12
- package/dist/addon.mjs +44 -12
- package/dist/capabilities/capability-definition.d.ts +4 -0
- package/dist/capabilities/climate-control.cap.d.ts +18 -6
- package/dist/capabilities/cluster-update.cap.d.ts +376 -0
- package/dist/capabilities/cover.cap.d.ts +9 -3
- package/dist/capabilities/device-manager.cap.d.ts +117 -0
- package/dist/capabilities/device-search.d.ts +168 -0
- package/dist/capabilities/fan-control.cap.d.ts +12 -4
- package/dist/capabilities/hero-layout.cap.d.ts +4 -0
- package/dist/capabilities/hub-address.d.ts +10 -0
- package/dist/capabilities/index.d.ts +8 -5
- package/dist/capabilities/lock-control.cap.d.ts +3 -1
- package/dist/capabilities/media-player.cap.d.ts +48 -16
- package/dist/capabilities/notification-output.cap.d.ts +40 -0
- package/dist/capabilities/notification-rules.cap.d.ts +366 -0
- package/dist/capabilities/osd-manager.cap.d.ts +40 -277
- package/dist/capabilities/valve.cap.d.ts +3 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.js +94 -8
- package/dist/client.mjs +94 -9
- package/dist/{composed-stable-id-C3J6LxC9.js → composed-stable-id-BtaMj_W7.js} +4 -0
- package/dist/{composed-stable-id-DLcPInGv.mjs → composed-stable-id-jnvhwGoH.mjs} +4 -0
- package/dist/device/container-primary-child.d.ts +39 -4
- package/dist/device/device-binding.d.ts +6 -0
- package/dist/device/device-feature-requirements.d.ts +137 -0
- package/dist/device/device-management.d.ts +9 -0
- package/dist/device/device-type.d.ts +5 -1
- package/dist/device/hero/hero-model.d.ts +14 -0
- package/dist/device/implemented-methods.d.ts +6 -0
- package/dist/device/linked-device-resolve.d.ts +2 -0
- package/dist/expression/device-template.d.ts +31 -1
- package/dist/generated/addon-api.d.ts +50 -7
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +3 -1
- package/dist/{composition-BcVAbtBc.js → implemented-methods-C_iV6BiP.js} +17 -1
- package/dist/{composition-BFJq1Y88.mjs → implemented-methods-OitwyO1Y.mjs} +12 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1231 -444
- package/dist/index.mjs +944 -203
- package/dist/interfaces/addon.d.ts +7 -0
- package/dist/interfaces/event-bus.d.ts +2 -0
- package/dist/migrations/api/migration-api.v1.d.ts +11 -0
- package/dist/migrations/api/migration-api.v1.schema.d.ts +25 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +26 -25
- package/dist/node.mjs +3 -3
- package/dist/notification/degrade-engine.d.ts +7 -1
- package/dist/notification/notification-fields.d.ts +69 -0
- package/dist/notification/timelapse-rule.d.ts +69 -0
- package/dist/{sleep-VrfKAAGN.mjs → sleep-Cw1uUXvl.mjs} +5 -2
- package/dist/{sleep-DgCXXFc3.js → sleep-PfAAmxV-.js} +5 -2
- package/package.json +1 -1
|
@@ -354,6 +354,13 @@ export interface IKernelServices {
|
|
|
354
354
|
readonly capName: string;
|
|
355
355
|
readonly deviceId: number;
|
|
356
356
|
}>;
|
|
357
|
+
/**
|
|
358
|
+
* Is `nodeId` online in the cluster registry (hub only)? The same
|
|
359
|
+
* membership cap dispatch's `nodeOnline` reads: a node is removed on
|
|
360
|
+
* disconnect, so a held manifest means connected. Absent on hosts that
|
|
361
|
+
* have no registry; a caller then treats the node as unknown.
|
|
362
|
+
*/
|
|
363
|
+
readonly isNodeRegistered?: (nodeId: string) => boolean;
|
|
357
364
|
/**
|
|
358
365
|
* Node-routed capability proxy (hub-side builtins only): every method call
|
|
359
366
|
* on the returned object forwards to `capName`'s provider ON `nodeId` via
|
|
@@ -1071,6 +1071,8 @@ export interface EventCatalog {
|
|
|
1071
1071
|
reason: 'native-registered' | 'native-unregistered' | 'wrapper-activated' | 'wrapper-deactivated';
|
|
1072
1072
|
addonId: string;
|
|
1073
1073
|
nodeId: string;
|
|
1074
|
+
/** On `native-registered`: the cap's methods the provider object implements. Absent = all. */
|
|
1075
|
+
implementedMethods?: string[];
|
|
1074
1076
|
};
|
|
1075
1077
|
'device.meta-changed': {
|
|
1076
1078
|
deviceId: number;
|
|
@@ -67,6 +67,15 @@ export interface MigrationApiV1 {
|
|
|
67
67
|
write(input: In<'settings.write'>): Promise<Out<'settings.write'>>;
|
|
68
68
|
deleteKeys(input: In<'settings.deleteKeys'>): Promise<Out<'settings.deleteKeys'>>;
|
|
69
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* The addon's own PER-DEVICE settings (`ctx.settings.*DeviceStore`), read only: the ids that
|
|
72
|
+
* have a blob and the blobs, as stored. A migration that rewrites them returns the edits and the
|
|
73
|
+
* engine applies them under its snapshot.
|
|
74
|
+
*/
|
|
75
|
+
readonly deviceSettings: {
|
|
76
|
+
listIds(input: In<'deviceSettings.listIds'>): Promise<Out<'deviceSettings.listIds'>>;
|
|
77
|
+
read(input: In<'deviceSettings.read'>): Promise<Out<'deviceSettings.read'>>;
|
|
78
|
+
};
|
|
70
79
|
/** The addon's own keychain handle. */
|
|
71
80
|
readonly secrets: {
|
|
72
81
|
resolve(input: In<'secrets.resolve'>): Promise<Out<'secrets.resolve'>>;
|
|
@@ -81,6 +90,8 @@ export interface MigrationApiV1 {
|
|
|
81
90
|
readonly devices: {
|
|
82
91
|
list(input: In<'devices.list'>): Promise<Out<'devices.list'>>;
|
|
83
92
|
get(input: In<'devices.get'>): Promise<Out<'devices.get'>>;
|
|
93
|
+
/** The template aliases of the NAMED devices (any addon's), read only. */
|
|
94
|
+
aliases(input: In<'devices.aliases'>): Promise<Out<'devices.aliases'>>;
|
|
84
95
|
setIntegrationId(input: In<'devices.setIntegrationId'>): Promise<Out<'devices.setIntegrationId'>>;
|
|
85
96
|
};
|
|
86
97
|
readonly node: {
|
|
@@ -372,6 +372,22 @@ export declare const MIGRATION_API_V1_METHODS: {
|
|
|
372
372
|
}, z.core.$strip>;
|
|
373
373
|
readonly behaviours: readonly ["settings.deleteKeys.removes-only-the-named-keys"];
|
|
374
374
|
};
|
|
375
|
+
readonly 'deviceSettings.listIds': {
|
|
376
|
+
readonly input: z.ZodObject<{}, z.core.$strip>;
|
|
377
|
+
readonly output: z.ZodObject<{
|
|
378
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
readonly behaviours: readonly ["deviceSettings.listIds.names-only-the-addons-own-devices"];
|
|
381
|
+
};
|
|
382
|
+
readonly 'deviceSettings.read': {
|
|
383
|
+
readonly input: z.ZodObject<{
|
|
384
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
readonly output: z.ZodObject<{
|
|
387
|
+
blobs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
388
|
+
}, z.core.$strip>;
|
|
389
|
+
readonly behaviours: readonly ["deviceSettings.read.returns-only-the-addons-own-blobs"];
|
|
390
|
+
};
|
|
375
391
|
readonly 'secrets.resolve': {
|
|
376
392
|
readonly input: z.ZodObject<{
|
|
377
393
|
refs: z.ZodArray<z.ZodString>;
|
|
@@ -454,6 +470,15 @@ export declare const MIGRATION_API_V1_METHODS: {
|
|
|
454
470
|
}, z.core.$strip>>;
|
|
455
471
|
readonly behaviours: readonly ["devices.get.null-for-an-unknown-id", "devices.get.reports-link-and-config"];
|
|
456
472
|
};
|
|
473
|
+
readonly 'devices.aliases': {
|
|
474
|
+
readonly input: z.ZodObject<{
|
|
475
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
readonly output: z.ZodObject<{
|
|
478
|
+
aliases: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
readonly behaviours: readonly ["devices.aliases.answers-for-the-named-ids-only"];
|
|
481
|
+
};
|
|
457
482
|
readonly 'devices.setIntegrationId': {
|
|
458
483
|
readonly input: z.ZodObject<{
|
|
459
484
|
deviceId: z.ZodNumber;
|
package/dist/node.d.ts
CHANGED
|
@@ -26,5 +26,6 @@ export { canonicalHash } from './utils/canonical-hash.js';
|
|
|
26
26
|
export { customizationBlockName } from './composition/customization-name.js';
|
|
27
27
|
export type { VerifyExpiringUrlInput } from './utils/expiring-url-signature.js';
|
|
28
28
|
export { signExpiringUrl, verifyExpiringUrl, } from './utils/expiring-url-signature.js';
|
|
29
|
+
export { implementedMethodsOf } from './device/implemented-methods.js';
|
|
29
30
|
export type { DeviceExportShape, ExportDelta, ExportTargetEntry, } from './utils/export-reconciler.js';
|
|
30
31
|
export { canonicalDeviceFingerprint, diffExportTargets, resolveExportFingerprint, } from './utils/export-reconciler.js';
|
package/dist/node.js
CHANGED
|
@@ -21,8 +21,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
25
|
-
const
|
|
24
|
+
const require_composed_stable_id = require("./composed-stable-id-BtaMj_W7.js");
|
|
25
|
+
const require_implemented_methods = require("./implemented-methods-C_iV6BiP.js");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
27
|
let node_fs = require("node:fs");
|
|
28
28
|
node_fs = __toESM(node_fs);
|
|
@@ -472,26 +472,26 @@ async function ensureFfmpeg(dataDir, logger) {
|
|
|
472
472
|
const depsDir = (0, node_path.join)(dataDir, "deps");
|
|
473
473
|
const platform = process.platform;
|
|
474
474
|
const arch = process.arch;
|
|
475
|
-
const pinnedPath = (0, node_path.join)(depsDir,
|
|
476
|
-
const override = process.env[
|
|
477
|
-
const chosen =
|
|
475
|
+
const pinnedPath = (0, node_path.join)(depsDir, require_implemented_methods.ffmpegBinaryName(platform));
|
|
476
|
+
const override = process.env[require_implemented_methods.FFMPEG_PATH_ENV];
|
|
477
|
+
const chosen = require_implemented_methods.chooseFfmpegBinary({
|
|
478
478
|
platform,
|
|
479
479
|
pinnedPath,
|
|
480
480
|
override,
|
|
481
481
|
exists: node_fs.existsSync
|
|
482
482
|
});
|
|
483
|
-
if (override !== void 0 && override.trim().length > 0 && chosen?.origin !== "override") logger.error(`${
|
|
484
|
-
const artifact = chosen === null ?
|
|
483
|
+
if (override !== void 0 && override.trim().length > 0 && chosen?.origin !== "override") logger.error(`${require_implemented_methods.FFMPEG_PATH_ENV} names a binary that does not exist — ignoring it`, { meta: { [require_implemented_methods.FFMPEG_PATH_ENV]: override } });
|
|
484
|
+
const artifact = chosen === null ? require_implemented_methods.getFfmpegArtifact(platform, arch) : null;
|
|
485
485
|
if (artifact !== null) logger.info("ffmpeg is not on this node yet — downloading the pinned build", { meta: {
|
|
486
|
-
release:
|
|
486
|
+
release: require_implemented_methods.FFMPEG_RELEASE,
|
|
487
487
|
url: artifact.url,
|
|
488
488
|
sizeMb: Math.round(artifact.sizeBytes / 1e6)
|
|
489
489
|
} });
|
|
490
490
|
const path = chosen?.path ?? await downloadBinary({
|
|
491
491
|
name: "ffmpeg",
|
|
492
|
-
url: artifact?.url ??
|
|
492
|
+
url: artifact?.url ?? require_implemented_methods.getFfmpegDownloadUrl(platform, arch),
|
|
493
493
|
targetDir: depsDir,
|
|
494
|
-
targetName:
|
|
494
|
+
targetName: require_implemented_methods.ffmpegBinaryName(platform),
|
|
495
495
|
logger,
|
|
496
496
|
isArchive: true,
|
|
497
497
|
archiveFormat: artifact?.archiveFormat ?? "tar.xz",
|
|
@@ -502,16 +502,16 @@ async function ensureFfmpeg(dataDir, logger) {
|
|
|
502
502
|
logger.info("ffmpeg binary resolved", { meta: {
|
|
503
503
|
path,
|
|
504
504
|
origin: chosen?.origin ?? "downloaded",
|
|
505
|
-
release:
|
|
505
|
+
release: require_implemented_methods.FFMPEG_RELEASE,
|
|
506
506
|
version: capabilities.version,
|
|
507
507
|
hwaccels: [...capabilities.hwaccels].join(",") || "none"
|
|
508
508
|
} });
|
|
509
509
|
if (chosen?.origin !== "override") {
|
|
510
|
-
const expected =
|
|
510
|
+
const expected = require_implemented_methods.getFfmpegArtifact(platform, arch).expectedHwaccels;
|
|
511
511
|
const missing = expected.filter((name) => !capabilities.hwaccels.has(name));
|
|
512
512
|
if (missing.length > 0) logger.error("this ffmpeg cannot do what its artifact is supposed to — the source changed under us", { meta: {
|
|
513
513
|
path,
|
|
514
|
-
release:
|
|
514
|
+
release: require_implemented_methods.FFMPEG_RELEASE,
|
|
515
515
|
expected: expected.join(","),
|
|
516
516
|
missing: missing.join(","),
|
|
517
517
|
got: [...capabilities.hwaccels].join(",") || "none"
|
|
@@ -1230,7 +1230,7 @@ var Fmp4FragmentChild = class {
|
|
|
1230
1230
|
deps;
|
|
1231
1231
|
args;
|
|
1232
1232
|
child = null;
|
|
1233
|
-
splitter = new
|
|
1233
|
+
splitter = new require_implemented_methods.Fmp4BoxSplitter();
|
|
1234
1234
|
stopped = false;
|
|
1235
1235
|
unitsOut = 0;
|
|
1236
1236
|
activeHwAccel = null;
|
|
@@ -1247,7 +1247,7 @@ var Fmp4FragmentChild = class {
|
|
|
1247
1247
|
return;
|
|
1248
1248
|
} catch (err) {
|
|
1249
1249
|
if (this.stopped) throw err;
|
|
1250
|
-
if (requested === null ||
|
|
1250
|
+
if (requested === null || require_implemented_methods.isSoftwareDecode(requested)) throw err;
|
|
1251
1251
|
this.deps.logger.warn("fmp4 fragment child: hardware decode produced NO fragment — retrying in SOFTWARE", {
|
|
1252
1252
|
tags: { deviceId: this.args.deviceId },
|
|
1253
1253
|
meta: {
|
|
@@ -1257,7 +1257,7 @@ var Fmp4FragmentChild = class {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
});
|
|
1259
1259
|
this.killChild();
|
|
1260
|
-
this.splitter = new
|
|
1260
|
+
this.splitter = new require_implemented_methods.Fmp4BoxSplitter();
|
|
1261
1261
|
this.activeHwAccel = null;
|
|
1262
1262
|
await this.spawnAttempt(null);
|
|
1263
1263
|
}
|
|
@@ -1275,7 +1275,7 @@ var Fmp4FragmentChild = class {
|
|
|
1275
1275
|
this.args.plane.end("the fragment child stopped");
|
|
1276
1276
|
}
|
|
1277
1277
|
spawnAttempt(decodeHwAccel) {
|
|
1278
|
-
const args =
|
|
1278
|
+
const args = require_implemented_methods.buildFfmpegArgs({
|
|
1279
1279
|
...this.args.invocation,
|
|
1280
1280
|
decodeHwAccel,
|
|
1281
1281
|
sink: {
|
|
@@ -2505,10 +2505,10 @@ var HASH_HEX_LENGTH = 32;
|
|
|
2505
2505
|
* device's name. Unique per target: the plain ref when it fits, else a hash.
|
|
2506
2506
|
*/
|
|
2507
2507
|
function customizationBlockName(ref) {
|
|
2508
|
-
const key =
|
|
2509
|
-
const plain = `${
|
|
2508
|
+
const key = require_implemented_methods.compositionSourceKey(ref);
|
|
2509
|
+
const plain = `${require_implemented_methods.CUSTOMIZATION_BLOCK_NAME_PREFIX}${key}`;
|
|
2510
2510
|
if (plain.length <= MAX_BLOCK_NAME_LENGTH) return plain;
|
|
2511
|
-
return `${
|
|
2511
|
+
return `${require_implemented_methods.CUSTOMIZATION_BLOCK_NAME_PREFIX}#${(0, node_crypto.createHash)("sha256").update(key).digest("hex").slice(0, HASH_HEX_LENGTH)}`;
|
|
2512
2512
|
}
|
|
2513
2513
|
//#endregion
|
|
2514
2514
|
//#region src/utils/expiring-url-signature.ts
|
|
@@ -2574,7 +2574,7 @@ function verifyExpiringUrl(input) {
|
|
|
2574
2574
|
*/
|
|
2575
2575
|
function canonicalDeviceFingerprint(shape) {
|
|
2576
2576
|
const features = [...new Set(shape.features)].toSorted();
|
|
2577
|
-
return
|
|
2577
|
+
return require_implemented_methods.canonicalHash({
|
|
2578
2578
|
deviceType: shape.deviceType,
|
|
2579
2579
|
features
|
|
2580
2580
|
});
|
|
@@ -2626,7 +2626,7 @@ exports.ChildCostRegistry = ChildCostRegistry;
|
|
|
2626
2626
|
exports.EDGETPU_DELEGATE_DIRECTIVE = EDGETPU_DELEGATE_DIRECTIVE;
|
|
2627
2627
|
exports.EDGETPU_DELEGATE_RELEASE = EDGETPU_DELEGATE_RELEASE;
|
|
2628
2628
|
exports.EDGETPU_LIB_ENV = EDGETPU_LIB_ENV;
|
|
2629
|
-
exports.FFMPEG_RELEASE =
|
|
2629
|
+
exports.FFMPEG_RELEASE = require_implemented_methods.FFMPEG_RELEASE;
|
|
2630
2630
|
exports.FfmpegProcess = FfmpegProcess;
|
|
2631
2631
|
exports.FilesystemStorageProvider = FilesystemStorageProvider;
|
|
2632
2632
|
exports.Fmp4FragmentChild = Fmp4FragmentChild;
|
|
@@ -2638,7 +2638,7 @@ exports.OwnerOnlyError = OwnerOnlyError;
|
|
|
2638
2638
|
exports.PYTHON_VERSION = PYTHON_VERSION;
|
|
2639
2639
|
exports.buildBinaryPath = buildBinaryPath;
|
|
2640
2640
|
exports.canonicalDeviceFingerprint = canonicalDeviceFingerprint;
|
|
2641
|
-
exports.canonicalHash =
|
|
2641
|
+
exports.canonicalHash = require_implemented_methods.canonicalHash;
|
|
2642
2642
|
exports.chooseEdgetpuDelegate = chooseEdgetpuDelegate;
|
|
2643
2643
|
exports.containsOrEquals = containsOrEquals;
|
|
2644
2644
|
exports.customizationBlockName = customizationBlockName;
|
|
@@ -2656,11 +2656,12 @@ exports.ensurePython = ensurePython;
|
|
|
2656
2656
|
exports.extractDebPayload = extractDebPayload;
|
|
2657
2657
|
exports.findInPath = findInPath;
|
|
2658
2658
|
exports.getEdgetpuDelegateArtifact = getEdgetpuDelegateArtifact;
|
|
2659
|
-
exports.getFfmpegArtifact =
|
|
2660
|
-
exports.getFfmpegDownloadUrl =
|
|
2659
|
+
exports.getFfmpegArtifact = require_implemented_methods.getFfmpegArtifact;
|
|
2660
|
+
exports.getFfmpegDownloadUrl = require_implemented_methods.getFfmpegDownloadUrl;
|
|
2661
2661
|
exports.getPlatformInfo = getPlatformInfo;
|
|
2662
2662
|
exports.getPythonDownloadUrl = getPythonDownloadUrl;
|
|
2663
2663
|
exports.icaclsArgs = icaclsArgs;
|
|
2664
|
+
exports.implementedMethodsOf = require_implemented_methods.implementedMethodsOf;
|
|
2664
2665
|
exports.installLibraryFromDeb = installLibraryFromDeb;
|
|
2665
2666
|
exports.installPythonPackages = installPythonPackages;
|
|
2666
2667
|
exports.installPythonRequirements = installPythonRequirements;
|
package/dist/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as errMsg } from "./composed-stable-id-
|
|
2
|
-
import {
|
|
1
|
+
import { s as errMsg } from "./composed-stable-id-jnvhwGoH.mjs";
|
|
2
|
+
import { Fn as getFfmpegArtifact, In as getFfmpegDownloadUrl, Ln as canonicalHash, Mn as chooseFfmpegBinary, Nn as ffmpegBinaryName, Pn as FFMPEG_RELEASE, R as compositionSourceKey, Rn as Fmp4BoxSplitter, Un as buildFfmpegArgs, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, jn as FFMPEG_PATH_ENV, qn as isSoftwareDecode, t as implementedMethodsOf } from "./implemented-methods-OitwyO1Y.mjs";
|
|
3
3
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { chmodSync, copyFileSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -2599,4 +2599,4 @@ function resolveExportFingerprint(input) {
|
|
|
2599
2599
|
return input.persisted ?? input.fresh;
|
|
2600
2600
|
}
|
|
2601
2601
|
//#endregion
|
|
2602
|
-
export { ChildCostRegistry, EDGETPU_DELEGATE_DIRECTIVE, EDGETPU_DELEGATE_RELEASE, EDGETPU_LIB_ENV, FFMPEG_RELEASE, FfmpegProcess, FilesystemStorageProvider, Fmp4FragmentChild, Fmp4FragmentPlane, LEGACY_EDGETPU_LIB, NO_COST_CLAIM, NO_PINNED_FFMPEG_DETAIL, OwnerOnlyError, PYTHON_VERSION, buildBinaryPath, canonicalDeviceFingerprint, canonicalHash, chooseEdgetpuDelegate, containsOrEquals, customizationBlockName, debDataMember, declaresEdgetpuDelegate, defaultFfmpegSpawn, diffExportTargets, downloadBinary, edgetpuDelegateFileName, edgetpuLibDir, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, extractDebPayload, findInPath, getEdgetpuDelegateArtifact, getFfmpegArtifact, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, icaclsArgs, installLibraryFromDeb, installPythonPackages, installPythonRequirements, mkdirOwnerOnlySync, nodeDataRootFromEnv, nodeProcStatReader, parseFfmpegCapabilities, parseProcCpuSeconds, parseProcRssBytes, physicalRootOf, pinnedFfmpegSpawner, probeFfmpegBinary, readArMembers, readProcessCost, resolveExportFingerprint, resolvePinnedFfmpegSpawner, restrictDirToOwnerSync, restrictFileToOwnerSync, signExpiringUrl, verifyExpiringUrl, writeFileAtomic, writeOwnerOnlyFileSync };
|
|
2602
|
+
export { ChildCostRegistry, EDGETPU_DELEGATE_DIRECTIVE, EDGETPU_DELEGATE_RELEASE, EDGETPU_LIB_ENV, FFMPEG_RELEASE, FfmpegProcess, FilesystemStorageProvider, Fmp4FragmentChild, Fmp4FragmentPlane, LEGACY_EDGETPU_LIB, NO_COST_CLAIM, NO_PINNED_FFMPEG_DETAIL, OwnerOnlyError, PYTHON_VERSION, buildBinaryPath, canonicalDeviceFingerprint, canonicalHash, chooseEdgetpuDelegate, containsOrEquals, customizationBlockName, debDataMember, declaresEdgetpuDelegate, defaultFfmpegSpawn, diffExportTargets, downloadBinary, edgetpuDelegateFileName, edgetpuLibDir, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, extractDebPayload, findInPath, getEdgetpuDelegateArtifact, getFfmpegArtifact, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, icaclsArgs, implementedMethodsOf, installLibraryFromDeb, installPythonPackages, installPythonRequirements, mkdirOwnerOnlySync, nodeDataRootFromEnv, nodeProcStatReader, parseFfmpegCapabilities, parseProcCpuSeconds, parseProcRssBytes, physicalRootOf, pinnedFfmpegSpawner, probeFfmpegBinary, readArMembers, readProcessCost, resolveExportFingerprint, resolvePinnedFfmpegSpawner, restrictDirToOwnerSync, restrictFileToOwnerSync, signExpiringUrl, verifyExpiringUrl, writeFileAtomic, writeOwnerOnlyFileSync };
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* HA addon need it and addons may not cross-import.
|
|
13
13
|
*/
|
|
14
14
|
import type { z } from 'zod';
|
|
15
|
-
import type { AttachmentMediaType, NotificationAction, NotificationFormat, NotificationSchema, RenderedAs, TargetKindCaps } from '../capabilities/notification-output.cap.js';
|
|
15
|
+
import type { AttachmentMediaType, DeliveryParamValue, NotificationAction, NotificationFormat, NotificationSchema, RenderedAs, TargetKindCaps } from '../capabilities/notification-output.cap.js';
|
|
16
16
|
type Notification = z.infer<typeof NotificationSchema>;
|
|
17
17
|
/** The resolved native level the adapter maps onto its wire payload. */
|
|
18
18
|
export interface ResolvedLevel {
|
|
@@ -48,6 +48,12 @@ export interface PreparedNotification {
|
|
|
48
48
|
readonly sound: string | null;
|
|
49
49
|
readonly ttl: number | null;
|
|
50
50
|
readonly tag: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The notifier-declared delivery parameters the rule set for this target
|
|
53
|
+
* (D938), already validated by the dispatcher. An adapter reads the keys it
|
|
54
|
+
* declared; absent when none were set.
|
|
55
|
+
*/
|
|
56
|
+
readonly delivery?: Readonly<Record<string, DeliveryParamValue>>;
|
|
51
57
|
/** Overflow: `bodyParts[0]` is the truncate view; the full array is the split. */
|
|
52
58
|
readonly bodyParts: readonly string[];
|
|
53
59
|
readonly renderedAs: RenderedAs;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which message fields a notification target can deliver (#483) — the ONE
|
|
3
|
+
* reading of a kind's capability declaration (`TargetKind.caps`).
|
|
4
|
+
*
|
|
5
|
+
* The notifier declares; nobody else names a service. The dispatcher drops
|
|
6
|
+
* what a target cannot deliver, the admin rule editor shows only what the
|
|
7
|
+
* selected targets can deliver, and the viewer reads the same function — so
|
|
8
|
+
* the three cannot disagree about which fields exist for a target.
|
|
9
|
+
*/
|
|
10
|
+
import type { AttachmentMediaType, NotificationField, TargetKindCaps, TargetKindLevel } from '../capabilities/notification-output.cap.js';
|
|
11
|
+
import type { NcTargetAttachment, NcTargetOverride } from '../capabilities/notification-rules.cap.js';
|
|
12
|
+
/** Every field, in the order an editor meets them. */
|
|
13
|
+
export declare const NOTIFICATION_FIELDS: readonly NotificationField[];
|
|
14
|
+
/**
|
|
15
|
+
* The fields a kind delivers, derived from its caps:
|
|
16
|
+
* - `title` / `body` — `caps.text`; absent = both (every kind declared before #483);
|
|
17
|
+
* - `attachments` — at least one slot and one media type;
|
|
18
|
+
* - `actions` — at least one button;
|
|
19
|
+
* - `priority` — at least two DISTINCT ordinals to choose between (one level
|
|
20
|
+
* means the priority changes nothing on that kind);
|
|
21
|
+
* - `sound`, `clickUrl` — their flags.
|
|
22
|
+
*/
|
|
23
|
+
export declare function deliverableFields(caps: TargetKindCaps): readonly NotificationField[];
|
|
24
|
+
/**
|
|
25
|
+
* The picture kinds a target may be set to receive: `none` plus one per media
|
|
26
|
+
* type the notifier declares (`caps.attachments.mediaTypes`). Empty when the
|
|
27
|
+
* kind takes no attachment at all — there is nothing to choose.
|
|
28
|
+
*/
|
|
29
|
+
export declare function attachmentKindsOf(caps: TargetKindCaps): readonly NcTargetAttachment[];
|
|
30
|
+
/**
|
|
31
|
+
* Whether a target set to `kind` receives an attachment of `mediaType`.
|
|
32
|
+
* Absent = every kind the rule produced; an icon or audio part is never
|
|
33
|
+
* narrowed (it is not a picture of the event).
|
|
34
|
+
*/
|
|
35
|
+
export declare function targetAttachmentAllows(kind: NcTargetAttachment | undefined, mediaType: AttachmentMediaType): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The levels a notifier declares that a rule can pick between: the ones that
|
|
38
|
+
* map to a canonical ordinal, in ordinal order. The editor labels the choice
|
|
39
|
+
* with the level's own label (Alexa: normal / high) and stores its ordinal.
|
|
40
|
+
*/
|
|
41
|
+
export declare function priorityLevelsOf(caps: TargetKindCaps): readonly TargetKindLevel[];
|
|
42
|
+
/** One selected target as a field-support question sees it. */
|
|
43
|
+
export interface NotificationFieldTarget {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
/** `undefined` = the kind catalog did not answer: UNKNOWN, read as "delivers everything". */
|
|
46
|
+
readonly fields: readonly NotificationField[] | undefined;
|
|
47
|
+
}
|
|
48
|
+
/** Whether an editor shows a field, and which selected targets drop it. */
|
|
49
|
+
export interface NotificationFieldSupport {
|
|
50
|
+
readonly field: NotificationField;
|
|
51
|
+
/** At least one selected target delivers it — or nothing is selected, or a kind is unknown. */
|
|
52
|
+
readonly shown: boolean;
|
|
53
|
+
/** Names of the selected targets KNOWN not to deliver it (the per-field hint). */
|
|
54
|
+
readonly droppedBy: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The union of what the selected targets deliver, with the targets that drop
|
|
58
|
+
* each field. No selection shows every field: a rule that addresses only users
|
|
59
|
+
* (or nobody yet) has no declaration to narrow on, and not-yet-known must never
|
|
60
|
+
* look like not-supported (D315).
|
|
61
|
+
*/
|
|
62
|
+
export declare function fieldSupportForTargets(targets: readonly NotificationFieldTarget[]): readonly NotificationFieldSupport[];
|
|
63
|
+
/**
|
|
64
|
+
* A target override with every field the target cannot deliver removed — what
|
|
65
|
+
* an editor may store. `fields` undefined (unknown kind) keeps everything; the
|
|
66
|
+
* dispatcher still drops at send what the kind turns out not to deliver.
|
|
67
|
+
* `undefined` when nothing is left, so an empty override is never stored.
|
|
68
|
+
*/
|
|
69
|
+
export declare function sanitizeTargetOverride(override: NcTargetOverride, fields: readonly NotificationField[] | undefined): NcTargetOverride | undefined;
|
|
@@ -94,6 +94,29 @@ export declare const TimelapseRuleInputSchema: z.ZodObject<{
|
|
|
94
94
|
}>>;
|
|
95
95
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
96
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
98
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
99
|
+
title: z.ZodOptional<z.ZodString>;
|
|
100
|
+
body: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
104
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
105
|
+
startMinute: z.ZodNumber;
|
|
106
|
+
endMinute: z.ZodNumber;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
109
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
clip: "clip";
|
|
114
|
+
gif: "gif";
|
|
115
|
+
image: "image";
|
|
116
|
+
none: "none";
|
|
117
|
+
}>>;
|
|
118
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
97
120
|
}, z.core.$strip>;
|
|
98
121
|
export type TimelapseRuleInput = z.infer<typeof TimelapseRuleInputSchema>;
|
|
99
122
|
/**
|
|
@@ -152,6 +175,29 @@ export declare const TimelapseRulePatchSchema: z.ZodObject<{
|
|
|
152
175
|
}>>;
|
|
153
176
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
177
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
179
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
title: z.ZodOptional<z.ZodString>;
|
|
181
|
+
body: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
185
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
186
|
+
startMinute: z.ZodNumber;
|
|
187
|
+
endMinute: z.ZodNumber;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
190
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
clip: "clip";
|
|
195
|
+
gif: "gif";
|
|
196
|
+
image: "image";
|
|
197
|
+
none: "none";
|
|
198
|
+
}>>;
|
|
199
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
155
201
|
}, z.core.$strip>;
|
|
156
202
|
export type TimelapseRulePatch = z.infer<typeof TimelapseRulePatchSchema>;
|
|
157
203
|
/** A persisted timelapse rule. */
|
|
@@ -187,6 +233,29 @@ export declare const TimelapseRuleSchema: z.ZodObject<{
|
|
|
187
233
|
}>>;
|
|
188
234
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
235
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
236
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
237
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
title: z.ZodOptional<z.ZodString>;
|
|
239
|
+
body: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
243
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
244
|
+
startMinute: z.ZodNumber;
|
|
245
|
+
endMinute: z.ZodNumber;
|
|
246
|
+
}, z.core.$strip>>;
|
|
247
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
248
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
clip: "clip";
|
|
253
|
+
gif: "gif";
|
|
254
|
+
image: "image";
|
|
255
|
+
none: "none";
|
|
256
|
+
}>>;
|
|
257
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, z.core.$strip>>>;
|
|
190
259
|
id: z.ZodString;
|
|
191
260
|
ownerUserId: z.ZodOptional<z.ZodString>;
|
|
192
261
|
lastGeneratedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-78tcBemo.mjs";
|
|
2
|
-
import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-
|
|
2
|
+
import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-jnvhwGoH.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
5
5
|
/**
|
|
@@ -12294,6 +12294,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
12294
12294
|
backup: system("system backups — run and restored from the Backups page"),
|
|
12295
12295
|
broker: system("message-broker connections — configured, not actuated"),
|
|
12296
12296
|
"calendar-source": system(INTERNAL),
|
|
12297
|
+
"cluster-update": system(CLUSTER),
|
|
12297
12298
|
calendars: system("calendars feed schedules and conditions, not device actions"),
|
|
12298
12299
|
composer: system("device composition — an authoring tool, not an action"),
|
|
12299
12300
|
"core-blocks": system(INTERNAL),
|
|
@@ -13004,6 +13005,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
13004
13005
|
"camera-streams",
|
|
13005
13006
|
"carbon-monoxide",
|
|
13006
13007
|
"climate-control",
|
|
13008
|
+
"cluster-update",
|
|
13007
13009
|
"color",
|
|
13008
13010
|
"composer",
|
|
13009
13011
|
"connectivity",
|
|
@@ -16183,6 +16185,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16183
16185
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
16184
16186
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
16185
16187
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
16188
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
16186
16189
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
16187
16190
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
16188
16191
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|
|
@@ -16233,11 +16236,11 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16233
16236
|
const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
|
|
16234
16237
|
const osdManagerInterface = {
|
|
16235
16238
|
getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
|
|
16236
|
-
getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
|
|
16237
16239
|
setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
|
|
16238
16240
|
clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
|
|
16239
16241
|
setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
|
|
16240
16242
|
previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
|
|
16243
|
+
previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
|
|
16241
16244
|
renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
|
|
16242
16245
|
};
|
|
16243
16246
|
const pipelineExecutorInterface = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_event_category = require("./event-category-BC4RRerT.js");
|
|
2
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
2
|
+
const require_composed_stable_id = require("./composed-stable-id-BtaMj_W7.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
5
5
|
/**
|
|
@@ -12294,6 +12294,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
12294
12294
|
backup: system("system backups — run and restored from the Backups page"),
|
|
12295
12295
|
broker: system("message-broker connections — configured, not actuated"),
|
|
12296
12296
|
"calendar-source": system(INTERNAL),
|
|
12297
|
+
"cluster-update": system(CLUSTER),
|
|
12297
12298
|
calendars: system("calendars feed schedules and conditions, not device actions"),
|
|
12298
12299
|
composer: system("device composition — an authoring tool, not an action"),
|
|
12299
12300
|
"core-blocks": system(INTERNAL),
|
|
@@ -13004,6 +13005,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
13004
13005
|
"camera-streams",
|
|
13005
13006
|
"carbon-monoxide",
|
|
13006
13007
|
"climate-control",
|
|
13008
|
+
"cluster-update",
|
|
13007
13009
|
"color",
|
|
13008
13010
|
"composer",
|
|
13009
13011
|
"connectivity",
|
|
@@ -16183,6 +16185,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16183
16185
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
16184
16186
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
16185
16187
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
16188
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
16186
16189
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
16187
16190
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
16188
16191
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|
|
@@ -16233,11 +16236,11 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16233
16236
|
const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
|
|
16234
16237
|
const osdManagerInterface = {
|
|
16235
16238
|
getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
|
|
16236
|
-
getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
|
|
16237
16239
|
setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
|
|
16238
16240
|
clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
|
|
16239
16241
|
setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
|
|
16240
16242
|
previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
|
|
16243
|
+
previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
|
|
16241
16244
|
renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
|
|
16242
16245
|
};
|
|
16243
16246
|
const pipelineExecutorInterface = {
|