@camstack/types 1.2.267 → 1.2.269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/addon.js +4 -4
  2. package/dist/addon.mjs +3 -3
  3. package/dist/capabilities/battery.cap.d.ts +17 -2
  4. package/dist/capabilities/capability-definition.d.ts +30 -1
  5. package/dist/capabilities/composer.cap.d.ts +105 -0
  6. package/dist/capabilities/consumables.cap.d.ts +79 -0
  7. package/dist/capabilities/core-blocks.cap.d.ts +1213 -104
  8. package/dist/capabilities/device-extension.cap.d.ts +12 -13
  9. package/dist/capabilities/device-manager.cap.d.ts +4 -4
  10. package/dist/capabilities/device-state.cap.d.ts +186 -2
  11. package/dist/capabilities/doorbell.cap.d.ts +4 -0
  12. package/dist/capabilities/index.d.ts +3 -3
  13. package/dist/capabilities/media-player.cap.d.ts +4 -4
  14. package/dist/capabilities/recording-archive.cap.d.ts +3 -3
  15. package/dist/catalogs/sensor-active-state.d.ts +25 -1
  16. package/dist/composition/composition-events.d.ts +42 -0
  17. package/dist/composition/composition-graph.d.ts +42 -9
  18. package/dist/composition/composition-items.d.ts +25 -0
  19. package/dist/composition/composition-report.d.ts +115 -12
  20. package/dist/composition/composition.d.ts +162 -3
  21. package/dist/composition/customization-name.d.ts +6 -0
  22. package/dist/composition/evaluate-field.d.ts +20 -0
  23. package/dist/composition/examples.d.ts +33 -0
  24. package/dist/composition/expression-kinds.d.ts +1 -0
  25. package/dist/composition/field-kinds.d.ts +42 -0
  26. package/dist/composition/index.d.ts +2 -0
  27. package/dist/composition/plan-result.d.ts +18 -0
  28. package/dist/composition/state-fields.d.ts +6 -0
  29. package/dist/composition/validate-composition.d.ts +44 -9
  30. package/dist/composition-BAH3n-zq.js +2582 -0
  31. package/dist/composition-D5BQywfe.mjs +2055 -0
  32. package/dist/device/device-context.d.ts +9 -0
  33. package/dist/device/device-runtime-state.d.ts +15 -1
  34. package/dist/device/index.d.ts +1 -1
  35. package/dist/device-extension/slot-descriptor.d.ts +8 -11
  36. package/dist/device-extension/slot-provider.d.ts +0 -2
  37. package/dist/enums/event-category.d.ts +25 -0
  38. package/dist/enums.js +1 -1
  39. package/dist/enums.mjs +1 -1
  40. package/dist/err-msg-DX6i_MY4.mjs +339 -0
  41. package/dist/err-msg-Dx2Kor0g.js +368 -0
  42. package/dist/{event-category-BVDXG4tB.mjs → event-category-C5xZWqz6.mjs} +31 -1
  43. package/dist/{event-category-BVfsrBYA.js → event-category-MbnB-6AN.js} +48 -0
  44. package/dist/expression/ast.d.ts +2 -0
  45. package/dist/expression/builtins.d.ts +9 -0
  46. package/dist/expression/evaluator.d.ts +8 -2
  47. package/dist/expression/expression-source.d.ts +26 -4
  48. package/dist/expression/index.d.ts +6 -6
  49. package/dist/generated/addon-api.d.ts +42 -0
  50. package/dist/generated/device-proxy.d.ts +1 -1
  51. package/dist/generated/method-access-map.d.ts +1 -1
  52. package/dist/generated/method-device-selectors.d.ts +2 -2
  53. package/dist/generated/system-proxy.d.ts +2 -2
  54. package/dist/index.d.ts +7 -6
  55. package/dist/index.js +1687 -1833
  56. package/dist/index.mjs +1359 -1550
  57. package/dist/interfaces/kernel-abstractions.d.ts +16 -0
  58. package/dist/interfaces/recording-config.d.ts +3 -3
  59. package/dist/interfaces/status-overlay.d.ts +42 -0
  60. package/dist/node.d.ts +1 -0
  61. package/dist/node.js +29 -8
  62. package/dist/node.mjs +23 -3
  63. package/dist/{sleep-8K9gue-H.js → sleep-Bg0IB7gg.js} +10 -367
  64. package/dist/{sleep-DC-wdyeS.mjs → sleep-E6eD4yQS.mjs} +11 -344
  65. package/package.json +1 -1
  66. package/dist/canonical-hash-CPK2Dy60.mjs +0 -715
  67. package/dist/canonical-hash-CSE4ioRi.js +0 -792
  68. package/dist/err-msg-COpsHMw2.js +0 -18
  69. package/dist/err-msg-IQTHeDzc.mjs +0 -13
