@camstack/types 1.1.11 → 1.1.13
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/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/addons.cap.d.ts +3 -3
- package/dist/capabilities/climate-control.cap.d.ts +9 -9
- package/dist/capabilities/control.cap.d.ts +4 -4
- package/dist/capabilities/device-manager.cap.d.ts +70 -0
- package/dist/capabilities/device-provider.cap.d.ts +27 -3
- package/dist/capabilities/local-network.cap.d.ts +1 -1
- package/dist/capabilities/media-player.cap.d.ts +4 -4
- package/dist/capabilities/mesh-network.cap.d.ts +3 -3
- package/dist/capabilities/network-access.cap.d.ts +7 -7
- package/dist/capabilities/stream-broker.cap.d.ts +5 -5
- package/dist/capabilities/toast.cap.d.ts +2 -2
- package/dist/capabilities/webrtc-session.cap.d.ts +2 -2
- package/dist/device/base-device-provider.d.ts +17 -5
- package/dist/device/device-type.d.ts +6 -0
- package/dist/generated/addon-api.d.ts +220 -2
- package/dist/generated/cap-status-types.d.ts +64 -64
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.js +131 -5
- package/dist/index.mjs +131 -5
- package/dist/interfaces/addon.d.ts +16 -0
- package/dist/interfaces/capability.d.ts +11 -11
- package/dist/lifecycle/job.d.ts +3 -3
- package/dist/{sleep-CKc4LLbD.js → sleep-BQzZ7joF.js} +6 -0
- package/dist/{sleep-B3AOslwX.mjs → sleep-C2M2zF7x.mjs} +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BQzZ7joF.js");
|
|
3
3
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region src/health/wiring-health.ts
|
|
@@ -4216,7 +4216,7 @@ var climateControlCapability = {
|
|
|
4216
4216
|
scope: "device",
|
|
4217
4217
|
deviceNative: true,
|
|
4218
4218
|
mode: "singleton",
|
|
4219
|
-
deviceTypes: [require_sleep.DeviceType.Thermostat],
|
|
4219
|
+
deviceTypes: [require_sleep.DeviceType.Thermostat, require_sleep.DeviceType.Climate],
|
|
4220
4220
|
methods: {
|
|
4221
4221
|
setMode: require_sleep.method(zod.z.object({
|
|
4222
4222
|
deviceId: zod.z.number().int().nonnegative(),
|
|
@@ -9427,10 +9427,30 @@ var deviceProviderCapability = {
|
|
|
9427
9427
|
type: zod.z.string()
|
|
9428
9428
|
}))),
|
|
9429
9429
|
supportsDiscovery: require_sleep.method(zod.z.object({}), zod.z.boolean()),
|
|
9430
|
-
|
|
9430
|
+
/**
|
|
9431
|
+
* Run a network scan. `params` carries optional provider-specific scan
|
|
9432
|
+
* inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
|
|
9433
|
+
* shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
|
|
9434
|
+
* (provider uses its local-network default).
|
|
9435
|
+
*/
|
|
9436
|
+
discoverDevices: require_sleep.method(zod.z.object({ params: zod.z.record(zod.z.string(), zod.z.unknown()).optional() }), zod.z.array(DiscoveryCandidateSchema), {
|
|
9431
9437
|
kind: "mutation",
|
|
9432
9438
|
auth: "admin"
|
|
9433
9439
|
}),
|
|
9440
|
+
/**
|
|
9441
|
+
* Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
|
|
9442
|
+
* provider accepts (e.g. Gree's broadcast address for a different subnet).
|
|
9443
|
+
* `null` when the provider takes no extra scan params — the generic
|
|
9444
|
+
* aggregated scan never renders this; the per-integration scan does.
|
|
9445
|
+
*/
|
|
9446
|
+
getDiscoveryParamsSchema: require_sleep.method(zod.z.object({}), CreationSchemaOutputSchema),
|
|
9447
|
+
/**
|
|
9448
|
+
* The DeviceType this provider creates via manual add (Camera for
|
|
9449
|
+
* Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
|
|
9450
|
+
* provider does not support manual creation. Lets the Add-Device dialog
|
|
9451
|
+
* pick the right type instead of assuming Camera.
|
|
9452
|
+
*/
|
|
9453
|
+
getManualCreationType: require_sleep.method(zod.z.object({}), zod.z.object({ deviceType: zod.z.enum(require_sleep.DeviceType).nullable() })),
|
|
9434
9454
|
adoptDiscoveredDevice: require_sleep.method(zod.z.object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
|
|
9435
9455
|
kind: "mutation",
|
|
9436
9456
|
auth: "admin"
|
|
@@ -9556,9 +9576,23 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
|
|
|
9556
9576
|
async supportsDiscovery() {
|
|
9557
9577
|
return false;
|
|
9558
9578
|
}
|
|
9559
|
-
async discoverDevices() {
|
|
9579
|
+
async discoverDevices(_input) {
|
|
9560
9580
|
return [];
|
|
9561
9581
|
}
|
|
9582
|
+
/** Extra per-scan input form (e.g. a broadcast address for another subnet).
|
|
9583
|
+
* Null = no extra params. Override in providers that support scoped scans. */
|
|
9584
|
+
async getDiscoveryParamsSchema() {
|
|
9585
|
+
return null;
|
|
9586
|
+
}
|
|
9587
|
+
/**
|
|
9588
|
+
* The DeviceType this provider creates via manual add — derived from the
|
|
9589
|
+
* `deviceClasses` map (first registered type). `null` when manual creation is
|
|
9590
|
+
* unsupported. Lets the Add-Device dialog pick the right type per provider.
|
|
9591
|
+
*/
|
|
9592
|
+
async getManualCreationType() {
|
|
9593
|
+
if (!await this.supportsManualCreation()) return { deviceType: null };
|
|
9594
|
+
return { deviceType: Object.values(require_sleep.DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
|
|
9595
|
+
}
|
|
9562
9596
|
async adoptDiscoveredDevice(_input) {
|
|
9563
9597
|
throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
|
|
9564
9598
|
}
|
|
@@ -10169,11 +10203,17 @@ function createSystemProxy(api) {
|
|
|
10169
10203
|
getCreationSchema: (input) => dispatch("deviceManager", "getCreationSchema", "query", input),
|
|
10170
10204
|
createDevice: (input) => dispatch("deviceManager", "createDevice", "mutation", input),
|
|
10171
10205
|
testCreationField: (input) => dispatch("deviceManager", "testCreationField", "mutation", input),
|
|
10206
|
+
adoptionListCandidateFilters: (input) => dispatch("deviceManager", "adoptionListCandidateFilters", "query", input),
|
|
10172
10207
|
adoptionListCandidates: (input) => dispatch("deviceManager", "adoptionListCandidates", "query", input),
|
|
10173
10208
|
adoptionRefresh: (input) => dispatch("deviceManager", "adoptionRefresh", "mutation", input),
|
|
10174
10209
|
adoptionAdopt: (input) => dispatch("deviceManager", "adoptionAdopt", "mutation", input),
|
|
10175
10210
|
adoptionRelease: (input) => dispatch("deviceManager", "adoptionRelease", "mutation", input),
|
|
10176
|
-
adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input)
|
|
10211
|
+
adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input),
|
|
10212
|
+
discoveryProviders: (input) => dispatch("deviceManager", "discoveryProviders", "query", input),
|
|
10213
|
+
discoverAllProviders: (input) => dispatch("deviceManager", "discoverAllProviders", "mutation", input),
|
|
10214
|
+
discoverProvider: (input) => dispatch("deviceManager", "discoverProvider", "mutation", input),
|
|
10215
|
+
providerCreationType: (input) => dispatch("deviceManager", "providerCreationType", "query", input),
|
|
10216
|
+
providerDiscoveryParamsSchema: (input) => dispatch("deviceManager", "providerDiscoveryParamsSchema", "query", input)
|
|
10177
10217
|
},
|
|
10178
10218
|
deviceProvider: {
|
|
10179
10219
|
start: (input) => dispatch("deviceProvider", "start", "mutation", input),
|
|
@@ -10182,6 +10222,8 @@ function createSystemProxy(api) {
|
|
|
10182
10222
|
getDevices: (input) => dispatch("deviceProvider", "getDevices", "query", input),
|
|
10183
10223
|
supportsDiscovery: (input) => dispatch("deviceProvider", "supportsDiscovery", "query", input),
|
|
10184
10224
|
discoverDevices: (input) => dispatch("deviceProvider", "discoverDevices", "mutation", input),
|
|
10225
|
+
getDiscoveryParamsSchema: (input) => dispatch("deviceProvider", "getDiscoveryParamsSchema", "query", input),
|
|
10226
|
+
getManualCreationType: (input) => dispatch("deviceProvider", "getManualCreationType", "query", input),
|
|
10185
10227
|
adoptDiscoveredDevice: (input) => dispatch("deviceProvider", "adoptDiscoveredDevice", "mutation", input),
|
|
10186
10228
|
supportsManualCreation: (input) => dispatch("deviceProvider", "supportsManualCreation", "query", input),
|
|
10187
10229
|
getChildCreationSchema: (input) => dispatch("deviceProvider", "getChildCreationSchema", "query", input),
|
|
@@ -13651,6 +13693,12 @@ var deviceManagerCapability = {
|
|
|
13651
13693
|
kind: "mutation",
|
|
13652
13694
|
auth: "admin"
|
|
13653
13695
|
}),
|
|
13696
|
+
/** List candidate filter chips for an integration via its device-adoption
|
|
13697
|
+
* provider — addonId-routed so it never hits the singleton shadow. */
|
|
13698
|
+
adoptionListCandidateFilters: require_sleep.method(zod.z.object({
|
|
13699
|
+
addonId: zod.z.string(),
|
|
13700
|
+
integrationId: zod.z.string()
|
|
13701
|
+
}), zod.z.object({ filters: zod.z.array(AdoptionFilterSchema) }), { auth: "admin" }),
|
|
13654
13702
|
/** List adoption candidates for an integration via its device-adoption provider. */
|
|
13655
13703
|
adoptionListCandidates: require_sleep.method(ListCandidatesInputSchema.extend({ addonId: zod.z.string() }), ListCandidatesOutputSchema, { auth: "admin" }),
|
|
13656
13704
|
/** Trigger a discovery refresh on the integration's device-adoption provider. */
|
|
@@ -13681,6 +13729,36 @@ var deviceManagerCapability = {
|
|
|
13681
13729
|
kind: "mutation",
|
|
13682
13730
|
auth: "admin"
|
|
13683
13731
|
}),
|
|
13732
|
+
/** Addons whose device-provider reports `supportsDiscovery` (for the modal). */
|
|
13733
|
+
discoveryProviders: require_sleep.method(zod.z.object({}), zod.z.object({ providers: zod.z.array(zod.z.object({
|
|
13734
|
+
addonId: zod.z.string(),
|
|
13735
|
+
label: zod.z.string()
|
|
13736
|
+
})).readonly() }), { auth: "admin" }),
|
|
13737
|
+
/** Scan EVERY discovery-capable provider; returns candidates grouped by addon. */
|
|
13738
|
+
discoverAllProviders: require_sleep.method(zod.z.object({}), zod.z.object({ groups: zod.z.array(zod.z.object({
|
|
13739
|
+
addonId: zod.z.string(),
|
|
13740
|
+
label: zod.z.string(),
|
|
13741
|
+
candidates: zod.z.array(DiscoveryCandidateSchema).readonly(),
|
|
13742
|
+
error: zod.z.string().nullable()
|
|
13743
|
+
})).readonly() }), {
|
|
13744
|
+
kind: "mutation",
|
|
13745
|
+
auth: "admin"
|
|
13746
|
+
}),
|
|
13747
|
+
/** Scan ONE provider with optional provider-specific params (subnet /
|
|
13748
|
+
* broadcast addr) — the per-integration "Scan network" surface. */
|
|
13749
|
+
discoverProvider: require_sleep.method(zod.z.object({
|
|
13750
|
+
addonId: zod.z.string(),
|
|
13751
|
+
params: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
13752
|
+
}), zod.z.object({ candidates: zod.z.array(DiscoveryCandidateSchema).readonly() }), {
|
|
13753
|
+
kind: "mutation",
|
|
13754
|
+
auth: "admin"
|
|
13755
|
+
}),
|
|
13756
|
+
/** The device type a provider creates via manual add (Camera/Container/Hub),
|
|
13757
|
+
* so the Add-Device dialog uses the right type instead of assuming Camera. */
|
|
13758
|
+
providerCreationType: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.object({ deviceType: zod.z.enum(require_sleep.DeviceType).nullable() }), { auth: "admin" }),
|
|
13759
|
+
/** A provider's extra per-scan param form (ConfigUISchema) for the
|
|
13760
|
+
* per-integration scan, or null when it takes none. */
|
|
13761
|
+
providerDiscoveryParamsSchema: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.unknown(), { auth: "admin" }),
|
|
13684
13762
|
/**
|
|
13685
13763
|
* Test a field value on an existing device (e.g. probe an RTSP URL).
|
|
13686
13764
|
* Routes through the device-provider for the owning addon.
|
|
@@ -21865,6 +21943,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21865
21943
|
addonId: null,
|
|
21866
21944
|
access: "create"
|
|
21867
21945
|
},
|
|
21946
|
+
"deviceManager.adoptionListCandidateFilters": {
|
|
21947
|
+
capName: "device-manager",
|
|
21948
|
+
capScope: "system",
|
|
21949
|
+
addonId: null,
|
|
21950
|
+
access: "view"
|
|
21951
|
+
},
|
|
21868
21952
|
"deviceManager.adoptionListCandidates": {
|
|
21869
21953
|
capName: "device-manager",
|
|
21870
21954
|
capScope: "system",
|
|
@@ -21913,12 +21997,30 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21913
21997
|
addonId: null,
|
|
21914
21998
|
access: "create"
|
|
21915
21999
|
},
|
|
22000
|
+
"deviceManager.discoverAllProviders": {
|
|
22001
|
+
capName: "device-manager",
|
|
22002
|
+
capScope: "system",
|
|
22003
|
+
addonId: null,
|
|
22004
|
+
access: "create"
|
|
22005
|
+
},
|
|
21916
22006
|
"deviceManager.discoverDevices": {
|
|
21917
22007
|
capName: "device-manager",
|
|
21918
22008
|
capScope: "system",
|
|
21919
22009
|
addonId: null,
|
|
21920
22010
|
access: "create"
|
|
21921
22011
|
},
|
|
22012
|
+
"deviceManager.discoverProvider": {
|
|
22013
|
+
capName: "device-manager",
|
|
22014
|
+
capScope: "system",
|
|
22015
|
+
addonId: null,
|
|
22016
|
+
access: "create"
|
|
22017
|
+
},
|
|
22018
|
+
"deviceManager.discoveryProviders": {
|
|
22019
|
+
capName: "device-manager",
|
|
22020
|
+
capScope: "system",
|
|
22021
|
+
addonId: null,
|
|
22022
|
+
access: "view"
|
|
22023
|
+
},
|
|
21922
22024
|
"deviceManager.enable": {
|
|
21923
22025
|
capName: "device-manager",
|
|
21924
22026
|
capScope: "system",
|
|
@@ -22069,6 +22171,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22069
22171
|
addonId: null,
|
|
22070
22172
|
access: "create"
|
|
22071
22173
|
},
|
|
22174
|
+
"deviceManager.providerCreationType": {
|
|
22175
|
+
capName: "device-manager",
|
|
22176
|
+
capScope: "system",
|
|
22177
|
+
addonId: null,
|
|
22178
|
+
access: "view"
|
|
22179
|
+
},
|
|
22180
|
+
"deviceManager.providerDiscoveryParamsSchema": {
|
|
22181
|
+
capName: "device-manager",
|
|
22182
|
+
capScope: "system",
|
|
22183
|
+
addonId: null,
|
|
22184
|
+
access: "view"
|
|
22185
|
+
},
|
|
22072
22186
|
"deviceManager.registerDevice": {
|
|
22073
22187
|
capName: "device-manager",
|
|
22074
22188
|
capScope: "system",
|
|
@@ -22285,6 +22399,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22285
22399
|
addonId: null,
|
|
22286
22400
|
access: "view"
|
|
22287
22401
|
},
|
|
22402
|
+
"deviceProvider.getDiscoveryParamsSchema": {
|
|
22403
|
+
capName: "device-provider",
|
|
22404
|
+
capScope: "system",
|
|
22405
|
+
addonId: null,
|
|
22406
|
+
access: "view"
|
|
22407
|
+
},
|
|
22408
|
+
"deviceProvider.getManualCreationType": {
|
|
22409
|
+
capName: "device-provider",
|
|
22410
|
+
capScope: "system",
|
|
22411
|
+
addonId: null,
|
|
22412
|
+
access: "view"
|
|
22413
|
+
},
|
|
22288
22414
|
"deviceProvider.getStatus": {
|
|
22289
22415
|
capName: "device-provider",
|
|
22290
22416
|
capScope: "system",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SubscribeAudioChunksResultSchema, A as ReadinessRegistry, B as CamStreamResolutionSchema, C as asJsonObject, D as parseJsonObject, E as parseJsonArray, F as BrokerStatsSchema, G as FrameHandleFormatSchema, H as DecodedAudioChunkSchema, I as BrokerStatusSchema, J as ProfileSlotSchema, K as FrameHandleSchema, L as CAM_PROFILE_ORDER, M as emitDownForOwnedCaps, N as readinessKey, O as parseJsonUnknown, P as scopeKey, Q as SubscribeAudioChunksInputSchema, R as CamProfileSchema, S as asJsonArray, T as asString, U as DecodedFrameSchema, V as CameraStreamSchema, W as EncodedPacketSchema, X as StreamSourceEntrySchema, Y as ProfileSlotStatusSchema, Z as StreamSourceSchema, _ as ChargingStatus, a as adminUiCapability, at as selectAssignedProfileSlots, b as DeviceType, c as createMirrorSource, ct as createDurableState, d as DEVICE_STATUS_METHOD, dt as isEvent, et as SubscribeFramesInputSchema, f as event, ft as WELL_KNOWN_TABS, g as resolveCapMount, gt as DisposerChain, h as method, ht as EventCategory, i as deviceOpsCapability, it as parseProfileBrokerId, j as ReadinessTimeoutError, k as DATAPLANE_SECRET_HEADER, l as createSliceHandle, lt as createEvent, m as isDeviceConfigCap, mt as hydrateSchema, n as sleepCancellable, nt as makeProfileBrokerId, o as createDeviceProxy, ot as BaseAddon, p as expandCapMethods, pt as WELL_KNOWN_TAB_MAP, q as ProfileRtspEntrySchema, r as RawStateResultSchema, rt as makeSourceBrokerId, s as createLazyTrpcSource, st as normalizeAddonInitResult, t as sleep, tt as SubscribeFramesResultSchema, u as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ut as emitReadiness, v as DeviceFeature, w as asNumber, x as asBoolean, y as DeviceRole, z as CamStreamKindSchema } from "./sleep-
|
|
1
|
+
import { $ as SubscribeAudioChunksResultSchema, A as ReadinessRegistry, B as CamStreamResolutionSchema, C as asJsonObject, D as parseJsonObject, E as parseJsonArray, F as BrokerStatsSchema, G as FrameHandleFormatSchema, H as DecodedAudioChunkSchema, I as BrokerStatusSchema, J as ProfileSlotSchema, K as FrameHandleSchema, L as CAM_PROFILE_ORDER, M as emitDownForOwnedCaps, N as readinessKey, O as parseJsonUnknown, P as scopeKey, Q as SubscribeAudioChunksInputSchema, R as CamProfileSchema, S as asJsonArray, T as asString, U as DecodedFrameSchema, V as CameraStreamSchema, W as EncodedPacketSchema, X as StreamSourceEntrySchema, Y as ProfileSlotStatusSchema, Z as StreamSourceSchema, _ as ChargingStatus, a as adminUiCapability, at as selectAssignedProfileSlots, b as DeviceType, c as createMirrorSource, ct as createDurableState, d as DEVICE_STATUS_METHOD, dt as isEvent, et as SubscribeFramesInputSchema, f as event, ft as WELL_KNOWN_TABS, g as resolveCapMount, gt as DisposerChain, h as method, ht as EventCategory, i as deviceOpsCapability, it as parseProfileBrokerId, j as ReadinessTimeoutError, k as DATAPLANE_SECRET_HEADER, l as createSliceHandle, lt as createEvent, m as isDeviceConfigCap, mt as hydrateSchema, n as sleepCancellable, nt as makeProfileBrokerId, o as createDeviceProxy, ot as BaseAddon, p as expandCapMethods, pt as WELL_KNOWN_TAB_MAP, q as ProfileRtspEntrySchema, r as RawStateResultSchema, rt as makeSourceBrokerId, s as createLazyTrpcSource, st as normalizeAddonInitResult, t as sleep, tt as SubscribeFramesResultSchema, u as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ut as emitReadiness, v as DeviceFeature, w as asNumber, x as asBoolean, y as DeviceRole, z as CamStreamKindSchema } from "./sleep-C2M2zF7x.mjs";
|
|
2
2
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/health/wiring-health.ts
|
|
@@ -4215,7 +4215,7 @@ var climateControlCapability = {
|
|
|
4215
4215
|
scope: "device",
|
|
4216
4216
|
deviceNative: true,
|
|
4217
4217
|
mode: "singleton",
|
|
4218
|
-
deviceTypes: [DeviceType.Thermostat],
|
|
4218
|
+
deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
|
|
4219
4219
|
methods: {
|
|
4220
4220
|
setMode: method(z.object({
|
|
4221
4221
|
deviceId: z.number().int().nonnegative(),
|
|
@@ -9426,10 +9426,30 @@ var deviceProviderCapability = {
|
|
|
9426
9426
|
type: z.string()
|
|
9427
9427
|
}))),
|
|
9428
9428
|
supportsDiscovery: method(z.object({}), z.boolean()),
|
|
9429
|
-
|
|
9429
|
+
/**
|
|
9430
|
+
* Run a network scan. `params` carries optional provider-specific scan
|
|
9431
|
+
* inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
|
|
9432
|
+
* shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
|
|
9433
|
+
* (provider uses its local-network default).
|
|
9434
|
+
*/
|
|
9435
|
+
discoverDevices: method(z.object({ params: z.record(z.string(), z.unknown()).optional() }), z.array(DiscoveryCandidateSchema), {
|
|
9430
9436
|
kind: "mutation",
|
|
9431
9437
|
auth: "admin"
|
|
9432
9438
|
}),
|
|
9439
|
+
/**
|
|
9440
|
+
* Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
|
|
9441
|
+
* provider accepts (e.g. Gree's broadcast address for a different subnet).
|
|
9442
|
+
* `null` when the provider takes no extra scan params — the generic
|
|
9443
|
+
* aggregated scan never renders this; the per-integration scan does.
|
|
9444
|
+
*/
|
|
9445
|
+
getDiscoveryParamsSchema: method(z.object({}), CreationSchemaOutputSchema),
|
|
9446
|
+
/**
|
|
9447
|
+
* The DeviceType this provider creates via manual add (Camera for
|
|
9448
|
+
* Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
|
|
9449
|
+
* provider does not support manual creation. Lets the Add-Device dialog
|
|
9450
|
+
* pick the right type instead of assuming Camera.
|
|
9451
|
+
*/
|
|
9452
|
+
getManualCreationType: method(z.object({}), z.object({ deviceType: z.enum(DeviceType).nullable() })),
|
|
9433
9453
|
adoptDiscoveredDevice: method(z.object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
|
|
9434
9454
|
kind: "mutation",
|
|
9435
9455
|
auth: "admin"
|
|
@@ -9555,9 +9575,23 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
9555
9575
|
async supportsDiscovery() {
|
|
9556
9576
|
return false;
|
|
9557
9577
|
}
|
|
9558
|
-
async discoverDevices() {
|
|
9578
|
+
async discoverDevices(_input) {
|
|
9559
9579
|
return [];
|
|
9560
9580
|
}
|
|
9581
|
+
/** Extra per-scan input form (e.g. a broadcast address for another subnet).
|
|
9582
|
+
* Null = no extra params. Override in providers that support scoped scans. */
|
|
9583
|
+
async getDiscoveryParamsSchema() {
|
|
9584
|
+
return null;
|
|
9585
|
+
}
|
|
9586
|
+
/**
|
|
9587
|
+
* The DeviceType this provider creates via manual add — derived from the
|
|
9588
|
+
* `deviceClasses` map (first registered type). `null` when manual creation is
|
|
9589
|
+
* unsupported. Lets the Add-Device dialog pick the right type per provider.
|
|
9590
|
+
*/
|
|
9591
|
+
async getManualCreationType() {
|
|
9592
|
+
if (!await this.supportsManualCreation()) return { deviceType: null };
|
|
9593
|
+
return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
|
|
9594
|
+
}
|
|
9561
9595
|
async adoptDiscoveredDevice(_input) {
|
|
9562
9596
|
throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
|
|
9563
9597
|
}
|
|
@@ -10168,11 +10202,17 @@ function createSystemProxy(api) {
|
|
|
10168
10202
|
getCreationSchema: (input) => dispatch("deviceManager", "getCreationSchema", "query", input),
|
|
10169
10203
|
createDevice: (input) => dispatch("deviceManager", "createDevice", "mutation", input),
|
|
10170
10204
|
testCreationField: (input) => dispatch("deviceManager", "testCreationField", "mutation", input),
|
|
10205
|
+
adoptionListCandidateFilters: (input) => dispatch("deviceManager", "adoptionListCandidateFilters", "query", input),
|
|
10171
10206
|
adoptionListCandidates: (input) => dispatch("deviceManager", "adoptionListCandidates", "query", input),
|
|
10172
10207
|
adoptionRefresh: (input) => dispatch("deviceManager", "adoptionRefresh", "mutation", input),
|
|
10173
10208
|
adoptionAdopt: (input) => dispatch("deviceManager", "adoptionAdopt", "mutation", input),
|
|
10174
10209
|
adoptionRelease: (input) => dispatch("deviceManager", "adoptionRelease", "mutation", input),
|
|
10175
|
-
adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input)
|
|
10210
|
+
adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input),
|
|
10211
|
+
discoveryProviders: (input) => dispatch("deviceManager", "discoveryProviders", "query", input),
|
|
10212
|
+
discoverAllProviders: (input) => dispatch("deviceManager", "discoverAllProviders", "mutation", input),
|
|
10213
|
+
discoverProvider: (input) => dispatch("deviceManager", "discoverProvider", "mutation", input),
|
|
10214
|
+
providerCreationType: (input) => dispatch("deviceManager", "providerCreationType", "query", input),
|
|
10215
|
+
providerDiscoveryParamsSchema: (input) => dispatch("deviceManager", "providerDiscoveryParamsSchema", "query", input)
|
|
10176
10216
|
},
|
|
10177
10217
|
deviceProvider: {
|
|
10178
10218
|
start: (input) => dispatch("deviceProvider", "start", "mutation", input),
|
|
@@ -10181,6 +10221,8 @@ function createSystemProxy(api) {
|
|
|
10181
10221
|
getDevices: (input) => dispatch("deviceProvider", "getDevices", "query", input),
|
|
10182
10222
|
supportsDiscovery: (input) => dispatch("deviceProvider", "supportsDiscovery", "query", input),
|
|
10183
10223
|
discoverDevices: (input) => dispatch("deviceProvider", "discoverDevices", "mutation", input),
|
|
10224
|
+
getDiscoveryParamsSchema: (input) => dispatch("deviceProvider", "getDiscoveryParamsSchema", "query", input),
|
|
10225
|
+
getManualCreationType: (input) => dispatch("deviceProvider", "getManualCreationType", "query", input),
|
|
10184
10226
|
adoptDiscoveredDevice: (input) => dispatch("deviceProvider", "adoptDiscoveredDevice", "mutation", input),
|
|
10185
10227
|
supportsManualCreation: (input) => dispatch("deviceProvider", "supportsManualCreation", "query", input),
|
|
10186
10228
|
getChildCreationSchema: (input) => dispatch("deviceProvider", "getChildCreationSchema", "query", input),
|
|
@@ -13650,6 +13692,12 @@ var deviceManagerCapability = {
|
|
|
13650
13692
|
kind: "mutation",
|
|
13651
13693
|
auth: "admin"
|
|
13652
13694
|
}),
|
|
13695
|
+
/** List candidate filter chips for an integration via its device-adoption
|
|
13696
|
+
* provider — addonId-routed so it never hits the singleton shadow. */
|
|
13697
|
+
adoptionListCandidateFilters: method(z.object({
|
|
13698
|
+
addonId: z.string(),
|
|
13699
|
+
integrationId: z.string()
|
|
13700
|
+
}), z.object({ filters: z.array(AdoptionFilterSchema) }), { auth: "admin" }),
|
|
13653
13701
|
/** List adoption candidates for an integration via its device-adoption provider. */
|
|
13654
13702
|
adoptionListCandidates: method(ListCandidatesInputSchema.extend({ addonId: z.string() }), ListCandidatesOutputSchema, { auth: "admin" }),
|
|
13655
13703
|
/** Trigger a discovery refresh on the integration's device-adoption provider. */
|
|
@@ -13680,6 +13728,36 @@ var deviceManagerCapability = {
|
|
|
13680
13728
|
kind: "mutation",
|
|
13681
13729
|
auth: "admin"
|
|
13682
13730
|
}),
|
|
13731
|
+
/** Addons whose device-provider reports `supportsDiscovery` (for the modal). */
|
|
13732
|
+
discoveryProviders: method(z.object({}), z.object({ providers: z.array(z.object({
|
|
13733
|
+
addonId: z.string(),
|
|
13734
|
+
label: z.string()
|
|
13735
|
+
})).readonly() }), { auth: "admin" }),
|
|
13736
|
+
/** Scan EVERY discovery-capable provider; returns candidates grouped by addon. */
|
|
13737
|
+
discoverAllProviders: method(z.object({}), z.object({ groups: z.array(z.object({
|
|
13738
|
+
addonId: z.string(),
|
|
13739
|
+
label: z.string(),
|
|
13740
|
+
candidates: z.array(DiscoveryCandidateSchema).readonly(),
|
|
13741
|
+
error: z.string().nullable()
|
|
13742
|
+
})).readonly() }), {
|
|
13743
|
+
kind: "mutation",
|
|
13744
|
+
auth: "admin"
|
|
13745
|
+
}),
|
|
13746
|
+
/** Scan ONE provider with optional provider-specific params (subnet /
|
|
13747
|
+
* broadcast addr) — the per-integration "Scan network" surface. */
|
|
13748
|
+
discoverProvider: method(z.object({
|
|
13749
|
+
addonId: z.string(),
|
|
13750
|
+
params: z.record(z.string(), z.unknown()).optional()
|
|
13751
|
+
}), z.object({ candidates: z.array(DiscoveryCandidateSchema).readonly() }), {
|
|
13752
|
+
kind: "mutation",
|
|
13753
|
+
auth: "admin"
|
|
13754
|
+
}),
|
|
13755
|
+
/** The device type a provider creates via manual add (Camera/Container/Hub),
|
|
13756
|
+
* so the Add-Device dialog uses the right type instead of assuming Camera. */
|
|
13757
|
+
providerCreationType: method(z.object({ addonId: z.string() }), z.object({ deviceType: z.enum(DeviceType).nullable() }), { auth: "admin" }),
|
|
13758
|
+
/** A provider's extra per-scan param form (ConfigUISchema) for the
|
|
13759
|
+
* per-integration scan, or null when it takes none. */
|
|
13760
|
+
providerDiscoveryParamsSchema: method(z.object({ addonId: z.string() }), z.unknown(), { auth: "admin" }),
|
|
13683
13761
|
/**
|
|
13684
13762
|
* Test a field value on an existing device (e.g. probe an RTSP URL).
|
|
13685
13763
|
* Routes through the device-provider for the owning addon.
|
|
@@ -21864,6 +21942,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21864
21942
|
addonId: null,
|
|
21865
21943
|
access: "create"
|
|
21866
21944
|
},
|
|
21945
|
+
"deviceManager.adoptionListCandidateFilters": {
|
|
21946
|
+
capName: "device-manager",
|
|
21947
|
+
capScope: "system",
|
|
21948
|
+
addonId: null,
|
|
21949
|
+
access: "view"
|
|
21950
|
+
},
|
|
21867
21951
|
"deviceManager.adoptionListCandidates": {
|
|
21868
21952
|
capName: "device-manager",
|
|
21869
21953
|
capScope: "system",
|
|
@@ -21912,12 +21996,30 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21912
21996
|
addonId: null,
|
|
21913
21997
|
access: "create"
|
|
21914
21998
|
},
|
|
21999
|
+
"deviceManager.discoverAllProviders": {
|
|
22000
|
+
capName: "device-manager",
|
|
22001
|
+
capScope: "system",
|
|
22002
|
+
addonId: null,
|
|
22003
|
+
access: "create"
|
|
22004
|
+
},
|
|
21915
22005
|
"deviceManager.discoverDevices": {
|
|
21916
22006
|
capName: "device-manager",
|
|
21917
22007
|
capScope: "system",
|
|
21918
22008
|
addonId: null,
|
|
21919
22009
|
access: "create"
|
|
21920
22010
|
},
|
|
22011
|
+
"deviceManager.discoverProvider": {
|
|
22012
|
+
capName: "device-manager",
|
|
22013
|
+
capScope: "system",
|
|
22014
|
+
addonId: null,
|
|
22015
|
+
access: "create"
|
|
22016
|
+
},
|
|
22017
|
+
"deviceManager.discoveryProviders": {
|
|
22018
|
+
capName: "device-manager",
|
|
22019
|
+
capScope: "system",
|
|
22020
|
+
addonId: null,
|
|
22021
|
+
access: "view"
|
|
22022
|
+
},
|
|
21921
22023
|
"deviceManager.enable": {
|
|
21922
22024
|
capName: "device-manager",
|
|
21923
22025
|
capScope: "system",
|
|
@@ -22068,6 +22170,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22068
22170
|
addonId: null,
|
|
22069
22171
|
access: "create"
|
|
22070
22172
|
},
|
|
22173
|
+
"deviceManager.providerCreationType": {
|
|
22174
|
+
capName: "device-manager",
|
|
22175
|
+
capScope: "system",
|
|
22176
|
+
addonId: null,
|
|
22177
|
+
access: "view"
|
|
22178
|
+
},
|
|
22179
|
+
"deviceManager.providerDiscoveryParamsSchema": {
|
|
22180
|
+
capName: "device-manager",
|
|
22181
|
+
capScope: "system",
|
|
22182
|
+
addonId: null,
|
|
22183
|
+
access: "view"
|
|
22184
|
+
},
|
|
22071
22185
|
"deviceManager.registerDevice": {
|
|
22072
22186
|
capName: "device-manager",
|
|
22073
22187
|
capScope: "system",
|
|
@@ -22284,6 +22398,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22284
22398
|
addonId: null,
|
|
22285
22399
|
access: "view"
|
|
22286
22400
|
},
|
|
22401
|
+
"deviceProvider.getDiscoveryParamsSchema": {
|
|
22402
|
+
capName: "device-provider",
|
|
22403
|
+
capScope: "system",
|
|
22404
|
+
addonId: null,
|
|
22405
|
+
access: "view"
|
|
22406
|
+
},
|
|
22407
|
+
"deviceProvider.getManualCreationType": {
|
|
22408
|
+
capName: "device-provider",
|
|
22409
|
+
capScope: "system",
|
|
22410
|
+
addonId: null,
|
|
22411
|
+
access: "view"
|
|
22412
|
+
},
|
|
22287
22413
|
"deviceProvider.getStatus": {
|
|
22288
22414
|
capName: "device-provider",
|
|
22289
22415
|
capScope: "system",
|
|
@@ -1055,7 +1055,23 @@ export interface AddonExecution {
|
|
|
1055
1055
|
* default group".
|
|
1056
1056
|
*/
|
|
1057
1057
|
readonly group?: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Runtime heap profile — drives the V8 flags the addon's runner is spawned with (Block D memory).
|
|
1060
|
+
*
|
|
1061
|
+
* - `'light'` (DEFAULT when omitted): a mostly-idle control-plane runner (providers, auth,
|
|
1062
|
+
* tunnels, storage, smtp, notifier, admin-ui). Its young generation is capped
|
|
1063
|
+
* (`--max-semi-space-size`) to reclaim V8's over-reservation — a measured ~15 MB/runner.
|
|
1064
|
+
* - `'heavy'`: a media / ML / native runner (pipeline, decoder, benchmark, camera clients,
|
|
1065
|
+
* embedding, model-studio, analytics) that allocates enough on the JS heap that a small young
|
|
1066
|
+
* generation would add scavenge-GC churn and a low old-space cap would risk OOM — keeps V8
|
|
1067
|
+
* defaults.
|
|
1068
|
+
*
|
|
1069
|
+
* A runner is treated as heavy if ANY co-located addon declares `'heavy'`. This replaces the
|
|
1070
|
+
* former hard-coded addon-name list in `process-service.ts`.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly heapProfile?: AddonHeapProfile;
|
|
1058
1073
|
}
|
|
1074
|
+
export type AddonHeapProfile = 'light' | 'heavy';
|
|
1059
1075
|
export declare const DEFAULT_ADDON_PLACEMENT: AddonPlacement;
|
|
1060
1076
|
/**
|
|
1061
1077
|
* Effective execution model for an addon after defaults are applied —
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { ISettingsBackend, IEmbeddingsBackend } from './storage.js';
|
|
2
|
-
import type { ILogDestination } from './logging.js';
|
|
3
|
-
import type { IAddonPageProvider } from './addon.js';
|
|
4
1
|
import type { IAuthProvider } from '../capabilities/auth-provider.cap.js';
|
|
5
|
-
import type { IAddonRouteProvider } from './addon-routes.js';
|
|
6
|
-
import type { IRestreamer } from './restreamer.js';
|
|
7
|
-
import type { IWebRtcProvider } from './webrtc-provider.js';
|
|
8
|
-
import type { streamBrokerCapability } from '../capabilities/stream-broker.cap.js';
|
|
9
2
|
import type { InferProvider } from '../capabilities/capability-definition.js';
|
|
10
3
|
import type { ISnapshotOrchestrator } from '../capabilities/snapshot.cap.js';
|
|
11
|
-
import type {
|
|
4
|
+
import type { streamBrokerCapability } from '../capabilities/stream-broker.cap.js';
|
|
5
|
+
import type { CollectionCapabilityName, SingletonCapabilityName } from '../generated/capability-router-map.js';
|
|
6
|
+
import type { StepDefinition } from '../types/pipeline-step.js';
|
|
7
|
+
import type { IAddonPageProvider } from './addon.js';
|
|
8
|
+
import type { IAddonRouteProvider } from './addon-routes.js';
|
|
9
|
+
import type { IDecoderProvider } from './decoder.js';
|
|
10
|
+
import type { ILogDestination } from './logging.js';
|
|
12
11
|
import type { IPipelineExecutorProvider } from './pipeline-executor-capability.js';
|
|
13
12
|
import type { IPipelineOrchestratorProvider } from './pipeline-orchestrator-capability.js';
|
|
14
13
|
import type { IPipelineRunnerProvider } from './pipeline-runner-capability.js';
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
14
|
+
import type { IRestreamer } from './restreamer.js';
|
|
15
|
+
import type { IEmbeddingsBackend, ISettingsBackend } from './storage.js';
|
|
16
|
+
import type { IStreamingEngine } from './streaming.js';
|
|
17
|
+
import type { IWebRtcProvider } from './webrtc-provider.js';
|
|
18
18
|
/**
|
|
19
19
|
* Pipeline step capability — each step is a separate capability
|
|
20
20
|
* named `pipeline-step:{stepId}` (e.g., `pipeline-step:object-detection`).
|
package/dist/lifecycle/job.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export declare const taskPhaseSchema: z.ZodEnum<{
|
|
|
20
20
|
}>;
|
|
21
21
|
export type TaskPhase = z.infer<typeof taskPhaseSchema>;
|
|
22
22
|
export declare const taskTargetSchema: z.ZodEnum<{
|
|
23
|
-
addon: "addon";
|
|
24
23
|
framework: "framework";
|
|
24
|
+
addon: "addon";
|
|
25
25
|
}>;
|
|
26
26
|
export type TaskTarget = z.infer<typeof taskTargetSchema>;
|
|
27
27
|
export declare const taskLogEntrySchema: z.ZodObject<{
|
|
@@ -50,8 +50,8 @@ export declare const lifecycleTaskSchema: z.ZodObject<{
|
|
|
50
50
|
fromVersion: z.ZodNullable<z.ZodString>;
|
|
51
51
|
toVersion: z.ZodString;
|
|
52
52
|
target: z.ZodEnum<{
|
|
53
|
-
addon: "addon";
|
|
54
53
|
framework: "framework";
|
|
54
|
+
addon: "addon";
|
|
55
55
|
}>;
|
|
56
56
|
phase: z.ZodEnum<{
|
|
57
57
|
failed: "failed";
|
|
@@ -126,8 +126,8 @@ export declare const lifecycleJobSchema: z.ZodObject<{
|
|
|
126
126
|
fromVersion: z.ZodNullable<z.ZodString>;
|
|
127
127
|
toVersion: z.ZodString;
|
|
128
128
|
target: z.ZodEnum<{
|
|
129
|
-
addon: "addon";
|
|
130
129
|
framework: "framework";
|
|
130
|
+
addon: "addon";
|
|
131
131
|
}>;
|
|
132
132
|
phase: z.ZodEnum<{
|
|
133
133
|
failed: "failed";
|
|
@@ -2162,6 +2162,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
2162
2162
|
DeviceType["Switch"] = "switch";
|
|
2163
2163
|
DeviceType["Sensor"] = "sensor";
|
|
2164
2164
|
DeviceType["Thermostat"] = "thermostat";
|
|
2165
|
+
/** Air-conditioner / heat-pump climate device (HVAC) — shares the
|
|
2166
|
+
* `climate-control` cap surface with `Thermostat` but renders a
|
|
2167
|
+
* dedicated AC-appropriate control UI (mode chips, fan speed,
|
|
2168
|
+
* independent vertical/horizontal swing). Sources: native Gree, and
|
|
2169
|
+
* reusable by other AC integrations. */
|
|
2170
|
+
DeviceType["Climate"] = "climate";
|
|
2165
2171
|
DeviceType["Button"] = "button";
|
|
2166
2172
|
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
2167
2173
|
* event vocabulary verbatim (no normalization). Installed with the
|
|
@@ -2162,6 +2162,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
2162
2162
|
DeviceType["Switch"] = "switch";
|
|
2163
2163
|
DeviceType["Sensor"] = "sensor";
|
|
2164
2164
|
DeviceType["Thermostat"] = "thermostat";
|
|
2165
|
+
/** Air-conditioner / heat-pump climate device (HVAC) — shares the
|
|
2166
|
+
* `climate-control` cap surface with `Thermostat` but renders a
|
|
2167
|
+
* dedicated AC-appropriate control UI (mode chips, fan speed,
|
|
2168
|
+
* independent vertical/horizontal swing). Sources: native Gree, and
|
|
2169
|
+
* reusable by other AC integrations. */
|
|
2170
|
+
DeviceType["Climate"] = "climate";
|
|
2165
2171
|
DeviceType["Button"] = "button";
|
|
2166
2172
|
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
2167
2173
|
* event vocabulary verbatim (no normalization). Installed with the
|