@camstack/types 1.2.538 → 1.2.540

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/addon.js +44 -12
  3. package/dist/addon.mjs +44 -12
  4. package/dist/automation/step-runner.d.ts +2 -0
  5. package/dist/capabilities/capability-definition.d.ts +4 -0
  6. package/dist/capabilities/climate-control.cap.d.ts +18 -6
  7. package/dist/capabilities/cover.cap.d.ts +9 -3
  8. package/dist/capabilities/device-manager.cap.d.ts +14 -0
  9. package/dist/capabilities/fan-control.cap.d.ts +12 -4
  10. package/dist/capabilities/index.d.ts +3 -3
  11. package/dist/capabilities/lock-control.cap.d.ts +3 -1
  12. package/dist/capabilities/media-player.cap.d.ts +48 -16
  13. package/dist/capabilities/notification-output.cap.d.ts +40 -0
  14. package/dist/capabilities/notification-rules.cap.d.ts +252 -0
  15. package/dist/capabilities/osd-manager.cap.d.ts +40 -277
  16. package/dist/capabilities/valve.cap.d.ts +3 -1
  17. package/dist/client.js +41 -1
  18. package/dist/client.mjs +41 -1
  19. package/dist/{composed-stable-id-C3J6LxC9.js → composed-stable-id-BtaMj_W7.js} +4 -0
  20. package/dist/{composed-stable-id-DLcPInGv.mjs → composed-stable-id-jnvhwGoH.mjs} +4 -0
  21. package/dist/device/device-binding.d.ts +6 -0
  22. package/dist/device/device-feature-requirements.d.ts +137 -0
  23. package/dist/device/device-type.d.ts +5 -1
  24. package/dist/device/implemented-methods.d.ts +6 -0
  25. package/dist/expression/device-template.d.ts +31 -1
  26. package/dist/generated/addon-api.d.ts +7 -7
  27. package/dist/generated/collection-array-methods.d.ts +1 -1
  28. package/dist/generated/device-proxy.d.ts +1 -1
  29. package/dist/generated/method-access-map.d.ts +1 -1
  30. package/dist/{composition-BcVAbtBc.js → implemented-methods-C_iV6BiP.js} +17 -1
  31. package/dist/{composition-BFJq1Y88.mjs → implemented-methods-OitwyO1Y.mjs} +12 -2
  32. package/dist/index.d.ts +6 -2
  33. package/dist/index.js +733 -426
  34. package/dist/index.mjs +475 -185
  35. package/dist/interfaces/addon.d.ts +7 -0
  36. package/dist/interfaces/event-bus.d.ts +2 -0
  37. package/dist/migrations/api/migration-api.v1.d.ts +11 -0
  38. package/dist/migrations/api/migration-api.v1.schema.d.ts +25 -0
  39. package/dist/node.d.ts +1 -0
  40. package/dist/node.js +26 -25
  41. package/dist/node.mjs +3 -3
  42. package/dist/notification/notification-fields.d.ts +51 -0
  43. package/dist/{sleep-DgCXXFc3.js → sleep-DPMn-Sik.js} +2 -2
  44. package/dist/{sleep-VrfKAAGN.mjs → sleep-Dz1P6--1.mjs} +2 -2
  45. 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-C3J6LxC9.js");