@@ -294,7 +294,7 @@ export interface DeviceProxy {
294
294
  readonly deviceAdoption: Pick<InferDeviceProxyCap<typeof deviceAdoptionCapability>, 'getStatus'>;
295
295
  readonly deviceExport: Pick<InferDeviceProxyCap<typeof deviceExportCapability>, 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
296
296
  readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setLocation' | 'setType' | 'setIntegrationId' | 'setLinkDeviceId' | 'setPrimaryChildEntityId' | 'setChildLayout' | 'setDisplay' | 'getWireableFields' | 'setRole' | 'applyInitialMeta' | 'setMetadata' | 'setDisabled' | 'getDevice' | 'getLinkedDevices' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'setWrapperActive' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'runDeviceAction' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate'>;
297
- readonly deviceState: Pick<InferDeviceProxyCap<typeof deviceStateCapability>, 'getSnapshot' | 'getCapSlice' | 'setCapSlice'>;
297
+ readonly deviceState: Pick<InferDeviceProxyCap<typeof deviceStateCapability>, 'getSnapshot' | 'getCapSlice' | 'setCapSlice' | 'claimFields' | 'patchOwnedFields' | 'releaseClaim' | 'getNativeCapSlice'>;
298
298
  readonly faceGallery: Pick<InferDeviceProxyCap<typeof faceGalleryCapability>, 'listRecentFaces' | 'getFaceByTrack'>;
299
299
  readonly networkQuality: Pick<InferDeviceProxyCap<typeof networkQualityCapability>, 'getDeviceStats' | 'reportClientStats'>;
300
300
  readonly notificationRules: Pick<InferDeviceProxyCap<typeof notificationRulesCapability>, 'setDeviceMuted'>;
@@ -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: 1185 method paths across 162 capabilities.
9
+ * Coverage: 1191 method paths across 162 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -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: 399 methods carry a device reference, of which
10
- * 138 are on SYSTEM-scope caps.
9
+ * Coverage: 403 methods carry a device reference, of which
10
+ * 142 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
@@ -65,13 +65,13 @@ export interface SystemProxy {
65
65
  readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'listRuns' | 'cancel' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
66
66
  readonly broker: Pick<InferProvider<typeof brokerCapability>, 'list' | 'get' | 'listProviders' | 'add' | 'remove' | 'testConnection' | 'getSettings' | 'setSettings' | 'getBrokerConfig' | 'getSettingsSchema' | 'testSettings' | 'publish' | 'subscribe' | 'unsubscribe' | 'getState' | 'getStatus'>;
67
67
  readonly connectionTest: Pick<InferProvider<typeof connectionTestCapability>, 'testSettings' | 'describeTest'>;
68
- readonly coreBlocks: Pick<InferProvider<typeof coreBlocksCapability>, 'list' | 'get' | 'create' | 'update' | 'delete' | 'setEnabled' | 'restart' | 'compile' | 'getTypeDefs' | 'createComposition' | 'updateComposition' | 'getComposition' | 'listCompositions' | 'validateComposition'>;
68
+ readonly coreBlocks: Pick<InferProvider<typeof coreBlocksCapability>, 'list' | 'get' | 'create' | 'update' | 'delete' | 'setEnabled' | 'restart' | 'compile' | 'getTypeDefs' | 'createComposition' | 'updateComposition' | 'getComposition' | 'listCompositions' | 'getCustomization' | 'validateComposition'>;
69
69
  readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'supportsCodec' | 'getInfo' | 'createSession' | 'destroySession' | 'pushPacket' | 'openStream' | 'pullFrames' | 'pullHandles' | 'getFrame' | 'getShmStats' | 'updateConfig' | 'getStats' | 'listActiveSessions' | 'reprobeHwaccel'>;
70
70
  readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
71
71
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice'>;
72
72
  readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
73
73
  readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
74
- readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
74
+ readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots' | 'listClaims'>;
75
75
  readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'auditIdentitySamples' | 'removeSample' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
76
76
  readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
77
77
  readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'cancel' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'resolveModelRef' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
package/dist/index.d.ts CHANGED
@@ -94,6 +94,7 @@ export type * from './interfaces/scoped-token.js';
94
94
  export type * from './interfaces/server-analysis.js';
95
95
  export * from './interfaces/server-analysis.js';
96
96
  export type * from './interfaces/server-network.js';
97
+ export type * from './interfaces/status-overlay.js';
97
98
  export type * from './interfaces/storage.js';
98
99
  export type { LegacyStorageLocationDefault, StorageDrainProgress, StorageLocation, StorageLocationRef, } from './interfaces/storage-location.js';
99
100
  export { gbToBytes, isLocationEnabled, LegacyStorageLocationDefaultSchema, STORAGE_BYTES_PER_GB, StorageDrainProgressSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, } from './interfaces/storage-location.js';
@@ -149,7 +150,7 @@ export { COCO_80_LABELS, COCO_TO_MACRO, DETECTION_MACRO_CLASSES, isDetectionMacr
149
150
  export { DEVICE_STATE_READERS, readDeviceStateFrom, stateVocabularyFor, } from './catalogs/device-state-vocabulary.js';
150
151
  export { colorForKind, DEFAULT_EVENT_COLOR, EVENT_TAXONOMY, type EventTaxonomyCategory, type EventTaxonomyEntry, type EventTaxonomyLevel, getTaxonomyEntry, subKindsOf, TAXONOMY_COLORS, } from './catalogs/event-taxonomy.js';
151
152
  export { buildNcTaxonomy, NC_TAXONOMY, type NcTaxonomy, type NcTaxonomyEntry, NcTaxonomyEntrySchema, NcTaxonomySchema, } from './catalogs/nc-taxonomy.js';
152
- export { DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, evaluateSensorEdge, isSourceCap, type SensorEdgeIgnoreReason, type SensorEdgeInput, type SensorEdgeVerdict, SOURCE_CAP_ACTIVE_FIELD, SOURCE_CAP_CHANGED_AT_FIELD, SOURCE_CAPS, SOURCE_DEVICE_TYPES, sliceActiveValue, sliceChangedAt, } from './catalogs/sensor-active-state.js';
153
+ export { DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, evaluateSensorEdge, evaluateSensorLevelEdge, isSourceCap, type SensorEdgeIgnoreReason, type SensorEdgeInput, type SensorEdgeVerdict, type SensorLevelEdgeInput, type SensorLevelEdgeVerdict, SOURCE_CAP_ACTIVE_FIELD, SOURCE_CAP_CHANGED_AT_FIELD, SOURCE_CAPS, SOURCE_DEVICE_TYPES, sliceActiveValue, sliceChangedAt, } from './catalogs/sensor-active-state.js';
153
154
  export * from './constants.js';
154
155
  export type { AccessoryKindValue } from './device/accessory.js';
155
156
  export { ACCESSORY_LABEL, AccessoryKind, accessoryStableId, } from './device/accessory.js';
@@ -175,7 +176,7 @@ export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, Pipeline
175
176
  export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device/device-profile.js';
176
177
  export type { DeviceRestoreRetrySchedulerOptions, InitialRestoreFailure, PermanentRestoreFailure, PermanentRestoreFailureHandler, RestoreAttemptFn, } from './device/device-restore-retry.js';
177
178
  export { DEVICE_RESTORE_RETRY_CONCURRENCY, DEVICE_RESTORE_RETRY_DELAYS_MS, DeviceRestoreRetryScheduler, } from './device/device-restore-retry.js';
178
- export type { IDeviceRuntimeState } from './device/device-runtime-state.js';
179
+ export type { IDeviceRuntimeState, RuntimeStateWriteFailed, RuntimeStateWriter, } from './device/device-runtime-state.js';
179
180
  export { DeviceRuntimeState } from './device/device-runtime-state.js';
180
181
  export type { SliceEventBus, SliceHandle, SliceHandleApi, SliceHandleSource, } from './device/device-state-handle.js';
181
182
  export { createEventBusSliceSource, createLazyTrpcSource, createMirrorSource, createSliceHandle, } from './device/device-state-handle.js';
@@ -191,17 +192,17 @@ export { REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHA
191
192
  export type { RuntimeStateBridge, RuntimeStateStaleReadPolicy, } from './device/runtime-state-helpers.js';
192
193
  export { createRuntimeStateBridge, OPERATOR_WRITTEN_STALE_MS, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, } from './device/runtime-state-helpers.js';
193
194
  export type { WireableField } from './device/schema-fields.js';
194
- export { enumerateItemArrayFields, enumerateSchemaFields } from './device/schema-fields.js';
195
+ export { enumerateItemArrayFields, enumerateSchemaFields, unwrapSchema, } from './device/schema-fields.js';
195
196
  export type { SourceInfo } from './device/source-info.js';
196
197
  export { extractSourceInfoFromMetadata, mergeSourceInfo, normalizeUnit, SOURCE_INFO_METADATA_KEY, SourceInfoSchema, synthesizeSourceInfo, } from './device/source-info.js';
197
198
  export type { DeviceCapListener, DeviceLifecycleListener, DeviceQueryFilters, StringMatch, SystemMirrorApi, SystemMirrorListener, } from './device/system-mirror.js';
198
199
  export { SystemMirror } from './device/system-mirror.js';
199
200
  export type { DeviceConfigEntry } from './device/zod-to-config-ui.js';
200
201
  export { zodEntriesToConfigUI } from './device/zod-to-config-ui.js';
201
- export { EventCategory } from './enums/event-category.js';
202
+ export { EventCategory, isOwnerOnlyEventCategory, OWNER_ONLY_EVENT_CATEGORIES, publicEventCategories, } from './enums/event-category.js';
202
203
  export * from './enums/index.js';
203
- export type { CompileResult, EvaluateExpressionSourceResult, ExpressionBinaryOperator, ExpressionBindingSource, ExpressionBuiltin, ExpressionEvalHooks, ExpressionEvalOptions, ExpressionFieldBinding, ExpressionGlobalBinding, ExpressionLiteralBinding, ExpressionLogicalOperator, ExpressionNode, ExpressionSource, ExpressionSourceInput, ExpressionUnaryOperator, ExpressionValue, Keyword, ParsedExpression, Punctuator, Token, } from './expression/index.js';
204
- export { compileExpression, compileExpressionSafe, createExpressionScope, EXPRESSION_BUILTIN_NAMES, EXPRESSION_BUILTINS, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, evaluateAst, evaluateExpressionSource, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, parseExpression, RESERVED_BINDING_NAMES, toExpressionValue, tokenize, validateExpressionSource, } from './expression/index.js';
204
+ export type { CompileResult, EvaluateExpressionSourceResult, ExpressionBinaryOperator, ExpressionBindingSource, ExpressionBuiltin, ExpressionEvalHooks, ExpressionEvalOptions, ExpressionFieldBinding, ExpressionGlobalBinding, ExpressionLiteralBinding, ExpressionLogicalOperator, ExpressionNode, ExpressionNodePath, ExpressionSource, ExpressionSourceInput, ExpressionUnaryOperator, ExpressionValue, CountCallState, RoseCallState, StatefulCallState, StatefulCallInvocation, StatefulExpressionEnvironment, StatefulExpressionMemory, StatefulExpressionBuiltin, Keyword, ParsedExpression, Punctuator, Token, } from './expression/index.js';
205
+ export { compileExpression, compileExpressionSafe, cloneStatefulExpressionMemory, createExpressionScope, createStatefulExpressionMemory, EXPRESSION_BUILTIN_NAMES, EXPRESSION_BUILTINS, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, evaluateAst, evaluateCount, evaluateExpressionSource, evaluateRose, evaluateStatefulExpressionCall, isStatefulBuiltin, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, parseExpression, RESERVED_BINDING_NAMES, toExpressionValue, tokenize, validateExpressionSource, } from './expression/index.js';
205
206
  export type { AddonApi, AppRouter } from './generated/addon-api.js';
206
207
  export type { CapNameWithStatus, CapStatusTypeMap } from './generated/cap-status-types.js';
207
208
  export { CAP_NAMES_WITH_STATUS } from './generated/cap-status-types.js';