@camstack/types 1.2.543 → 1.2.545
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 +17 -0
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/accessories.cap.d.ts +1 -1
- package/dist/capabilities/device-adoption.cap.d.ts +55 -6
- package/dist/capabilities/device-manager.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +2 -4
- package/dist/capabilities/pet-feeder.cap.d.ts +9 -1
- package/dist/capabilities/power-source.cap.d.ts +2 -2
- package/dist/client.js +1 -9
- package/dist/client.mjs +1 -9
- package/dist/{composed-stable-id-jnvhwGoH.mjs → composed-stable-id-DFNyOFzz.mjs} +1 -0
- package/dist/{composed-stable-id-BtaMj_W7.js → composed-stable-id-DrGLxjVF.js} +1 -0
- package/dist/device/cap-vocabulary/entries/camera.d.ts +1 -1
- package/dist/device/device-type.d.ts +1 -0
- package/dist/generated/addon-api.d.ts +0 -43
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +1 -3
- package/dist/generated/capability-router-map.d.ts +2 -5
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/generated/device-local-state.d.ts +1 -4
- package/dist/generated/device-proxy.d.ts +0 -3
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/{implemented-methods-C_iV6BiP.js → implemented-methods-8AU92riC.js} +1 -1
- package/dist/{implemented-methods-OitwyO1Y.mjs → implemented-methods-M5aguGon.mjs} +1 -1
- package/dist/index.js +49 -235
- package/dist/index.mjs +50 -234
- package/dist/interfaces/capability.d.ts +0 -1
- package/dist/interfaces/config-ui.d.ts +6 -0
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-Cw1uUXvl.mjs → sleep-D_NpiLFP.mjs} +2 -24
- package/dist/{sleep-PfAAmxV-.js → sleep-vzHEmsrO.js} +2 -24
- package/package.json +1 -1
- package/dist/capabilities/device-discovery.cap.d.ts +0 -160
|
@@ -28,7 +28,6 @@ import type { coverCapability } from '../capabilities/cover.cap.js';
|
|
|
28
28
|
import type { dayNightCapability } from '../capabilities/day-night.cap.js';
|
|
29
29
|
import type { detectionPipelineCapability } from '../capabilities/detection-pipeline.cap.js';
|
|
30
30
|
import type { deviceAdminLinkCapability } from '../capabilities/device-admin-link.cap.js';
|
|
31
|
-
import type { deviceDiscoveryCapability } from '../capabilities/device-discovery.cap.js';
|
|
32
31
|
import type { deviceExtensionCapability } from '../capabilities/device-extension.cap.js';
|
|
33
32
|
import type { deviceOpsCapability } from '../capabilities/device-ops.cap.js';
|
|
34
33
|
import type { deviceRunsCapability } from '../capabilities/device-runs.cap.js';
|
|
@@ -151,7 +150,6 @@ export interface DeviceProxyState {
|
|
|
151
150
|
readonly control: SliceHandle<InferRuntimeState<typeof controlCapability>>;
|
|
152
151
|
readonly cover: SliceHandle<InferRuntimeState<typeof coverCapability>>;
|
|
153
152
|
readonly dayNight: SliceHandle<InferRuntimeState<typeof dayNightCapability>>;
|
|
154
|
-
readonly deviceDiscovery: SliceHandle<InferRuntimeState<typeof deviceDiscoveryCapability>>;
|
|
155
153
|
readonly deviceStatus: SliceHandle<InferRuntimeState<typeof deviceStatusCapability>>;
|
|
156
154
|
readonly dishwasher: SliceHandle<InferRuntimeState<typeof dishwasherCapability>>;
|
|
157
155
|
readonly doNotDisturb: SliceHandle<InferRuntimeState<typeof doNotDisturbCapability>>;
|
|
@@ -260,7 +258,6 @@ export interface DeviceProxy {
|
|
|
260
258
|
readonly dayNight?: InferDeviceProxyCap<typeof dayNightCapability>;
|
|
261
259
|
readonly detectionPipeline?: InferDeviceProxyCap<typeof detectionPipelineCapability>;
|
|
262
260
|
readonly deviceAdminLink?: InferDeviceProxyCap<typeof deviceAdminLinkCapability>;
|
|
263
|
-
readonly deviceDiscovery?: InferDeviceProxyCap<typeof deviceDiscoveryCapability>;
|
|
264
261
|
readonly deviceExtension?: InferDeviceProxyCap<typeof deviceExtensionCapability>;
|
|
265
262
|
readonly deviceOps?: InferDeviceProxyCap<typeof deviceOpsCapability>;
|
|
266
263
|
readonly deviceRuns?: InferDeviceProxyCap<typeof deviceRunsCapability>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* can answer "may a rule actuate this?" without importing the schema barrel
|
|
6
6
|
* (~144MB RSS per runner, D28).
|
|
7
7
|
*
|
|
8
|
-
* Coverage:
|
|
8
|
+
* Coverage: 104 device-scoped capabilities.
|
|
9
9
|
*/
|
|
10
10
|
export declare const DEVICE_SCOPED_CAPS: ReadonlySet<string>;
|
|
11
11
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CapabilityHistoryField, CapabilityHistoryItems } from '../capabilities/capability-definition.js';
|
|
2
2
|
/**
|
|
3
3
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
4
|
-
* 44 caps with series (
|
|
4
|
+
* 44 caps with series (89 series), 36 caps answered `'none'`.
|
|
5
5
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
6
6
|
*/
|
|
7
7
|
export declare const HISTORY_CATALOG: Readonly<Record<string, Readonly<Record<string, CapabilityHistoryField>>>>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1482 method paths across 205 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { MethodRole } from '../auth/viewer-access.js';
|
|
12
12
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 612 methods carry a device reference, of which
|
|
10
10
|
* 195 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
@@ -16,7 +16,7 @@ export interface RuntimeStatePolicy {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
19
|
-
* `runtimeState`.
|
|
19
|
+
* `runtimeState`. 81 caps: 41 `restored`, 40 `session`.
|
|
20
20
|
*
|
|
21
21
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
22
22
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-
|
|
1
|
+
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-DFNyOFzz.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/ffmpeg/invocation.ts
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-vzHEmsrO.js");
|
|
3
3
|
const require_event_category = require("./event-category-BC4RRerT.js");
|
|
4
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
5
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
4
|
+
const require_composed_stable_id = require("./composed-stable-id-DrGLxjVF.js");
|
|
5
|
+
const require_implemented_methods = require("./implemented-methods-8AU92riC.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
7
7
|
const require_convert = require("./convert-BmtM6K-5.js");
|
|
8
8
|
const require_enums = require("./enums.js");
|
|
@@ -37220,7 +37220,6 @@ var accessoriesCapability = {
|
|
|
37220
37220
|
mode: "singleton",
|
|
37221
37221
|
deviceTypes: [
|
|
37222
37222
|
require_composed_stable_id.DeviceType.Camera,
|
|
37223
|
-
require_composed_stable_id.DeviceType.Hub,
|
|
37224
37223
|
require_composed_stable_id.DeviceType.Switch,
|
|
37225
37224
|
require_composed_stable_id.DeviceType.Light,
|
|
37226
37225
|
require_composed_stable_id.DeviceType.Sensor,
|
|
@@ -44991,7 +44990,6 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
44991
44990
|
cardinality: "scalar",
|
|
44992
44991
|
deviceTypes: [
|
|
44993
44992
|
require_composed_stable_id.DeviceType.Gateway,
|
|
44994
|
-
require_composed_stable_id.DeviceType.Hub,
|
|
44995
44993
|
require_composed_stable_id.DeviceType.Camera,
|
|
44996
44994
|
require_composed_stable_id.DeviceType.Sensor,
|
|
44997
44995
|
require_composed_stable_id.DeviceType.MediaPlayer,
|
|
@@ -46254,7 +46252,7 @@ async function runFanOut(calls, invoke) {
|
|
|
46254
46252
|
//#region src/generated/history-catalog.ts
|
|
46255
46253
|
/**
|
|
46256
46254
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
46257
|
-
* 44 caps with series (
|
|
46255
|
+
* 44 caps with series (89 series), 36 caps answered `'none'`.
|
|
46258
46256
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
46259
46257
|
*/
|
|
46260
46258
|
var HISTORY_CATALOG = {
|
|
@@ -46530,6 +46528,8 @@ var HISTORY_CATALOG = {
|
|
|
46530
46528
|
minIntervalMs: 3e4
|
|
46531
46529
|
} },
|
|
46532
46530
|
"pet-feeder": {
|
|
46531
|
+
"feeding": { kind: "boolean" },
|
|
46532
|
+
"eating": { kind: "boolean" },
|
|
46533
46533
|
"foodLevel": { kind: "gauge" },
|
|
46534
46534
|
"bowlFood": { kind: "gauge" },
|
|
46535
46535
|
"food1": { kind: "gauge" },
|
|
@@ -46738,7 +46738,6 @@ var HISTORY_NONE_CAPS = [
|
|
|
46738
46738
|
"color",
|
|
46739
46739
|
"control",
|
|
46740
46740
|
"day-night",
|
|
46741
|
-
"device-discovery",
|
|
46742
46741
|
"doorbell",
|
|
46743
46742
|
"event-emitter",
|
|
46744
46743
|
"feature-probe",
|
|
@@ -49579,29 +49578,37 @@ var deviceAdminLinkCapability = {
|
|
|
49579
49578
|
getAdminLink: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" }) }
|
|
49580
49579
|
};
|
|
49581
49580
|
//#endregion
|
|
49582
|
-
//#region src/capabilities/device-
|
|
49583
|
-
/**
|
|
49584
|
-
* device-
|
|
49585
|
-
*
|
|
49586
|
-
*
|
|
49587
|
-
*
|
|
49588
|
-
*
|
|
49589
|
-
*
|
|
49590
|
-
*
|
|
49591
|
-
*
|
|
49592
|
-
*
|
|
49593
|
-
*
|
|
49594
|
-
*
|
|
49595
|
-
*
|
|
49596
|
-
*
|
|
49597
|
-
*
|
|
49598
|
-
*
|
|
49599
|
-
*
|
|
49600
|
-
*
|
|
49601
|
-
|
|
49602
|
-
|
|
49603
|
-
*
|
|
49604
|
-
*
|
|
49581
|
+
//#region src/capabilities/device-adoption.cap.ts
|
|
49582
|
+
/**
|
|
49583
|
+
* `device-adoption` — generic discovery + adoption surface,
|
|
49584
|
+
* system-scoped collection (one provider per integration addon), routed
|
|
49585
|
+
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
49586
|
+
* pin model as `connection-test`. The admin UI keeps using
|
|
49587
|
+
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
49588
|
+
* successor to `ha-discovery`:
|
|
49589
|
+
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
49590
|
+
* internally) rather than a connection-specific `brokerId`, and it
|
|
49591
|
+
* OWNS the shared `DiscoveredChildDevice` candidate type
|
|
49592
|
+
* (declared below) so a single shared adoption modal renders any integration's
|
|
49593
|
+
* candidate tree.
|
|
49594
|
+
*
|
|
49595
|
+
* UI flow (Integrations page → integration detail):
|
|
49596
|
+
* 1. `listCandidates({integrationId, page, pageSize, filter})` →
|
|
49597
|
+
* paginated candidate list, each row collapsed.
|
|
49598
|
+
* 2. User expands a row → `getCandidate({integrationId,
|
|
49599
|
+
* childNativeId})` returns the single candidate (with its nested
|
|
49600
|
+
* `children`) for the accordion render.
|
|
49601
|
+
* 3. User clicks "Adopt" on one or more candidates →
|
|
49602
|
+
* `adopt({integrationId, childNativeIds, perCandidate?})`
|
|
49603
|
+
* materialises one parent CamStack device per candidate plus its
|
|
49604
|
+
* accessory children. `perCandidate[childNativeId]` carries an
|
|
49605
|
+
* optional display-name override + a `hiddenChildIds` pre-hide set
|
|
49606
|
+
* (the parent's `accessories.hiddenChildIds` gates UI visibility).
|
|
49607
|
+
* 4. User clicks "Release" → `release({integrationId, camDeviceId})`
|
|
49608
|
+
* removes the parent + every child from the kernel registry.
|
|
49609
|
+
*/
|
|
49610
|
+
/**
|
|
49611
|
+
* Status enum for a discovered device. Generic enough for
|
|
49605
49612
|
* battery cams, awake cams, and unreachable cams alike.
|
|
49606
49613
|
*/
|
|
49607
49614
|
var DiscoveredChildStatusSchema = zod.z.enum([
|
|
@@ -49618,12 +49625,12 @@ var DiscoveredChildDeviceSchema = zod.z.lazy(() => zod.z.object({
|
|
|
49618
49625
|
/** DeviceType the child should be created with on adopt. */
|
|
49619
49626
|
type: zod.z.enum(require_composed_stable_id.DeviceType),
|
|
49620
49627
|
status: DiscoveredChildStatusSchema,
|
|
49621
|
-
/** Free-form integration-specific metadata surfaced in the
|
|
49628
|
+
/** Free-form integration-specific metadata surfaced in the adoption modal. */
|
|
49622
49629
|
metadata: zod.z.object({
|
|
49623
49630
|
model: zod.z.string().optional(),
|
|
49624
49631
|
serialNumber: zod.z.string().optional(),
|
|
49625
49632
|
uid: zod.z.string().optional(),
|
|
49626
|
-
/** Reolink: 0-based channel index inside the parent NVR
|
|
49633
|
+
/** Reolink: 0-based channel index inside the parent NVR. */
|
|
49627
49634
|
rtspChannel: zod.z.number().int().nonnegative().optional(),
|
|
49628
49635
|
isBattery: zod.z.boolean().optional(),
|
|
49629
49636
|
isDoorbell: zod.z.boolean().optional(),
|
|
@@ -49639,139 +49646,24 @@ var DiscoveredChildDeviceSchema = zod.z.lazy(() => zod.z.object({
|
|
|
49639
49646
|
}).default({}),
|
|
49640
49647
|
/**
|
|
49641
49648
|
* `true` when the framework already created a child device for this
|
|
49642
|
-
* `childNativeId` under the current parent. The
|
|
49649
|
+
* `childNativeId` under the current parent. The adoption modal uses it to
|
|
49643
49650
|
* gate the Add/Remove button and surface the existing `deviceId`.
|
|
49644
49651
|
*/
|
|
49645
49652
|
alreadyAdopted: zod.z.boolean(),
|
|
49646
49653
|
/** When `alreadyAdopted=true`, the framework-assigned child device id. */
|
|
49647
49654
|
adoptedDeviceId: zod.z.number().int().nonnegative().nullable(),
|
|
49648
|
-
/** Capability names the candidate advertises — integrations populate,
|
|
49655
|
+
/** Capability names the candidate advertises — integrations populate, flat enumerations omit. */
|
|
49649
49656
|
capabilities: zod.z.array(zod.z.string()).readonly().optional(),
|
|
49650
|
-
/** Feature flags the candidate advertises — integrations populate,
|
|
49657
|
+
/** Feature flags the candidate advertises — integrations populate, flat enumerations omit. */
|
|
49651
49658
|
features: zod.z.array(zod.z.string()).readonly().optional(),
|
|
49652
49659
|
/** Upstream-system identity + rendering hints for the candidate. */
|
|
49653
49660
|
sourceInfo: SourceInfoSchema.optional(),
|
|
49654
|
-
/** Nested entity-children for accordion preview — integrations populate,
|
|
49661
|
+
/** Nested entity-children for accordion preview — integrations populate, flat enumerations omit. */
|
|
49655
49662
|
children: zod.z.array(DiscoveredChildDeviceSchema).readonly().optional(),
|
|
49656
49663
|
/** `childNativeId` of the gateway candidate in the same list this device sits behind. */
|
|
49657
49664
|
parentStableId: zod.z.string().optional()
|
|
49658
49665
|
}));
|
|
49659
49666
|
/**
|
|
49660
|
-
* Status block — populated by the integration after each
|
|
49661
|
-
* `refreshDiscovery` (or push-driven update). The runtime-state slice
|
|
49662
|
-
* is what the panel reads via the per-device proxy; `getStatus`
|
|
49663
|
-
* returns the same payload via the codegen'd auto-injection.
|
|
49664
|
-
*/
|
|
49665
|
-
var DeviceDiscoveryStatusSchema = zod.z.object({
|
|
49666
|
-
discovered: zod.z.array(DiscoveredChildDeviceSchema),
|
|
49667
|
-
/** Wall-clock ms of the last successful enumeration. */
|
|
49668
|
-
lastDiscoveryAt: zod.z.number().int().nonnegative().nullable(),
|
|
49669
|
-
/** Last error surfaced from the source (rendered as a banner). */
|
|
49670
|
-
lastError: zod.z.string().nullable()
|
|
49671
|
-
});
|
|
49672
|
-
var deviceDiscoveryCapability = {
|
|
49673
|
-
name: "device-discovery",
|
|
49674
|
-
scope: "device",
|
|
49675
|
-
deviceNative: true,
|
|
49676
|
-
mode: "singleton",
|
|
49677
|
-
deviceTypes: [require_composed_stable_id.DeviceType.Hub],
|
|
49678
|
-
status: {
|
|
49679
|
-
schema: DeviceDiscoveryStatusSchema,
|
|
49680
|
-
kind: "poll"
|
|
49681
|
-
},
|
|
49682
|
-
runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: zod.z.number().int().nonnegative() }),
|
|
49683
|
-
/**
|
|
49684
|
-
* Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
|
|
49685
|
-
*
|
|
49686
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
49687
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
49688
|
-
*/
|
|
49689
|
-
durability: "session",
|
|
49690
|
-
/**
|
|
49691
|
-
* History (D850): none — inventory.
|
|
49692
|
-
*/
|
|
49693
|
-
history: "none",
|
|
49694
|
-
methods: {
|
|
49695
|
-
/**
|
|
49696
|
-
* Snapshot of the current `discovered` list. Returns the
|
|
49697
|
-
* runtime-state cache — call `refreshDiscovery` first if a
|
|
49698
|
-
* fresh round-trip to the source is required.
|
|
49699
|
-
*/
|
|
49700
|
-
listDiscovered: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(DiscoveredChildDeviceSchema).readonly()),
|
|
49701
|
-
/**
|
|
49702
|
-
* Force the integration to re-enumerate and update the
|
|
49703
|
-
* runtime-state slice. Returns the freshly-enumerated list (also
|
|
49704
|
-
* available via `listDiscovered` post-call).
|
|
49705
|
-
*/
|
|
49706
|
-
refreshDiscovery: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(DiscoveredChildDeviceSchema).readonly(), {
|
|
49707
|
-
kind: "mutation",
|
|
49708
|
-
auth: "admin"
|
|
49709
|
-
}),
|
|
49710
|
-
/**
|
|
49711
|
-
* Promote a discovered entry to a real child device. The framework
|
|
49712
|
-
* creates the child via `kernel.devices.create()` with
|
|
49713
|
-
* `parentDeviceId = parent.id` and seeds the child's config from
|
|
49714
|
-
* `childInitialConfig` (driver-defined; usually carries channel +
|
|
49715
|
-
* uid + parent reference). Returns the kernel-assigned numeric id.
|
|
49716
|
-
*/
|
|
49717
|
-
adoptDevice: require_sleep.method(zod.z.object({
|
|
49718
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
49719
|
-
childNativeId: zod.z.string(),
|
|
49720
|
-
/** Optional override for the child's display name. */
|
|
49721
|
-
name: zod.z.string().optional()
|
|
49722
|
-
}), zod.z.object({
|
|
49723
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
49724
|
-
stableId: zod.z.string()
|
|
49725
|
-
}), {
|
|
49726
|
-
kind: "mutation",
|
|
49727
|
-
auth: "admin"
|
|
49728
|
-
}),
|
|
49729
|
-
/**
|
|
49730
|
-
* Inverse of `adoptDevice`: removes the child device from the
|
|
49731
|
-
* kernel registry. The discovered entry remains in the
|
|
49732
|
-
* enumeration (status updates resume) so the operator can re-adopt
|
|
49733
|
-
* it later without a fresh refresh.
|
|
49734
|
-
*/
|
|
49735
|
-
releaseDevice: require_sleep.method(zod.z.object({
|
|
49736
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
49737
|
-
childDeviceId: zod.z.number().int().nonnegative()
|
|
49738
|
-
}), zod.z.void(), {
|
|
49739
|
-
kind: "mutation",
|
|
49740
|
-
auth: "admin"
|
|
49741
|
-
})
|
|
49742
|
-
}
|
|
49743
|
-
};
|
|
49744
|
-
//#endregion
|
|
49745
|
-
//#region src/capabilities/device-adoption.cap.ts
|
|
49746
|
-
/**
|
|
49747
|
-
* `device-adoption` — generic discovery + adoption surface,
|
|
49748
|
-
* system-scoped collection (one provider per integration addon), routed
|
|
49749
|
-
* by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
|
|
49750
|
-
* pin model as `connection-test`. The admin UI keeps using
|
|
49751
|
-
* `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
|
|
49752
|
-
* successor to `ha-discovery`:
|
|
49753
|
-
* keyed by `integrationId` (the addon resolves integrationId → broker
|
|
49754
|
-
* internally) rather than a connection-specific `brokerId`, and it
|
|
49755
|
-
* REUSES the shared `DiscoveredChildDevice` candidate type from
|
|
49756
|
-
* `device-discovery.cap.ts` so a single shared adoption panel renders
|
|
49757
|
-
* any integration's candidate tree.
|
|
49758
|
-
*
|
|
49759
|
-
* UI flow (Integrations page → integration detail):
|
|
49760
|
-
* 1. `listCandidates({integrationId, page, pageSize, filter})` →
|
|
49761
|
-
* paginated candidate list, each row collapsed.
|
|
49762
|
-
* 2. User expands a row → `getCandidate({integrationId,
|
|
49763
|
-
* childNativeId})` returns the single candidate (with its nested
|
|
49764
|
-
* `children`) for the accordion render.
|
|
49765
|
-
* 3. User clicks "Adopt" on one or more candidates →
|
|
49766
|
-
* `adopt({integrationId, childNativeIds, perCandidate?})`
|
|
49767
|
-
* materialises one parent CamStack device per candidate plus its
|
|
49768
|
-
* accessory children. `perCandidate[childNativeId]` carries an
|
|
49769
|
-
* optional display-name override + a `hiddenChildIds` pre-hide set
|
|
49770
|
-
* (the parent's `accessories.hiddenChildIds` gates UI visibility).
|
|
49771
|
-
* 4. User clicks "Release" → `release({integrationId, camDeviceId})`
|
|
49772
|
-
* removes the parent + every child from the kernel registry.
|
|
49773
|
-
*/
|
|
49774
|
-
/**
|
|
49775
49667
|
* Provider-declared discovery *granularity* filter (the keystone of the
|
|
49776
49668
|
* single-entity-import design). A provider advertises which discovery
|
|
49777
49669
|
* granularities it supports via `listCandidateFilters`; the operator picks
|
|
@@ -76437,9 +76329,13 @@ var petFeederCapability = {
|
|
|
76437
76329
|
*/
|
|
76438
76330
|
durability: "session",
|
|
76439
76331
|
/**
|
|
76440
|
-
* History (D850): recorded series.
|
|
76332
|
+
* History (D850): recorded series. `feeding` / `eating` are the meals the
|
|
76333
|
+
* device hero's "Meals" button names — change-only booleans, so a dispense
|
|
76334
|
+
* or a pet at the bowl is one span on the history.
|
|
76441
76335
|
*/
|
|
76442
76336
|
history: { fields: {
|
|
76337
|
+
feeding: { kind: "boolean" },
|
|
76338
|
+
eating: { kind: "boolean" },
|
|
76443
76339
|
foodLevel: { kind: "gauge" },
|
|
76444
76340
|
bowlFood: { kind: "gauge" },
|
|
76445
76341
|
food1: { kind: "gauge" },
|
|
@@ -79623,7 +79519,6 @@ var PowerSourceStateSchema = zod.z.object({
|
|
|
79623
79519
|
});
|
|
79624
79520
|
var POWER_SOURCE_DEVICE_TYPES = [
|
|
79625
79521
|
require_composed_stable_id.DeviceType.Gateway,
|
|
79626
|
-
require_composed_stable_id.DeviceType.Hub,
|
|
79627
79522
|
require_composed_stable_id.DeviceType.Camera,
|
|
79628
79523
|
require_composed_stable_id.DeviceType.Sensor,
|
|
79629
79524
|
require_composed_stable_id.DeviceType.MediaPlayer,
|
|
@@ -91472,7 +91367,6 @@ var CAPABILITY_NAMES = {
|
|
|
91472
91367
|
deviceAdminLink: "device-admin-link",
|
|
91473
91368
|
deviceAdoption: "device-adoption",
|
|
91474
91369
|
deviceCredentials: "device-credentials",
|
|
91475
|
-
deviceDiscovery: "device-discovery",
|
|
91476
91370
|
deviceExport: "device-export",
|
|
91477
91371
|
deviceExtension: "device-extension",
|
|
91478
91372
|
deviceHistory: "device-history",
|
|
@@ -91843,10 +91737,6 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
91843
91737
|
key: "deviceCredentials",
|
|
91844
91738
|
name: "device-credentials"
|
|
91845
91739
|
},
|
|
91846
|
-
{
|
|
91847
|
-
key: "deviceDiscovery",
|
|
91848
|
-
name: "device-discovery"
|
|
91849
|
-
},
|
|
91850
91740
|
{
|
|
91851
91741
|
key: "deviceExport",
|
|
91852
91742
|
name: "device-export"
|
|
@@ -92516,7 +92406,6 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
92516
92406
|
deviceAdminLinkCapability,
|
|
92517
92407
|
deviceAdoptionCapability,
|
|
92518
92408
|
deviceCredentialsCapability,
|
|
92519
|
-
deviceDiscoveryCapability,
|
|
92520
92409
|
deviceExportCapability,
|
|
92521
92410
|
deviceExtensionCapability,
|
|
92522
92411
|
deviceHistoryCapability,
|
|
@@ -100094,7 +99983,6 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
100094
99983
|
control: controlCapability,
|
|
100095
99984
|
cover: coverCapability,
|
|
100096
99985
|
dayNight: dayNightCapability,
|
|
100097
|
-
deviceDiscovery: deviceDiscoveryCapability,
|
|
100098
99986
|
deviceStatus: deviceStatusCapability,
|
|
100099
99987
|
dishwasher: dishwasherCapability,
|
|
100100
99988
|
doNotDisturb: doNotDisturbCapability,
|
|
@@ -106358,7 +106246,6 @@ var HERO_CAP_COVERAGE = {
|
|
|
106358
106246
|
"day-night": { none: NOT_A_HERO_FACT },
|
|
106359
106247
|
"detection-pipeline": { none: NOT_A_HERO_FACT },
|
|
106360
106248
|
"device-admin-link": { none: NOT_A_HERO_FACT },
|
|
106361
|
-
"device-discovery": { none: NOT_A_HERO_FACT },
|
|
106362
106249
|
"device-extension": { none: NOT_A_HERO_FACT },
|
|
106363
106250
|
"device-ops": { none: NOT_A_HERO_FACT },
|
|
106364
106251
|
"device-runs": { none: NOT_A_HERO_FACT },
|
|
@@ -108289,41 +108176,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
108289
108176
|
access: "create",
|
|
108290
108177
|
role: "admin"
|
|
108291
108178
|
},
|
|
108292
|
-
"deviceDiscovery.adoptDevice": {
|
|
108293
|
-
capName: "device-discovery",
|
|
108294
|
-
capScope: "device",
|
|
108295
|
-
addonId: null,
|
|
108296
|
-
access: "create",
|
|
108297
|
-
role: "admin"
|
|
108298
|
-
},
|
|
108299
|
-
"deviceDiscovery.getStatus": {
|
|
108300
|
-
capName: "device-discovery",
|
|
108301
|
-
capScope: "device",
|
|
108302
|
-
addonId: null,
|
|
108303
|
-
access: "view",
|
|
108304
|
-
role: "viewer"
|
|
108305
|
-
},
|
|
108306
|
-
"deviceDiscovery.listDiscovered": {
|
|
108307
|
-
capName: "device-discovery",
|
|
108308
|
-
capScope: "device",
|
|
108309
|
-
addonId: null,
|
|
108310
|
-
access: "view",
|
|
108311
|
-
role: "viewer"
|
|
108312
|
-
},
|
|
108313
|
-
"deviceDiscovery.refreshDiscovery": {
|
|
108314
|
-
capName: "device-discovery",
|
|
108315
|
-
capScope: "device",
|
|
108316
|
-
addonId: null,
|
|
108317
|
-
access: "create",
|
|
108318
|
-
role: "admin"
|
|
108319
|
-
},
|
|
108320
|
-
"deviceDiscovery.releaseDevice": {
|
|
108321
|
-
capName: "device-discovery",
|
|
108322
|
-
capScope: "device",
|
|
108323
|
-
addonId: null,
|
|
108324
|
-
access: "create",
|
|
108325
|
-
role: "admin"
|
|
108326
|
-
},
|
|
108327
108179
|
"deviceExport.applyDeviceSettingsPatch": {
|
|
108328
108180
|
capName: "device-export",
|
|
108329
108181
|
capScope: "system",
|
|
@@ -116907,7 +116759,6 @@ var KNOWN_CAP_NAMES = [
|
|
|
116907
116759
|
"device-admin-link",
|
|
116908
116760
|
"device-adoption",
|
|
116909
116761
|
"device-credentials",
|
|
116910
|
-
"device-discovery",
|
|
116911
116762
|
"device-export",
|
|
116912
116763
|
"device-extension",
|
|
116913
116764
|
"device-history",
|
|
@@ -117088,7 +116939,6 @@ var DEVICE_CAP_NAMES = [
|
|
|
117088
116939
|
"day-night",
|
|
117089
116940
|
"detection-pipeline",
|
|
117090
116941
|
"device-admin-link",
|
|
117091
|
-
"device-discovery",
|
|
117092
116942
|
"device-extension",
|
|
117093
116943
|
"device-ops",
|
|
117094
116944
|
"device-runs",
|
|
@@ -119181,7 +119031,6 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
119181
119031
|
"cover",
|
|
119182
119032
|
"day-night",
|
|
119183
119033
|
"device-adoption",
|
|
119184
|
-
"device-discovery",
|
|
119185
119034
|
"device-export",
|
|
119186
119035
|
"device-status",
|
|
119187
119036
|
"dishwasher",
|
|
@@ -119678,35 +119527,6 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
119678
119527
|
form: "single",
|
|
119679
119528
|
optional: false
|
|
119680
119529
|
}],
|
|
119681
|
-
"deviceDiscovery.adoptDevice": [{
|
|
119682
|
-
name: "deviceId",
|
|
119683
|
-
form: "single",
|
|
119684
|
-
optional: false
|
|
119685
|
-
}],
|
|
119686
|
-
"deviceDiscovery.getStatus": [{
|
|
119687
|
-
name: "deviceId",
|
|
119688
|
-
form: "single",
|
|
119689
|
-
optional: false
|
|
119690
|
-
}],
|
|
119691
|
-
"deviceDiscovery.listDiscovered": [{
|
|
119692
|
-
name: "deviceId",
|
|
119693
|
-
form: "single",
|
|
119694
|
-
optional: false
|
|
119695
|
-
}],
|
|
119696
|
-
"deviceDiscovery.refreshDiscovery": [{
|
|
119697
|
-
name: "deviceId",
|
|
119698
|
-
form: "single",
|
|
119699
|
-
optional: false
|
|
119700
|
-
}],
|
|
119701
|
-
"deviceDiscovery.releaseDevice": [{
|
|
119702
|
-
name: "childDeviceId",
|
|
119703
|
-
form: "single",
|
|
119704
|
-
optional: false
|
|
119705
|
-
}, {
|
|
119706
|
-
name: "deviceId",
|
|
119707
|
-
form: "single",
|
|
119708
|
-
optional: false
|
|
119709
|
-
}],
|
|
119710
119530
|
"deviceExport.applyDeviceSettingsPatch": [{
|
|
119711
119531
|
name: "deviceId",
|
|
119712
119532
|
form: "single",
|
|
@@ -122602,7 +122422,7 @@ function getCapsByProviderKind(kind) {
|
|
|
122602
122422
|
//#region src/generated/runtime-state-durability.ts
|
|
122603
122423
|
/**
|
|
122604
122424
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
122605
|
-
* `runtimeState`.
|
|
122425
|
+
* `runtimeState`. 81 caps: 41 `restored`, 40 `session`.
|
|
122606
122426
|
*
|
|
122607
122427
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
122608
122428
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -122681,10 +122501,6 @@ var RUNTIME_STATE_POLICY = {
|
|
|
122681
122501
|
durability: "restored",
|
|
122682
122502
|
volatileFields: ["lastFetchedAt"]
|
|
122683
122503
|
},
|
|
122684
|
-
"device-discovery": {
|
|
122685
|
-
durability: "session",
|
|
122686
|
-
volatileFields: []
|
|
122687
|
-
},
|
|
122688
122504
|
"device-status": {
|
|
122689
122505
|
durability: "restored",
|
|
122690
122506
|
volatileFields: ["lastChangedAt"]
|
|
@@ -136809,7 +136625,6 @@ exports.DeviceConfig = DeviceConfig;
|
|
|
136809
136625
|
exports.DeviceCredentialSchema = DeviceCredentialSchema;
|
|
136810
136626
|
exports.DeviceCredentialStatusSchema = DeviceCredentialStatusSchema;
|
|
136811
136627
|
exports.DeviceDataEntrySchema = DeviceDataEntrySchema;
|
|
136812
|
-
exports.DeviceDiscoveryStatusSchema = DeviceDiscoveryStatusSchema;
|
|
136813
136628
|
exports.DeviceEnrollProofSchema = DeviceEnrollProofSchema;
|
|
136814
136629
|
exports.DeviceExportExposeInputSchema = ExposeInputSchema;
|
|
136815
136630
|
exports.DeviceExportInstancePinSchema = InstancePinSchema;
|
|
@@ -139026,7 +138841,6 @@ exports.deviceAttentionKind = deviceAttentionKind;
|
|
|
139026
138841
|
exports.deviceBackendToFormat = deviceBackendToFormat;
|
|
139027
138842
|
exports.deviceCredentialsCapability = deviceCredentialsCapability;
|
|
139028
138843
|
exports.deviceCustomAction = require_sleep.deviceCustomAction;
|
|
139029
|
-
exports.deviceDiscoveryCapability = deviceDiscoveryCapability;
|
|
139030
138844
|
exports.deviceDoFamily = deviceDoFamily;
|
|
139031
138845
|
exports.deviceExportCapability = deviceExportCapability;
|
|
139032
138846
|
exports.deviceExportStatusInstanceOf = statusInstanceOf;
|