@camstack/types 1.2.594 → 1.2.595

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 (31) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/addon.d.ts +1 -0
  3. package/dist/addon.js +156 -155
  4. package/dist/addon.mjs +3 -3
  5. package/dist/capabilities/index.d.ts +1 -1
  6. package/dist/capabilities/platform-probe.cap.d.ts +28 -0
  7. package/dist/capabilities/power-meter.cap.d.ts +16 -5
  8. package/dist/client.js +5 -1
  9. package/dist/client.mjs +5 -1
  10. package/dist/{composed-stable-id-BNTaDZEh.mjs → composed-stable-id-DIeNz933.mjs} +3 -0
  11. package/dist/{composed-stable-id-BdeYe5dD.js → composed-stable-id-DkF5-kuf.js} +3 -0
  12. package/dist/device/device-icon.d.ts +1 -0
  13. package/dist/device/device-type.d.ts +4 -1
  14. package/dist/device/hero/hero-look.d.ts +1 -0
  15. package/dist/device/hero/hero-scene.d.ts +1 -0
  16. package/dist/device/state-refresh.d.ts +15 -1
  17. package/dist/generated/addon-cap-facts.d.ts +1 -1
  18. package/dist/generated/customize-catalog.d.ts +4 -4
  19. package/dist/{implemented-methods-Dj_2fX8-.js → implemented-methods-DnfgAfI6.js} +1 -1
  20. package/dist/{implemented-methods-DXeNAPAS.mjs → implemented-methods-wFScvZ40.mjs} +1 -1
  21. package/dist/index.d.ts +3 -2
  22. package/dist/index.js +3926 -4219
  23. package/dist/index.mjs +81 -379
  24. package/dist/inference/runtime-capabilities.d.ts +13 -2
  25. package/dist/interfaces/addon.d.ts +3 -1
  26. package/dist/interfaces/platform.d.ts +32 -0
  27. package/dist/node.js +2 -2
  28. package/dist/node.mjs +2 -2
  29. package/dist/{sleep-C9eelFbV.mjs → runtime-capabilities-Bgt5QBvO.mjs} +400 -2
  30. package/dist/{sleep-Bgzv_TCG.js → runtime-capabilities-wOKNm9iz.js} +495 -1
  31. package/package.json +1 -1
@@ -463,6 +463,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
463
463
  /** A machine that runs workloads or is an appliance with its own OS: a
464
464
  * server, a hypervisor, a gateway console, a CCU. */
465
465
  DeviceRole["Host"] = "host";
466
+ /** An uninterruptible power supply: battery charge, mains status and load. A
467
+ * `DeviceType.Sensor` device. */
468
+ DeviceRole["Ups"] = "ups";
466
469
  return DeviceRole;
467
470
  }({});
468
471
  //#endregion
@@ -130,6 +130,7 @@ export declare const DEVICE_ROLE_ICON: {
130
130
  readonly lxc: 'box';
131
131
  readonly app: 'app-window';
132
132
  readonly host: 'server';
133
+ readonly ups: 'battery-charging';
133
134
  };
134
135
  /** Every icon a device can be drawn with — a subset of the catalog the glyph tables must cover. */
135
136
  export type DeviceIconKey = (typeof DEVICE_TYPE_ICON)[DeviceType] | (typeof DEVICE_ROLE_ICON)[DeviceRole];
@@ -444,5 +444,8 @@ export declare enum DeviceRole {
444
444
  App = "app",
445
445
  /** A machine that runs workloads or is an appliance with its own OS: a
446
446
  * server, a hypervisor, a gateway console, a CCU. */
447
- Host = "host"
447
+ Host = "host",
448
+ /** An uninterruptible power supply: battery charge, mains status and load. A
449
+ * `DeviceType.Sensor` device. */
450
+ Ups = "ups"
448
451
  }
@@ -394,6 +394,7 @@ export declare const HERO_LOOK_BY_ROLE: {
394
394
  readonly lxc: 'inherit';
395
395
  readonly app: 'inherit';
396
396
  readonly host: 'inherit';
397
+ readonly ups: 'inherit';
397
398
  };