25
- const require_composition = require("./composition-BcVAbtBc.js");
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, require_composition.ffmpegBinaryName(platform));
476
- const override = process.env[require_composition.FFMPEG_PATH_ENV];
477
- const chosen = require_composition.chooseFfmpegBinary({
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(`${require_composition.FFMPEG_PATH_ENV} names a binary that does not exist — ignoring it`, { meta: { [require_composition.FFMPEG_PATH_ENV]: override } });
484
- const artifact = chosen === null ? require_composition.getFfmpegArtifact(platform, arch) : 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: require_composition.FFMPEG_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 ?? require_composition.getFfmpegDownloadUrl(platform, arch),
492
+ url: artifact?.url ?? require_implemented_methods.getFfmpegDownloadUrl(platform, arch),
493
493
  targetDir: depsDir,
494
- targetName: require_composition.ffmpegBinaryName(platform),
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: require_composition.FFMPEG_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 = require_composition.getFfmpegArtifact(platform, arch).expectedHwaccels;
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: require_composition.FFMPEG_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 require_composition.Fmp4BoxSplitter();
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 || require_composition.isSoftwareDecode(requested)) throw err;
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 require_composition.Fmp4BoxSplitter();
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 = require_composition.buildFfmpegArgs({
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 = require_composition.compositionSourceKey(ref);
2509
- const plain = `${require_composition.CUSTOMIZATION_BLOCK_NAME_PREFIX}${key}`;
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 `${require_composition.CUSTOMIZATION_BLOCK_NAME_PREFIX}#${(0, node_crypto.createHash)("sha256").update(key).digest("hex").slice(0, HASH_HEX_LENGTH)}`;
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 require_composition.canonicalHash({
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 = require_composition.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 = require_composition.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 = require_composition.getFfmpegArtifact;
2660
- exports.getFfmpegDownloadUrl = require_composition.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-DLcPInGv.mjs";
2
- import { An as FFMPEG_PATH_ENV, Fn as getFfmpegDownloadUrl, Hn as buildFfmpegArgs, In as canonicalHash, Kn as isSoftwareDecode, L as compositionSourceKey, Ln as Fmp4BoxSplitter, Mn as ffmpegBinaryName, Nn as FFMPEG_RELEASE, Pn as getFfmpegArtifact, i as CUSTOMIZATION_BLOCK_NAME_PREFIX, jn as chooseFfmpegBinary } from "./composition-BFJq1Y88.mjs";
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 };
@@ -0,0 +1,51 @@
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 { NotificationField, TargetKindCaps } from '../capabilities/notification-output.cap.js';
11
+ import type { 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
+ /** One selected target as a field-support question sees it. */
25
+ export interface NotificationFieldTarget {
26
+ readonly name: string;
27
+ /** `undefined` = the kind catalog did not answer: UNKNOWN, read as "delivers everything". */
28
+ readonly fields: readonly NotificationField[] | undefined;
29
+ }
30
+ /** Whether an editor shows a field, and which selected targets drop it. */
31
+ export interface NotificationFieldSupport {
32
+ readonly field: NotificationField;
33
+ /** At least one selected target delivers it — or nothing is selected, or a kind is unknown. */
34
+ readonly shown: boolean;
35
+ /** Names of the selected targets KNOWN not to deliver it (the per-field hint). */
36
+ readonly droppedBy: readonly string[];
37
+ }
38
+ /**
39
+ * The union of what the selected targets deliver, with the targets that drop
40
+ * each field. No selection shows every field: a rule that addresses only users
41
+ * (or nobody yet) has no declaration to narrow on, and not-yet-known must never
42
+ * look like not-supported (D315).
43
+ */
44
+ export declare function fieldSupportForTargets(targets: readonly NotificationFieldTarget[]): readonly NotificationFieldSupport[];
45
+ /**
46
+ * A target override with every field the target cannot deliver removed — what
47
+ * an editor may store. `fields` undefined (unknown kind) keeps everything; the
48
+ * dispatcher still drops at send what the kind turns out not to deliver.
49
+ * `undefined` when nothing is left, so an empty override is never stored.
50
+ */
51
+ export declare function sanitizeTargetOverride(override: NcTargetOverride, fields: readonly NotificationField[] | undefined): NcTargetOverride | undefined;
@@ -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-C3J6LxC9.js");
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
  /**
@@ -16233,11 +16233,11 @@ function createDeviceProxy(api, binding, opts) {
16233
16233
  const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
16234
16234
  const osdManagerInterface = {
16235
16235
  getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
16236
- getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
16237
16236
  setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
16238
16237
  clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
16239
16238
  setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
16240
16239
  previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
16240
+ previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
16241
16241
  renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
16242
16242
  };
16243
16243
  const pipelineExecutorInterface = {
@@ -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-DLcPInGv.mjs";
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
  /**
@@ -16233,11 +16233,11 @@ function createDeviceProxy(api, binding, opts) {
16233
16233
  const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
16234
16234
  const osdManagerInterface = {
16235
16235
  getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
16236
- getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
16237
16236
  setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
16238
16237
  clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
16239
16238
  setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
16240
16239
  previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
16240
+ previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
16241
16241
  renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
16242
16242
  };
16243
16243
  const pipelineExecutorInterface = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.538",
3
+ "version": "1.2.540",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",