@camstack/types 1.2.593 → 1.2.594
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 +11 -0
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/composer.cap.d.ts +9 -0
- package/dist/capabilities/core-blocks.cap.d.ts +64 -0
- package/dist/capabilities/device-manager.cap.d.ts +681 -48
- package/dist/capabilities/power-source.cap.d.ts +10 -0
- package/dist/client.js +5 -0
- package/dist/client.mjs +5 -0
- package/dist/composition/composition-report.d.ts +3 -0
- package/dist/composition/composition.d.ts +14 -0
- package/dist/composition/power-source-link.d.ts +8 -0
- package/dist/device/base-device.d.ts +8 -0
- package/dist/device/device-management.d.ts +4 -0
- package/dist/device/identity-links.d.ts +310 -0
- package/dist/device/index.d.ts +2 -0
- package/dist/enums/event-category.d.ts +14 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-CY27-fF0.mjs → event-category-7P4A3bYA.mjs} +14 -0
- package/dist/{event-category-BKxXXxnV.js → event-category-CMA0-jGW.js} +14 -0
- package/dist/generated/addon-api.d.ts +35 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/{implemented-methods-k3KProJd.mjs → implemented-methods-DXeNAPAS.mjs} +11 -2
- package/dist/{implemented-methods-BarLh7tc.js → implemented-methods-Dj_2fX8-.js} +16 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +285 -12
- package/dist/index.mjs +270 -13
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{sleep-BOK28JE0.js → sleep-Bgzv_TCG.js} +3 -1
- package/dist/{sleep-DO-ayTnk.mjs → sleep-C9eelFbV.mjs} +3 -1
- package/package.json +1 -1
|
@@ -366,7 +366,7 @@ export interface DeviceProxy {
|
|
|
366
366
|
readonly deviceAdoption: Pick<InferDeviceProxyCap<typeof deviceAdoptionCapability>, 'getStatus'>;
|
|
367
367
|
readonly deviceExport: Pick<InferDeviceProxyCap<typeof deviceExportCapability>, 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
368
368
|
readonly deviceHistory: Pick<InferDeviceProxyCap<typeof deviceHistoryCapability>, 'listSeries' | 'query' | 'getDeviceEnabled' | 'setDeviceEnabled' | 'deleteSeriesRange'>;
|
|
369
|
-
readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setAlias' | 'setLocation' | 'setTags' | 'setType' | 'setIntegrationId' | 'setLinkDeviceId' | 'setPrimaryChildEntityId' | 'setChildLayout' | 'setPrimaryChildPreference' | 'setDisplay' | 'getWireableFields' | 'setRole' | 'applyInitialMeta' | 'setMetadata' | 'setIdentifiers' | 'setDisabled' | 'getDevice' | 'getLinkedDevices' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'setWrapperActive' | 'getWrapperActivation' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'runDeviceAction' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate'>;
|
|
369
|
+
readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setAlias' | 'setLocation' | 'setTags' | 'setType' | 'setIntegrationId' | 'setLinkDeviceId' | 'setPrimaryChildEntityId' | 'setChildLayout' | 'setPrimaryChildPreference' | 'setDisplay' | 'getWireableFields' | 'setRole' | 'applyInitialMeta' | 'setMetadata' | 'setIdentifiers' | 'setAttachedIdentifiers' | 'listIdentityLinks' | 'setDisabled' | 'getDevice' | 'getLinkedDevices' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'setWrapperActive' | 'getWrapperActivation' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'runDeviceAction' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate'>;
|
|
370
370
|
readonly deviceState: Pick<InferDeviceProxyCap<typeof deviceStateCapability>, 'getSnapshot' | 'getCapSlice' | 'setCapSlice' | 'claimFields' | 'patchOwnedFields' | 'releaseClaim' | 'getNativeCapSlice'>;
|
|
371
371
|
readonly faceGallery: Pick<InferDeviceProxyCap<typeof faceGalleryCapability>, 'listRecentFaces' | 'getFaceByTrack'>;
|
|
372
372
|
readonly networkQuality: Pick<InferDeviceProxyCap<typeof networkQualityCapability>, 'getDeviceStats' | 'reportClientStats'>;
|
|
@@ -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: 1529 method paths across 214 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { MethodRole } from '../auth/viewer-access.js';
|
|
12
12
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
10
|
-
*
|
|
9
|
+
* Coverage: 647 methods carry a device reference, of which
|
|
10
|
+
* 201 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
13
13
|
* a numeric device field (targets[].deviceId) are all mapped; the matcher
|
|
@@ -94,7 +94,7 @@ export interface SystemProxy {
|
|
|
94
94
|
readonly deviceCredentials: Pick<InferProvider<typeof deviceCredentialsCapability>, 'listDeviceCredentials' | 'startEnrollment' | 'revokeDeviceCredential' | 'getDeviceCertificateSettings' | 'setDeviceCertificateSettings' | 'deleteDeviceCredential' | 'getDeviceCaStatus' | 'renameDeviceCredential'>;
|
|
95
95
|
readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listInstances' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice' | 'setExposedName' | 'listSupportedEntityKinds' | 'listExposedEntities' | 'exposeEntity' | 'unexposeEntity'>;
|
|
96
96
|
readonly deviceHistory: Pick<InferProvider<typeof deviceHistoryCapability>, 'listNodeSeries' | 'queryNode' | 'queryMany' | 'declareSeries' | 'record' | 'recordBuckets' | 'getStatus' | 'listOrphanSeries' | 'deleteOrphanSeries'>;
|
|
97
|
-
readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'renderDeviceTemplates' | 'checkDeviceTemplates' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listIdentityCandidates' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'search' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'listDeletedSince' | 'cleanupDeletedDevicesData' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'listDiscoveryProposals' | 'dismissDiscoveryProposal' | 'reportDiscoveryObservations' | 'runDiscoverySweep' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
|
|
97
|
+
readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'renderDeviceTemplates' | 'checkDeviceTemplates' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listIdentityCandidates' | 'confirmIdentityLink' | 'dismissIdentityLink' | 'unlinkIdentity' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'search' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'listDeletedSince' | 'cleanupDeletedDevicesData' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'listDiscoveryProposals' | 'dismissDiscoveryProposal' | 'reportDiscoveryObservations' | 'runDiscoverySweep' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
|
|
98
98
|
readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryModes' | 'classifyDiscoveryHits' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
|
|
99
99
|
readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots' | 'listClaims'>;
|
|
100
100
|
readonly displayPalette: Pick<InferProvider<typeof displayPaletteCapability>, 'getPalette' | 'listPresets' | 'setPalette'>;
|
|
@@ -3441,6 +3441,8 @@ var CompositionItemEntrySchema = z.object({
|
|
|
3441
3441
|
*/
|
|
3442
3442
|
reset: CompositionForwardCommandSchema.optional()
|
|
3443
3443
|
});
|
|
3444
|
+
/** Which identity link added a feature (D1063). */
|
|
3445
|
+
var CompositionContributedBySchema = z.object({ linkId: z.string().min(1) });
|
|
3444
3446
|
var CompositionFieldsFeatureSchema = z.object({
|
|
3445
3447
|
kind: z.literal("fields"),
|
|
3446
3448
|
cap: z.string().min(1),
|
|
@@ -3452,7 +3454,14 @@ var CompositionFieldsFeatureSchema = z.object({
|
|
|
3452
3454
|
*/
|
|
3453
3455
|
items: z.record(z.string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
3454
3456
|
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
3455
|
-
commands: z.record(z.string().min(1), CompositionCommandTargetSchema).optional()
|
|
3457
|
+
commands: z.record(z.string().min(1), CompositionCommandTargetSchema).optional(),
|
|
3458
|
+
/**
|
|
3459
|
+
* Provenance only (D1063): the identity link that added this feature. The
|
|
3460
|
+
* source ref stays in `fields`; `enabled` stays the operator's switch. An
|
|
3461
|
+
* operator edit of the source drops the stamp and the feature becomes the
|
|
3462
|
+
* operator's; a lost link removes only stamped features.
|
|
3463
|
+
*/
|
|
3464
|
+
contributedBy: CompositionContributedBySchema.optional()
|
|
3456
3465
|
});
|
|
3457
3466
|
/** RESERVED for slice 3: a media / data-plane cap, whole, from one source. */
|
|
3458
3467
|
var CompositionPassthroughFeatureSchema = z.object({
|
|
@@ -3609,4 +3618,4 @@ function implementedMethodsOf(methodNames, provider) {
|
|
|
3609
3618
|
return methodNames.filter((name) => typeof Reflect.get(provider, name) === "function");
|
|
3610
3619
|
}
|
|
3611
3620
|
//#endregion
|
|
3612
|
-
export {
|
|
3621
|
+
export { DEFAULT_GRID_PROFILES as $, isSwitchHeater as $n, STATISTIC_STATS as $t, MAX_COMPOSITION_FEATURES as A, evaluateDwell as An, DAY_MS as At, compositionSourceKey as B, evaluateSensorEdge as Bn, RollingWindowSchema as Bt, CompositionNewTargetSchema as C, MAX_EXPRESSION_EVAL_STEPS as Cn, helperMembers as Ct, CompositionTargetSchema as D, EXPRESSION_BUILTIN_NAMES as Dn, CompositionSourceRefSchema as Dt, CompositionSeriesSourceSchema as E, EXPRESSION_BUILTINS as En, newGridHelperSpec as Et, composedDeviceStableId as F, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Fn, HOUR_MS as Ft, ACTIVE_CRITERIA as G, CLIMATE_ROLES as Gn, nextLocalMidnight as Gt, featureSources as H, isSourceCap as Hn, historyRetentionFromSettings as Ht, compositionFeatureEnabled as I, SOURCE_CAPS as In, MINUTE_MS as It, ActiveCriterionSchema as J, capAppliesToDeviceKind as Jn, planResetTier as Jt, AGGREGATE_REDUCERS as K, StoredDeviceTypeSchema as Kn, openReset as Kt, compositionItemFieldPath as L, SOURCE_CAP_ACTIVE_FIELD as Ln, MIN_CUSTOM_MINUTES as Lt, MAX_COMPOSITION_ITEMS as M, isStatefulBuiltin as Mn, HISTORY_FAST_MS as Mt, canonicalStoredBlockTarget as N, ExpressionEvalError as Nn, HISTORY_SLOW_MS as Nt, FORWARD_INPUT_KEY as O, disarmRoseMemory as On, CALENDAR_PERIODS as Ot, composedDeviceRef as P, ExpressionParseError as Pn, HISTORY_TIERS as Pt, DEFAULT_GRID_FPS as Q, isSwitchFan as Qn, SERIES_KINDS as Qt, compositionReadKey as R, SOURCE_CAP_CHANGED_AT_FIELD as Rn, RESET_PERIODS as Rt, CompositionLiteralBindingSchema as S, MAX_EXPRESSION_CALL_ARGS as Sn, helperDeviceRefs as St, CompositionSchema as T, RESERVED_BINDING_NAMES as Tn, isHistoryHelper as Tt, fieldReads as U, sliceActiveValue as Un, integralCadenceMs as Ut, featureFieldEntries as V, evaluateSensorLevelEdge as Vn, StatisticWindowSchema as Vt, isForwardInputRef as W, sliceChangedAt as Wn, maxDurationMs as Wt, ArithmeticHelperSpecSchema as X, isAirConditioner as Xn, rollingDurationMs as Xt, AggregateReducerSchema as Y, climateRoleOf as Yn, planStatisticTier as Yt, BINARY_AGGREGATES as Z, isOutlet as Zn, statisticCadenceMs as Zt, CompositionFieldsFeatureSchema as _, tokenize as _n, isSoftwareDecode as _r, MAX_HELPER_MEMBERS as _t, CUSTOMIZATION_BLOCK_NAME_PREFIX as a, EXPRESSION_INJECTED_NOW as an, getFfmpegArtifact as ar, GRID_PROFILES as at, CompositionFromSourceSchema as b, MAX_EXPRESSION_AST_NODES as bn, resolveStreamMaps as br, TerminalHelperSpecSchema as bt, CompositionCodeSourceSchema as c, evaluateExpressionSource as cn, Fmp4BoxSplitter as cr, GridHelperSpecSchema as ct, CompositionExistingTargetSchema as d, validateExpressionSource as dn, audioPlanFromEncodeProfile as dr, GroupTemplateIdSchema as dt, evaluateDerivative as en, isSwitchLight as er, DERIVATIVE_UNITS as et, CompositionExpressionSourceSchema as f, createExpressionScope as fn, buildAudioArgs as fr, HelperMemberSchema as ft, CompositionFieldSourceSchema as g, parseExpression as gn, invocationFromEncodeProfile as gr, MAX_GRID_CELLS as gt, CompositionFieldReadSchema as h, compileExpressionSafe as hn, buildVideoArgs as hr, IntegralHelperSpecSchema as ht, COMPOSITION_ITEM_KEY_RE as i, wattMillisecondsToKwh as in, FFMPEG_RELEASE as ir, ExpressionHelperSpecSchema as it, MAX_COMPOSITION_FIELDS_PER_FEATURE as j, evaluateRose as jn, DEFAULT_HISTORY_RETENTION as jt, MAX_COMPOSITION_CODE_LENGTH as k, evaluateCount as kn, CalendarWindowSchema as kt, CompositionCommandTargetSchema as l, evaluateStatefulExpressionCall as ln, AUDIO_PRESETS as lr, GridRectSchema as lt, CompositionFeatureSchema as m, compileExpression as mn, buildInputArgs as mr, INTEGRAL_OUTPUTS as mt, COMPOSER_ADDON_ID as n, integrateReading as nn, chooseFfmpegBinary as nr, ENGINE_HOSTED_HELPER_KINDS as nt, CompositionAggregateSourceSchema as o, cloneStatefulExpressionMemory as on, getFfmpegDownloadUrl as or, GROUP_TEMPLATE_IDS as ot, CompositionExtensionCommandSchema as p, evaluateAst as pn, buildFfmpegArgs as pr, HelperSpecSchema as pt, ARITHMETIC_OPS as q, canonicalStoredDeviceType as qn, openStatistic as qt, COMPOSITION_ITEM_ARRAY_PATH as r, KWH_PER_WATT_MS as rn, ffmpegBinaryName as rr, EXPRESSION_OUTPUTS as rt, CompositionBindingSchema as s, createStatefulExpressionMemory as sn, canonicalHash as sr, GridCellSpecSchema as st, implementedMethodsOf as t, evaluateStatistic as tn, FFMPEG_PATH_ENV as tr, DerivativeHelperSpecSchema as tt, CompositionContributedBySchema as u, toExpressionValue as un, RESTREAM_INPUT_PROBE as ur, GroupHelperSpecSchema as ut, CompositionForwardArgSchema as v, EXPRESSION_COMPILE_CACHE_CAPACITY as vn, logBannerArgs as vr, NUMERIC_AGGREGATES as vt, CompositionPassthroughFeatureSchema as w, MAX_EXPRESSION_SOURCE_LENGTH as wn, isEngineHostedHelper as wt, CompositionItemEntrySchema as x, MAX_EXPRESSION_BINDINGS as xn, ThresholdHelperSpecSchema as xt, CompositionForwardCommandSchema as y, EXPRESSION_IDENTIFIER_RE as yn, pickVideoEncoder as yr, StatisticHelperSpecSchema as yt, compositionSliceKey as z, SOURCE_DEVICE_TYPES as zn, ROLLING_SPANS as zt };
|
|
@@ -3441,6 +3441,8 @@ var CompositionItemEntrySchema = zod.z.object({
|
|
|
3441
3441
|
*/
|
|
3442
3442
|
reset: CompositionForwardCommandSchema.optional()
|
|
3443
3443
|
});
|
|
3444
|
+
/** Which identity link added a feature (D1063). */
|
|
3445
|
+
var CompositionContributedBySchema = zod.z.object({ linkId: zod.z.string().min(1) });
|
|
3444
3446
|
var CompositionFieldsFeatureSchema = zod.z.object({
|
|
3445
3447
|
kind: zod.z.literal("fields"),
|
|
3446
3448
|
cap: zod.z.string().min(1),
|
|
@@ -3452,7 +3454,14 @@ var CompositionFieldsFeatureSchema = zod.z.object({
|
|
|
3452
3454
|
*/
|
|
3453
3455
|
items: zod.z.record(zod.z.string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
3454
3456
|
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
3455
|
-
commands: zod.z.record(zod.z.string().min(1), CompositionCommandTargetSchema).optional()
|
|
3457
|
+
commands: zod.z.record(zod.z.string().min(1), CompositionCommandTargetSchema).optional(),
|
|
3458
|
+
/**
|
|
3459
|
+
* Provenance only (D1063): the identity link that added this feature. The
|
|
3460
|
+
* source ref stays in `fields`; `enabled` stays the operator's switch. An
|
|
3461
|
+
* operator edit of the source drops the stamp and the feature becomes the
|
|
3462
|
+
* operator's; a lost link removes only stamped features.
|
|
3463
|
+
*/
|
|
3464
|
+
contributedBy: CompositionContributedBySchema.optional()
|
|
3456
3465
|
});
|
|
3457
3466
|
/** RESERVED for slice 3: a media / data-plane cap, whole, from one source. */
|
|
3458
3467
|
var CompositionPassthroughFeatureSchema = zod.z.object({
|
|
@@ -3723,6 +3732,12 @@ Object.defineProperty(exports, "CompositionCommandTargetSchema", {
|
|
|
3723
3732
|
return CompositionCommandTargetSchema;
|
|
3724
3733
|
}
|
|
3725
3734
|
});
|
|
3735
|
+
Object.defineProperty(exports, "CompositionContributedBySchema", {
|
|
3736
|
+
enumerable: true,
|
|
3737
|
+
get: function() {
|
|
3738
|
+
return CompositionContributedBySchema;
|
|
3739
|
+
}
|
|
3740
|
+
});
|
|
3726
3741
|
Object.defineProperty(exports, "CompositionExistingTargetSchema", {
|
|
3727
3742
|
enumerable: true,
|
|
3728
3743
|
get: function() {
|
package/dist/index.d.ts
CHANGED
|
@@ -280,6 +280,8 @@ export { declareDeviceIdentifiers } from './device/declare-identifiers.js';
|
|
|
280
280
|
export type { DeclareIdentifiersDeps, DeclareIdentifiersOptions, DeclareIdentifiersOutcome, DeclareIdentifiersResult, IdentifiersWriter, SetIdentifiersInput, } from './device/declare-identifiers.js';
|
|
281
281
|
export { IdentityCandidateDeviceSchema, IdentityCandidatePairSchema, IdentityCandidatesSchema, IdentityConfidenceSchema, IdentityMatchedKeySchema, } from './device/device-identity-candidates.js';
|
|
282
282
|
export type { IdentityCandidateDevice, IdentityCandidatePair, IdentityCandidates, IdentityConfidence, IdentityMatchedKey, } from './device/device-identity-candidates.js';
|
|
283
|
+
export { IDENTITY_LINK_KIND_NAMES, IDENTITY_LINK_KINDS, IdentityLinkBodySchema, IdentityLinkDecisionRefusalSchema, IdentityLinkDecisionSchema, IdentityLinkEventPayloadSchema, IdentityLinkKindSchema, IdentityLinkLostReasonSchema, IdentityLinkOriginSchema, IdentityLinkSchema, IdentityLinkSideSchema, IdentityLinkStateSchema, IdentityLinksReadSchema, identityLinkId, identityLinkSidesRefusal, } from './device/identity-links.js';
|
|
284
|
+
export type { IdentityLink, IdentityLinkBody, IdentityLinkContribution, IdentityLinkDecision, IdentityLinkDecisionRefusal, IdentityLinkEventPayload, IdentityLinkKind, IdentityLinkKindSpec, IdentityLinkLostReason, IdentityLinkOrigin, IdentityLinkRef, IdentityLinkSide, IdentityLinkSidesRefusal, IdentityLinkState, IdentityLinksRead, } from './device/identity-links.js';
|
|
283
285
|
export type { ChildLayout, ChildLayoutEntry, CreateDeviceSpec, DeviceCapDisplayOverride, DeviceDiscovery, DeviceDisplayOverride, DeviceManualCreation, DeviceMeta, DiscoveredDevice, InitialDeviceMeta, RoleDisplayDefault, SavedDevice, } from './device/device-management.js';
|
|
284
286
|
export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, PipelinePhaseMode, } from './device/device-profile.js';
|
|
285
287
|
export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device/device-profile.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_sleep = require("./sleep-Bgzv_TCG.js");
|
|
3
|
+
const require_event_category = require("./event-category-CMA0-jGW.js");
|
|
4
4
|
const require_composed_stable_id = require("./composed-stable-id-BdeYe5dD.js");
|
|
5
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
5
|
+
const require_implemented_methods = require("./implemented-methods-Dj_2fX8-.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
7
7
|
const require_convert = require("./convert-BI8iTXn6.js");
|
|
8
8
|
const require_device_template_catalogue = require("./device-template-catalogue.js");
|
|
@@ -4578,7 +4578,7 @@ function ordinalOf(id) {
|
|
|
4578
4578
|
function defaultIntegrationOf(integrations, eligible) {
|
|
4579
4579
|
return [...eligible === void 0 ? integrations : integrations.filter(eligible)].sort((a, b) => ordinalOf(a.id) - ordinalOf(b.id) || (a.id < b.id ? -1 : 1))[0] ?? null;
|
|
4580
4580
|
}
|
|
4581
|
-
function unstamped(device) {
|
|
4581
|
+
function unstamped$1(device) {
|
|
4582
4582
|
return device.integrationId === void 0 || device.integrationId === null || device.integrationId === "";
|
|
4583
4583
|
}
|
|
4584
4584
|
/**
|
|
@@ -4595,8 +4595,8 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
4595
4595
|
const all = await ports.listDevices(spec.addonId);
|
|
4596
4596
|
const byId = new Map(all.map((d) => [d.id, d]));
|
|
4597
4597
|
const reservations = /* @__PURE__ */ new Set();
|
|
4598
|
-
for (const device of all) if (unstamped(device) && await isReservation(ports, device)) reservations.add(device.id);
|
|
4599
|
-
const orphans = all.filter((d) => unstamped(d) && !reservations.has(d.id));
|
|
4598
|
+
for (const device of all) if (unstamped$1(device) && await isReservation(ports, device)) reservations.add(device.id);
|
|
4599
|
+
const orphans = all.filter((d) => unstamped$1(d) && !reservations.has(d.id));
|
|
4600
4600
|
const summaryBase = { reservations: reservations.size };
|
|
4601
4601
|
if (orphans.length === 0) return {
|
|
4602
4602
|
outcome: "already-done",
|
|
@@ -4611,7 +4611,7 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
4611
4611
|
const unresolved = /* @__PURE__ */ new Set();
|
|
4612
4612
|
const failed = /* @__PURE__ */ new Set();
|
|
4613
4613
|
const resolve = (device, seen) => {
|
|
4614
|
-
if (!unstamped(device)) return device.integrationId ?? null;
|
|
4614
|
+
if (!unstamped$1(device)) return device.integrationId ?? null;
|
|
4615
4615
|
const planned = plan.get(device.id);
|
|
4616
4616
|
if (planned !== void 0) return planned;
|
|
4617
4617
|
if (failed.has(device.id)) return null;
|
|
@@ -47132,7 +47132,8 @@ var CompositionProblemCodeSchema = zod.z.enum([
|
|
|
47132
47132
|
"command-source-unknown",
|
|
47133
47133
|
"command-input-unknown",
|
|
47134
47134
|
"command-input-missing",
|
|
47135
|
-
"power-source-is-actuator"
|
|
47135
|
+
"power-source-is-actuator",
|
|
47136
|
+
"link-contribution-removed"
|
|
47136
47137
|
]);
|
|
47137
47138
|
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
47138
47139
|
var CompositionProblemSchema = zod.z.object({
|
|
@@ -53484,7 +53485,9 @@ var PowerSourceRefusalReasonSchema = zod.z.enum([
|
|
|
53484
53485
|
"switch-call-failed",
|
|
53485
53486
|
"switch-options-unreadable",
|
|
53486
53487
|
"not-settable",
|
|
53487
|
-
"switch-is-actuator"
|
|
53488
|
+
"switch-is-actuator",
|
|
53489
|
+
"link-lost",
|
|
53490
|
+
"link-unknown"
|
|
53488
53491
|
]);
|
|
53489
53492
|
var PowerSourceActionResultSchema = zod.z.discriminatedUnion("accepted", [zod.z.object({ accepted: zod.z.literal(true) }), zod.z.object({
|
|
53490
53493
|
accepted: zod.z.literal(false),
|
|
@@ -53681,7 +53684,8 @@ function powerSourceLinkOfComposition(composition, blockId) {
|
|
|
53681
53684
|
return {
|
|
53682
53685
|
device,
|
|
53683
53686
|
switch: read.source,
|
|
53684
|
-
offSeconds: normalizeOffSeconds(storedOffSeconds(composition))
|
|
53687
|
+
offSeconds: normalizeOffSeconds(storedOffSeconds(composition)),
|
|
53688
|
+
...feature.contributedBy === void 0 ? {} : { contributedBy: feature.contributedBy }
|
|
53685
53689
|
};
|
|
53686
53690
|
}
|
|
53687
53691
|
var ACTUATOR_CAP = "switch";
|
|
@@ -57037,6 +57041,143 @@ var IdentityCandidatesSchema = zod.z.discriminatedUnion("status", [zod.z.object(
|
|
|
57037
57041
|
undeclaredDeviceIds: zod.z.array(zod.z.number().int()).readonly()
|
|
57038
57042
|
})]);
|
|
57039
57043
|
//#endregion
|
|
57044
|
+
//#region src/device/identity-links.ts
|
|
57045
|
+
/**
|
|
57046
|
+
* Identity links (planning#594, D1063): a RELATION between two devices of
|
|
57047
|
+
* different integrations, decided from the identifiers their providers declared
|
|
57048
|
+
* (D1059) — never from location, never from a name.
|
|
57049
|
+
*
|
|
57050
|
+
* A link is not a merge: both devices keep their provider, their id and their
|
|
57051
|
+
* bindings. What a link adds to one of them is a Customize feature, stamped
|
|
57052
|
+
* with the link's id (`CompositionFieldsFeature.contributedBy`), so the
|
|
57053
|
+
* operator's switch for it is the feature's own `enabled` (D62, D676) and the
|
|
57054
|
+
* link record never holds a second copy of it.
|
|
57055
|
+
*
|
|
57056
|
+
* | Kind | Sides | Evidence |
|
|
57057
|
+
* | ------------- | -------------------------------------------- | ---------------------------------------- |
|
|
57058
|
+
* | `same-device` | two views of ONE object, unordered | `identifiers` ↔ `identifiers` |
|
|
57059
|
+
* | `poe-power` | `a` = the PoE port, `b` = the device it feeds | port `attachedIdentifiers` ↔ `identifiers` |
|
|
57060
|
+
*
|
|
57061
|
+
* The row id names the two sides by `<addonId>/<stableId>`, so a link survives
|
|
57062
|
+
* a device re-registered under a new numeric id. A symmetric kind sorts its two
|
|
57063
|
+
* refs; a directional kind keeps `a` as the attaching side.
|
|
57064
|
+
*/
|
|
57065
|
+
var IDENTITY_LINK_KIND_NAMES = ["same-device", "poe-power"];
|
|
57066
|
+
var IdentityLinkKindSchema = zod.z.enum(IDENTITY_LINK_KIND_NAMES);
|
|
57067
|
+
/**
|
|
57068
|
+
* - `proposed` — one strong key matched: waits for the operator;
|
|
57069
|
+
* - `linked` — confirmed by the operator, or auto-linked on strong evidence;
|
|
57070
|
+
* - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
|
|
57071
|
+
*/
|
|
57072
|
+
var IdentityLinkStateSchema = zod.z.enum([
|
|
57073
|
+
"proposed",
|
|
57074
|
+
"linked",
|
|
57075
|
+
"dismissed"
|
|
57076
|
+
]);
|
|
57077
|
+
/** Who decided the current state: the matcher (`auto`) or the operator. */
|
|
57078
|
+
var IdentityLinkOriginSchema = zod.z.enum(["auto", "operator"]);
|
|
57079
|
+
/** One side: the device ref that survives re-registration, plus its current numeric id. */
|
|
57080
|
+
var IdentityLinkSideSchema = zod.z.object({
|
|
57081
|
+
addonId: zod.z.string().min(1),
|
|
57082
|
+
stableId: zod.z.string().min(1),
|
|
57083
|
+
deviceId: zod.z.number().int()
|
|
57084
|
+
});
|
|
57085
|
+
/** The stored body of one `identity-links` record. */
|
|
57086
|
+
var IdentityLinkBodySchema = zod.z.object({
|
|
57087
|
+
kind: IdentityLinkKindSchema,
|
|
57088
|
+
a: IdentityLinkSideSchema,
|
|
57089
|
+
b: IdentityLinkSideSchema,
|
|
57090
|
+
state: IdentityLinkStateSchema,
|
|
57091
|
+
origin: IdentityLinkOriginSchema,
|
|
57092
|
+
/** The identifiers that matched when the link was last evaluated, ordered by key then value. */
|
|
57093
|
+
evidence: zod.z.array(IdentityMatchedKeySchema).readonly(),
|
|
57094
|
+
/** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
|
|
57095
|
+
evidenceGone: zod.z.literal(true).optional(),
|
|
57096
|
+
createdAt: zod.z.number().int().nonnegative(),
|
|
57097
|
+
decidedAt: zod.z.number().int().nonnegative().optional()
|
|
57098
|
+
});
|
|
57099
|
+
var IdentityLinkSchema = IdentityLinkBodySchema.extend({ id: zod.z.string().min(1) });
|
|
57100
|
+
/** The one table of link kinds. */
|
|
57101
|
+
var IDENTITY_LINK_KINDS = {
|
|
57102
|
+
"same-device": {
|
|
57103
|
+
directional: false,
|
|
57104
|
+
attachingRole: null,
|
|
57105
|
+
contributions: []
|
|
57106
|
+
},
|
|
57107
|
+
"poe-power": {
|
|
57108
|
+
directional: true,
|
|
57109
|
+
attachingRole: require_composed_stable_id.DeviceRole.PoePort,
|
|
57110
|
+
contributions: [{
|
|
57111
|
+
cap: "power-source",
|
|
57112
|
+
targetId: "switch",
|
|
57113
|
+
host: "b",
|
|
57114
|
+
source: "a",
|
|
57115
|
+
sourceCap: "switch",
|
|
57116
|
+
sourceField: "on"
|
|
57117
|
+
}]
|
|
57118
|
+
}
|
|
57119
|
+
};
|
|
57120
|
+
/** Whether the attaching side of `kind` may be a device of `aRole`. */
|
|
57121
|
+
function identityLinkSidesRefusal(kind, aRole) {
|
|
57122
|
+
const required = IDENTITY_LINK_KINDS[kind].attachingRole;
|
|
57123
|
+
if (required === null) return null;
|
|
57124
|
+
return aRole === required ? null : "attaching-side-role";
|
|
57125
|
+
}
|
|
57126
|
+
function refKey(ref) {
|
|
57127
|
+
return `${ref.addonId}/${ref.stableId}`;
|
|
57128
|
+
}
|
|
57129
|
+
/**
|
|
57130
|
+
* The record id of a link: `<kind>:<refA>|<refB>`. A symmetric kind sorts the
|
|
57131
|
+
* two refs, so either order names one row; a directional kind keeps `a` first.
|
|
57132
|
+
*/
|
|
57133
|
+
function identityLinkId(kind, a, b) {
|
|
57134
|
+
const x = refKey(a);
|
|
57135
|
+
const y = refKey(b);
|
|
57136
|
+
if (IDENTITY_LINK_KINDS[kind].directional || x <= y) return `${kind}:${x}|${y}`;
|
|
57137
|
+
return `${kind}:${y}|${x}`;
|
|
57138
|
+
}
|
|
57139
|
+
/**
|
|
57140
|
+
* The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
|
|
57141
|
+
* links have been read — never an empty list (D315).
|
|
57142
|
+
*/
|
|
57143
|
+
var IdentityLinksReadSchema = zod.z.discriminatedUnion("status", [zod.z.object({
|
|
57144
|
+
status: zod.z.literal("not-loaded"),
|
|
57145
|
+
reason: zod.z.string()
|
|
57146
|
+
}), zod.z.object({
|
|
57147
|
+
status: zod.z.literal("answered"),
|
|
57148
|
+
links: zod.z.array(IdentityLinkSchema).readonly()
|
|
57149
|
+
})]);
|
|
57150
|
+
/** Why an operator decision on a link was refused. */
|
|
57151
|
+
var IdentityLinkDecisionRefusalSchema = zod.z.enum([
|
|
57152
|
+
"not-loaded",
|
|
57153
|
+
"unknown-link",
|
|
57154
|
+
"wrong-state"
|
|
57155
|
+
]);
|
|
57156
|
+
/** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
|
|
57157
|
+
var IdentityLinkDecisionSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
57158
|
+
ok: zod.z.literal(true),
|
|
57159
|
+
link: IdentityLinkSchema
|
|
57160
|
+
}), zod.z.object({
|
|
57161
|
+
ok: zod.z.literal(false),
|
|
57162
|
+
reason: IdentityLinkDecisionRefusalSchema,
|
|
57163
|
+
message: zod.z.string()
|
|
57164
|
+
})]);
|
|
57165
|
+
/** Why a link was lost. */
|
|
57166
|
+
var IdentityLinkLostReasonSchema = zod.z.enum([
|
|
57167
|
+
"evidence-gone",
|
|
57168
|
+
"device-removed",
|
|
57169
|
+
"operator-unlinked"
|
|
57170
|
+
]);
|
|
57171
|
+
/** The payload of `identity-link.created` / `identity-link.lost` (telemetry; the record is the truth). */
|
|
57172
|
+
var IdentityLinkEventPayloadSchema = zod.z.object({
|
|
57173
|
+
linkId: zod.z.string(),
|
|
57174
|
+
kind: IdentityLinkKindSchema,
|
|
57175
|
+
aDeviceId: zod.z.number().int(),
|
|
57176
|
+
bDeviceId: zod.z.number().int(),
|
|
57177
|
+
origin: IdentityLinkOriginSchema,
|
|
57178
|
+
reason: IdentityLinkLostReasonSchema.optional()
|
|
57179
|
+
});
|
|
57180
|
+
//#endregion
|
|
57040
57181
|
//#region src/capabilities/device-search.ts
|
|
57041
57182
|
/**
|
|
57042
57183
|
* `deviceManager.search` — the query behind the device → value picker.
|
|
@@ -57623,6 +57764,11 @@ var DeviceInfoSchema = zod.z.object({
|
|
|
57623
57764
|
* the owning provider via `setIdentifiers`; read-only for the operator.
|
|
57624
57765
|
* Absent ⇒ the provider declared none. */
|
|
57625
57766
|
identifiers: DeviceIdentifiersSchema.optional(),
|
|
57767
|
+
/** The identity of the device at the far end of this device's physical
|
|
57768
|
+
* link (D1059 amended by D1063) — a PoE port's wired client. Written only by
|
|
57769
|
+
* the owning provider via `setAttachedIdentifiers`; it never makes the two
|
|
57770
|
+
* devices the same device. Absent ⇒ none declared. */
|
|
57771
|
+
attachedIdentifiers: DeviceIdentifiersSchema.optional(),
|
|
57626
57772
|
/** Optional upstream-system identity + rendering envelope. See
|
|
57627
57773
|
* `SourceInfo` in `packages/types/src/device/source-info.ts`. */
|
|
57628
57774
|
sourceInfo: SourceInfoSchema.optional(),
|
|
@@ -57791,6 +57937,8 @@ var DeviceMetaSchema = zod.z.object({
|
|
|
57791
57937
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
|
|
57792
57938
|
/** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
|
|
57793
57939
|
identifiers: DeviceIdentifiersSchema.optional(),
|
|
57940
|
+
/** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
|
|
57941
|
+
attachedIdentifiers: DeviceIdentifiersSchema.optional(),
|
|
57794
57942
|
/** Optional upstream-system identity + rendering envelope. See
|
|
57795
57943
|
* `SourceInfo`. Present when the device has been persisted with a
|
|
57796
57944
|
* non-synthetic source identifier (HA entities, vendor MAC, …);
|
|
@@ -58304,6 +58452,46 @@ var deviceManagerCapability = {
|
|
|
58304
58452
|
kind: "query",
|
|
58305
58453
|
auth: "admin"
|
|
58306
58454
|
}),
|
|
58455
|
+
/** Declare the identity of the device at the FAR END of this device's
|
|
58456
|
+
* physical link (D1063 amending D1059) — a PoE port's wired client: its MAC,
|
|
58457
|
+
* its IP. Same owner check, normalisation and merge as `setIdentifiers`
|
|
58458
|
+
* (`unread` keeps the stored value), its own column. It never makes the two
|
|
58459
|
+
* devices the same device: it feeds directional identity links only. */
|
|
58460
|
+
setAttachedIdentifiers: require_sleep.method(zod.z.object({
|
|
58461
|
+
deviceId: zod.z.number(),
|
|
58462
|
+
identifiers: DeviceIdentifiersSchema.nullable(),
|
|
58463
|
+
/** Kinds the provider tried to read and could not: their stored value is kept. */
|
|
58464
|
+
unread: zod.z.array(DeviceIdentifierKeySchema).optional()
|
|
58465
|
+
}), zod.z.void(), {
|
|
58466
|
+
kind: "mutation",
|
|
58467
|
+
auth: "admin"
|
|
58468
|
+
}),
|
|
58469
|
+
/** Identity links (D1063): `proposed`, `linked` and `dismissed` relations
|
|
58470
|
+
* between devices of different integrations, decided from their declared
|
|
58471
|
+
* identifiers. With `deviceId`, only the links naming that device.
|
|
58472
|
+
* `not-loaded` until the links have been read — never an empty list. */
|
|
58473
|
+
listIdentityLinks: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().optional() }), IdentityLinksReadSchema, {
|
|
58474
|
+
kind: "query",
|
|
58475
|
+
auth: "admin"
|
|
58476
|
+
}),
|
|
58477
|
+
/** Confirm a `proposed` link: it becomes `linked` by the operator and its
|
|
58478
|
+
* default contributions are added. Refused by name when the link is unknown
|
|
58479
|
+
* or not `proposed`. */
|
|
58480
|
+
confirmIdentityLink: require_sleep.method(zod.z.object({ linkId: zod.z.string().min(1) }), IdentityLinkDecisionSchema, {
|
|
58481
|
+
kind: "mutation",
|
|
58482
|
+
auth: "admin"
|
|
58483
|
+
}),
|
|
58484
|
+
/** Dismiss a `proposed` link: sticky, never proposed again. */
|
|
58485
|
+
dismissIdentityLink: require_sleep.method(zod.z.object({ linkId: zod.z.string().min(1) }), IdentityLinkDecisionSchema, {
|
|
58486
|
+
kind: "mutation",
|
|
58487
|
+
auth: "admin"
|
|
58488
|
+
}),
|
|
58489
|
+
/** Unlink a `linked` link: it becomes `dismissed` (sticky) and its stamped
|
|
58490
|
+
* contributions are removed. */
|
|
58491
|
+
unlinkIdentity: require_sleep.method(zod.z.object({ linkId: zod.z.string().min(1) }), IdentityLinkDecisionSchema, {
|
|
58492
|
+
kind: "mutation",
|
|
58493
|
+
auth: "admin"
|
|
58494
|
+
}),
|
|
58307
58495
|
/** Operator-curated location registry. Returns the union of:
|
|
58308
58496
|
* (1) labels persisted in the registry via `addLocation`, and
|
|
58309
58497
|
* (2) labels currently in use on at least one device's
|
|
@@ -112363,6 +112551,11 @@ function ownedPaths(target) {
|
|
|
112363
112551
|
function find(cap, targetId) {
|
|
112364
112552
|
return scalarTargets(cap).find((target) => target.id === targetId) ?? null;
|
|
112365
112553
|
}
|
|
112554
|
+
/** The feature without its identity-link stamp. */
|
|
112555
|
+
function unstamped(feature) {
|
|
112556
|
+
const { contributedBy, ...rest } = feature;
|
|
112557
|
+
return contributedBy === void 0 ? feature : rest;
|
|
112558
|
+
}
|
|
112366
112559
|
function without(fields, paths) {
|
|
112367
112560
|
return Object.fromEntries(Object.entries(fields).filter(([path]) => !paths.has(path)));
|
|
112368
112561
|
}
|
|
@@ -112375,7 +112568,7 @@ function mergeScalarTarget(current, compiled, cap, targetId) {
|
|
|
112375
112568
|
if (current === null || target === null || scalarTargetCount(cap) < 2) return compiled;
|
|
112376
112569
|
const kept = without(current.fields, new Set(ownedPaths(target)));
|
|
112377
112570
|
return {
|
|
112378
|
-
...current,
|
|
112571
|
+
...unstamped(current),
|
|
112379
112572
|
...compiled,
|
|
112380
112573
|
fields: {
|
|
112381
112574
|
...kept,
|
|
@@ -112393,7 +112586,7 @@ function removeScalarTarget(current, cap, targetId) {
|
|
|
112393
112586
|
const needed = new Set(stillAssigned.flatMap((row) => ownedPaths(row)));
|
|
112394
112587
|
const drop = new Set(ownedPaths(target).filter((path) => !needed.has(path)));
|
|
112395
112588
|
return {
|
|
112396
|
-
...current,
|
|
112589
|
+
...unstamped(current),
|
|
112397
112590
|
fields: without(current.fields, drop)
|
|
112398
112591
|
};
|
|
112399
112592
|
}
|
|
@@ -114473,6 +114666,20 @@ var BaseDevice = class {
|
|
|
114473
114666
|
}, raw, options);
|
|
114474
114667
|
}
|
|
114475
114668
|
/**
|
|
114669
|
+
* Declare the identity of the device at the FAR END of this device's physical
|
|
114670
|
+
* link (D1063): a PoE port's wired client. Same normalisation, `unread`
|
|
114671
|
+
* rule and owner check as {@link declareIdentifiers}, written through
|
|
114672
|
+
* `device-manager.setAttachedIdentifiers`. It never makes the two devices the
|
|
114673
|
+
* same device. Best-effort: never throws.
|
|
114674
|
+
*/
|
|
114675
|
+
async declareAttachedIdentifiers(raw, options) {
|
|
114676
|
+
return declareDeviceIdentifiers({
|
|
114677
|
+
deviceId: this.id,
|
|
114678
|
+
logger: this.ctx.logger,
|
|
114679
|
+
writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
|
|
114680
|
+
}, raw, options);
|
|
114681
|
+
}
|
|
114682
|
+
/**
|
|
114476
114683
|
* Re-publish the device's current `features` array to the persisted
|
|
114477
114684
|
* meta blob. Drivers call this after a probe finishes when the live
|
|
114478
114685
|
* `features` getter has gained new flags (e.g. `hasIntercom` flips
|
|
@@ -122622,6 +122829,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
122622
122829
|
access: "create",
|
|
122623
122830
|
role: "admin"
|
|
122624
122831
|
},
|
|
122832
|
+
"deviceManager.confirmIdentityLink": {
|
|
122833
|
+
capName: "device-manager",
|
|
122834
|
+
capScope: "system",
|
|
122835
|
+
addonId: null,
|
|
122836
|
+
access: "create",
|
|
122837
|
+
role: "admin"
|
|
122838
|
+
},
|
|
122625
122839
|
"deviceManager.createDevice": {
|
|
122626
122840
|
capName: "device-manager",
|
|
122627
122841
|
capScope: "system",
|
|
@@ -122671,6 +122885,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
122671
122885
|
access: "create",
|
|
122672
122886
|
role: "admin"
|
|
122673
122887
|
},
|
|
122888
|
+
"deviceManager.dismissIdentityLink": {
|
|
122889
|
+
capName: "device-manager",
|
|
122890
|
+
capScope: "system",
|
|
122891
|
+
addonId: null,
|
|
122892
|
+
access: "create",
|
|
122893
|
+
role: "admin"
|
|
122894
|
+
},
|
|
122674
122895
|
"deviceManager.enable": {
|
|
122675
122896
|
capName: "device-manager",
|
|
122676
122897
|
capScope: "system",
|
|
@@ -122867,6 +123088,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
122867
123088
|
access: "view",
|
|
122868
123089
|
role: "admin"
|
|
122869
123090
|
},
|
|
123091
|
+
"deviceManager.listIdentityLinks": {
|
|
123092
|
+
capName: "device-manager",
|
|
123093
|
+
capScope: "system",
|
|
123094
|
+
addonId: null,
|
|
123095
|
+
access: "view",
|
|
123096
|
+
role: "admin"
|
|
123097
|
+
},
|
|
122870
123098
|
"deviceManager.listLocationDescriptions": {
|
|
122871
123099
|
capName: "device-manager",
|
|
122872
123100
|
capScope: "system",
|
|
@@ -123063,6 +123291,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
123063
123291
|
access: "create",
|
|
123064
123292
|
role: "admin"
|
|
123065
123293
|
},
|
|
123294
|
+
"deviceManager.setAttachedIdentifiers": {
|
|
123295
|
+
capName: "device-manager",
|
|
123296
|
+
capScope: "system",
|
|
123297
|
+
addonId: null,
|
|
123298
|
+
access: "create",
|
|
123299
|
+
role: "admin"
|
|
123300
|
+
},
|
|
123066
123301
|
"deviceManager.setChildLayout": {
|
|
123067
123302
|
capName: "device-manager",
|
|
123068
123303
|
capScope: "system",
|
|
@@ -123224,6 +123459,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
123224
123459
|
access: "create",
|
|
123225
123460
|
role: "admin"
|
|
123226
123461
|
},
|
|
123462
|
+
"deviceManager.unlinkIdentity": {
|
|
123463
|
+
capName: "device-manager",
|
|
123464
|
+
capScope: "system",
|
|
123465
|
+
addonId: null,
|
|
123466
|
+
access: "delete",
|
|
123467
|
+
role: "admin"
|
|
123468
|
+
},
|
|
123227
123469
|
"deviceManager.updateConfig": {
|
|
123228
123470
|
capName: "device-manager",
|
|
123229
123471
|
capScope: "system",
|
|
@@ -134217,6 +134459,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
134217
134459
|
form: "array",
|
|
134218
134460
|
optional: true
|
|
134219
134461
|
}],
|
|
134462
|
+
"deviceManager.listIdentityLinks": [{
|
|
134463
|
+
name: "deviceId",
|
|
134464
|
+
form: "single",
|
|
134465
|
+
optional: true
|
|
134466
|
+
}],
|
|
134220
134467
|
"deviceManager.loadConfig": [{
|
|
134221
134468
|
name: "deviceId",
|
|
134222
134469
|
form: "single",
|
|
@@ -134267,6 +134514,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
134267
134514
|
form: "single",
|
|
134268
134515
|
optional: false
|
|
134269
134516
|
}],
|
|
134517
|
+
"deviceManager.setAttachedIdentifiers": [{
|
|
134518
|
+
name: "deviceId",
|
|
134519
|
+
form: "single",
|
|
134520
|
+
optional: false
|
|
134521
|
+
}],
|
|
134270
134522
|
"deviceManager.setChildLayout": [{
|
|
134271
134523
|
name: "deviceId",
|
|
134272
134524
|
form: "single",
|
|
@@ -136897,6 +137149,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
136897
137149
|
"deviceManager.getWireableFields",
|
|
136898
137150
|
"deviceManager.getWrapperActivation",
|
|
136899
137151
|
"deviceManager.listAll",
|
|
137152
|
+
"deviceManager.listIdentityLinks",
|
|
136900
137153
|
"deviceManager.loadConfig",
|
|
136901
137154
|
"deviceManager.loadMeta",
|
|
136902
137155
|
"deviceManager.loadRuntimeState",
|
|
@@ -136907,6 +137160,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
136907
137160
|
"deviceManager.removeDevice",
|
|
136908
137161
|
"deviceManager.runDeviceAction",
|
|
136909
137162
|
"deviceManager.setAlias",
|
|
137163
|
+
"deviceManager.setAttachedIdentifiers",
|
|
136910
137164
|
"deviceManager.setChildLayout",
|
|
136911
137165
|
"deviceManager.setDisabled",
|
|
136912
137166
|
"deviceManager.setDisplay",
|
|
@@ -138291,6 +138545,9 @@ function createSystemProxy(api) {
|
|
|
138291
138545
|
getRoleDisplayDefaults: (input) => dispatch("deviceManager", "getRoleDisplayDefaults", "query", input),
|
|
138292
138546
|
setRoleDisplayDefaults: (input) => dispatch("deviceManager", "setRoleDisplayDefaults", "mutation", input),
|
|
138293
138547
|
listIdentityCandidates: (input) => dispatch("deviceManager", "listIdentityCandidates", "query", input),
|
|
138548
|
+
confirmIdentityLink: (input) => dispatch("deviceManager", "confirmIdentityLink", "mutation", input),
|
|
138549
|
+
dismissIdentityLink: (input) => dispatch("deviceManager", "dismissIdentityLink", "mutation", input),
|
|
138550
|
+
unlinkIdentity: (input) => dispatch("deviceManager", "unlinkIdentity", "mutation", input),
|
|
138294
138551
|
listLocations: (input) => dispatch("deviceManager", "listLocations", "query", input),
|
|
138295
138552
|
addLocation: (input) => dispatch("deviceManager", "addLocation", "mutation", input),
|
|
138296
138553
|
removeLocation: (input) => dispatch("deviceManager", "removeLocation", "mutation", input),
|
|
@@ -151661,6 +151918,7 @@ exports.CompositionBlockInputSchema = CompositionBlockInputSchema;
|
|
|
151661
151918
|
exports.CompositionBlockStateSchema = CompositionBlockStateSchema;
|
|
151662
151919
|
exports.CompositionCodeSourceSchema = require_implemented_methods.CompositionCodeSourceSchema;
|
|
151663
151920
|
exports.CompositionCommandTargetSchema = require_implemented_methods.CompositionCommandTargetSchema;
|
|
151921
|
+
exports.CompositionContributedBySchema = require_implemented_methods.CompositionContributedBySchema;
|
|
151664
151922
|
exports.CompositionCustomizationReadSchema = CompositionCustomizationReadSchema;
|
|
151665
151923
|
exports.CompositionEventPlanSchema = CompositionEventPlanSchema;
|
|
151666
151924
|
exports.CompositionExistingTargetSchema = require_implemented_methods.CompositionExistingTargetSchema;
|
|
@@ -152309,6 +152567,8 @@ exports.ICON_CATEGORIES = ICON_CATEGORIES;
|
|
|
152309
152567
|
exports.ICON_ENTRIES = ICON_ENTRIES;
|
|
152310
152568
|
exports.ICON_KEYS = ICON_KEYS;
|
|
152311
152569
|
exports.ICON_VIEWER_MODULES = ICON_VIEWER_MODULES;
|
|
152570
|
+
exports.IDENTITY_LINK_KINDS = IDENTITY_LINK_KINDS;
|
|
152571
|
+
exports.IDENTITY_LINK_KIND_NAMES = IDENTITY_LINK_KIND_NAMES;
|
|
152312
152572
|
exports.IDLE_ACTION_STATUS = IDLE_ACTION_STATUS;
|
|
152313
152573
|
exports.INFERENCE_DEVICE_EXCLUSION_REASONS = INFERENCE_DEVICE_EXCLUSION_REASONS;
|
|
152314
152574
|
exports.INITIAL_PULSE = INITIAL_PULSE;
|
|
@@ -152327,6 +152587,17 @@ exports.IdentityCandidateDeviceSchema = IdentityCandidateDeviceSchema;
|
|
|
152327
152587
|
exports.IdentityCandidatePairSchema = IdentityCandidatePairSchema;
|
|
152328
152588
|
exports.IdentityCandidatesSchema = IdentityCandidatesSchema;
|
|
152329
152589
|
exports.IdentityConfidenceSchema = IdentityConfidenceSchema;
|
|
152590
|
+
exports.IdentityLinkBodySchema = IdentityLinkBodySchema;
|
|
152591
|
+
exports.IdentityLinkDecisionRefusalSchema = IdentityLinkDecisionRefusalSchema;
|
|
152592
|
+
exports.IdentityLinkDecisionSchema = IdentityLinkDecisionSchema;
|
|
152593
|
+
exports.IdentityLinkEventPayloadSchema = IdentityLinkEventPayloadSchema;
|
|
152594
|
+
exports.IdentityLinkKindSchema = IdentityLinkKindSchema;
|
|
152595
|
+
exports.IdentityLinkLostReasonSchema = IdentityLinkLostReasonSchema;
|
|
152596
|
+
exports.IdentityLinkOriginSchema = IdentityLinkOriginSchema;
|
|
152597
|
+
exports.IdentityLinkSchema = IdentityLinkSchema;
|
|
152598
|
+
exports.IdentityLinkSideSchema = IdentityLinkSideSchema;
|
|
152599
|
+
exports.IdentityLinkStateSchema = IdentityLinkStateSchema;
|
|
152600
|
+
exports.IdentityLinksReadSchema = IdentityLinksReadSchema;
|
|
152330
152601
|
exports.IdentityMatchedKeySchema = IdentityMatchedKeySchema;
|
|
152331
152602
|
exports.ImageContractSchema = ImageContractSchema;
|
|
152332
152603
|
exports.ImageContractStateSchema = ImageContractStateSchema;
|
|
@@ -154575,6 +154846,8 @@ exports.iconEntry = iconEntry;
|
|
|
154575
154846
|
exports.iconsInCategory = iconsInCategory;
|
|
154576
154847
|
exports.identifiedEventLeaves = identifiedEventLeaves;
|
|
154577
154848
|
exports.identifierStrength = identifierStrength;
|
|
154849
|
+
exports.identityLinkId = identityLinkId;
|
|
154850
|
+
exports.identityLinkSidesRefusal = identityLinkSidesRefusal;
|
|
154578
154851
|
exports.imageCapability = imageCapability;
|
|
154579
154852
|
exports.imageModesForKind = imageModesForKind;
|
|
154580
154853
|
exports.imageSettingsCapability = imageSettingsCapability;
|