398
399
  /**
399
400
  * The look of a (role, type) pair, for a state. Role beats type beats the generic default.
@@ -226,6 +226,7 @@ export declare const HERO_SCENE_BY_ROLE: {
226
226
  readonly lxc: 'inherit';
227
227
  readonly app: 'inherit';
228
228
  readonly host: 'inherit';
229
+ readonly ups: 'inherit';
229
230
  };
230
231
  /** The scene id of a (role, type) pair. Role beats type; a type this build does not know gets the terminal. */
231
232
  export declare function resolveHeroSceneId(role: string | null, type: string): HeroSceneId;
@@ -45,7 +45,21 @@ export declare const StateRefreshPolicySchema: z.ZodObject<{
45
45
  export type StateRefreshPolicy = z.infer<typeof StateRefreshPolicySchema>;
46
46
  /** The cadence the core runs a policy at: the declared minimum, slowed (never sped up) by the setting. */
47
47
  export declare function effectiveRefreshIntervalMs(policy: StateRefreshPolicy): number;
48
- /** The burst after a command on a read (non-push) device: offsets from the command, in ms. */
48
+ /** The first reads after a command on a read (non-push) device: offsets from the command, in ms. */
49
49
  export declare const COMMAND_BURST_OFFSETS_MS: readonly number[];
50
+ /** After the first reads, a pending hold is re-read this often. */
51
+ export declare const COMMAND_BURST_STEP_MS = 10000;
52
+ /** The last read of a hold lands this long before it expires. */
53
+ export declare const COMMAND_BURST_TAIL_MS = 2000;
54
+ /**
55
+ * The reads after a command on a read device, for a hold that lasts `holdMs`
56
+ * more: {@link COMMAND_BURST_OFFSETS_MS}, then one every
57
+ * {@link COMMAND_BURST_STEP_MS}, then a last one {@link COMMAND_BURST_TAIL_MS}
58
+ * before the hold expires. A slow cloud is re-read for the whole hold, not
59
+ * only at the start. Offsets are in ms from now, ascending, all below `holdMs`.
60
+ */
61
+ /** The least gap between the last stepped read and the tail read. */
62
+ export declare const COMMAND_BURST_MIN_GAP_MS = 1000;
63
+ export declare function commandBurstOffsets(holdMs: number): readonly number[];
50
64
  /** How long the core waits for a push device to confirm a command before reading it once. */
51
65
  export declare const PUSH_CONFIRM_WINDOW_MS = 2500;
@@ -5,7 +5,7 @@
5
5
  * `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
6
6
  * runner). See docs/decisions/adr-0028.md.
7
7
  *
8
- * Coverage: 1 advance-derived caps, 89 caps with 475 state leaves, 15 caps with a declared method timeout.
8
+ * Coverage: 1 advance-derived caps, 89 caps with 476 state leaves, 15 caps with a declared method timeout.
9
9
  */
10
10
  /** A bindable scalar in a capability's runtime state. */
11
11
  export interface CapStateLeaf {
@@ -564,7 +564,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
564
564
  readonly targets: readonly [{
565
565
  readonly id: 'power';
566
566
  readonly cardinality: 'scalar';
567
- readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
567
+ readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload];
568
568
  readonly apply: 'add';
569
569
  readonly vocabularyCap: 'power-meter';
570
570
  readonly vocabularyStateField: 'power';
@@ -591,7 +591,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
591
591
  }, {
592
592
  readonly id: 'energy';
593
593
  readonly cardinality: 'scalar';
594
- readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
594
+ readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload];
595
595
  readonly apply: 'add';
596
596
  readonly vocabularyCap: 'power-meter';
597
597
  readonly vocabularyStateField: 'energy';
@@ -618,7 +618,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
618
618
  }, {
619
619
  readonly id: 'voltage';
620
620
  readonly cardinality: 'scalar';
621
- readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
621
+ readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload];
622
622
  readonly apply: 'add';
623
623
  readonly vocabularyCap: 'power-meter';
624
624
  readonly vocabularyStateField: 'voltage';
@@ -645,7 +645,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
645
645
  }, {
646
646
  readonly id: 'current';
647
647
  readonly cardinality: 'scalar';
648
- readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
648
+ readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload];
649
649
  readonly apply: 'add';
650
650
  readonly vocabularyCap: 'power-meter';
651
651
  readonly vocabularyStateField: 'current';
@@ -1,4 +1,4 @@
1
- const require_composed_stable_id = require("./composed-stable-id-BdeYe5dD.js");
1
+ const require_composed_stable_id = require("./composed-stable-id-DkF5-kuf.js");
2
2
  let zod = require("zod");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/ffmpeg/invocation.ts
@@ -1,4 +1,4 @@
1
- import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-BNTaDZEh.mjs";
1
+ import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-DIeNz933.mjs";
2
2
  import { z } from "zod";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region src/ffmpeg/invocation.ts
package/dist/index.d.ts CHANGED
@@ -470,9 +470,10 @@ export { evaluateZoneRules, type ZoneRuleEvalResult } from './utils/zone-rule-ev
470
470
  export { bindAddonActions } from './helpers/bind-addon-actions.js';
471
471
  export { isUsableTimeZone, processTimeZoneOr, usableProcessTimeZone, type ProcessTimeZoneProbe, } from './helpers/process-time-zone.js';
472
472
  export type { DeviceOption, InferenceDeviceDescriptor, RuntimeId, } from './inference/runtime-capabilities.js';
473
+ export type { NvidiaProbe } from './inference/runtime-capabilities.js';
473
474
  export type { CoralUnitAddress } from './inference/coral-units.js';
474
475
  export { coralUsableUnits, edgetpuDelegateDevice } from './inference/coral-units.js';
475
- export { defaultDeviceFor, enumerateInferenceDevices, modelFormatForRuntime, runtimeDevices, scoreRuntimes, supportedRuntimes, } from './inference/runtime-capabilities.js';
476
+ export { defaultDeviceFor, enumerateInferenceDevices, modelFormatForRuntime, runtimeDevices, scoreRuntimes, describeNvidia, supportedRuntimes, } from './inference/runtime-capabilities.js';
476
477
  export type { SiteZone } from './device/site-zone.js';
477
478
  export { SiteZoneSchema, siteZoneKey } from './device/site-zone.js';
478
479
  export type { ServerNameInfo } from './system/server-name.js';
@@ -495,5 +496,5 @@ export * from './migrations/api/migration-api-ports.js';
495
496
  export { normalizeSearchText, searchRank, type SearchRankFields } from './search/search-match.js';
496
497
  export { DEFAULT_COMMAND_HOLD_MS, MAX_COMMAND_HOLD_MS, resolveCommandHold, } from './device/command-hold.js';
497
498
  export { ONE_SHOT_HOLD_MS } from './device/cap-vocabulary/hold-limits.js';
498
- export { COMMAND_BURST_OFFSETS_MS, effectiveRefreshIntervalMs, MIN_STATE_REFRESH_INTERVAL_MS, PUSH_CONFIRM_WINDOW_MS, type StateRefreshPolicy, StateRefreshPolicySchema, type StateRefreshPush, StateRefreshPushSchema, type StateRefreshReason, StateRefreshReasonSchema, } from './device/state-refresh.js';
499
+ export { COMMAND_BURST_OFFSETS_MS, COMMAND_BURST_STEP_MS, COMMAND_BURST_TAIL_MS, commandBurstOffsets, effectiveRefreshIntervalMs, MIN_STATE_REFRESH_INTERVAL_MS, PUSH_CONFIRM_WINDOW_MS, type StateRefreshPolicy, StateRefreshPolicySchema, type StateRefreshPush, StateRefreshPushSchema, type StateRefreshReason, StateRefreshReasonSchema, } from './device/state-refresh.js';
499
500
  export type { CommandHoldOption, CommandHoldOptions, NativeCapOptions, ResolvedCommandHold, } from './device/command-hold.js';