@camstack/types 1.2.16 → 1.2.18

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 (64) hide show
  1. package/dist/addon.d.ts +1 -0
  2. package/dist/addon.js +266 -2
  3. package/dist/addon.mjs +265 -3
  4. package/dist/capabilities/addons.cap.d.ts +7 -7
  5. package/dist/capabilities/broker.cap.d.ts +8 -8
  6. package/dist/capabilities/camera-streams.cap.d.ts +5 -5
  7. package/dist/capabilities/climate-control.cap.d.ts +8 -8
  8. package/dist/capabilities/day-night.cap.d.ts +8 -8
  9. package/dist/capabilities/decoder.cap.d.ts +2 -2
  10. package/dist/capabilities/device-manager.cap.d.ts +24 -2
  11. package/dist/capabilities/face-gallery.cap.d.ts +1 -1
  12. package/dist/capabilities/image-settings.cap.d.ts +16 -16
  13. package/dist/capabilities/index.d.ts +2 -2
  14. package/dist/capabilities/intercom.cap.d.ts +6 -6
  15. package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
  16. package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
  17. package/dist/capabilities/llm.cap.d.ts +4 -4
  18. package/dist/capabilities/local-network.cap.d.ts +38 -0
  19. package/dist/capabilities/media-player.cap.d.ts +9 -9
  20. package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
  21. package/dist/capabilities/mqtt-broker.cap.d.ts +3 -3
  22. package/dist/capabilities/notification-output.cap.d.ts +4 -0
  23. package/dist/capabilities/notification-rules.cap.d.ts +378 -18
  24. package/dist/capabilities/pipeline-analytics.cap.d.ts +133 -27
  25. package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
  26. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +15 -15
  27. package/dist/capabilities/pipeline-runner.cap.d.ts +2 -2
  28. package/dist/capabilities/recording-export.cap.d.ts +7 -7
  29. package/dist/capabilities/recording.cap.d.ts +102 -129
  30. package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
  31. package/dist/capabilities/schemas/streaming-shared.d.ts +4 -4
  32. package/dist/capabilities/storage-provider.cap.d.ts +44 -0
  33. package/dist/capabilities/storage.cap.d.ts +17 -1
  34. package/dist/capabilities/stream-broker.cap.d.ts +58 -12
  35. package/dist/capabilities/webrtc-session.cap.d.ts +6 -6
  36. package/dist/enums/event-category.d.ts +13 -0
  37. package/dist/enums.js +1 -1
  38. package/dist/enums.mjs +1 -1
  39. package/dist/{event-category-Cdyife4p.js → event-category-39bpf1r_.js} +13 -0
  40. package/dist/{event-category-BLcNejAE.mjs → event-category-Bz24uP1U.mjs} +13 -0
  41. package/dist/generated/addon-api.d.ts +5358 -30965
  42. package/dist/generated/cap-input-defaults.d.ts +29 -0
  43. package/dist/generated/device-proxy.d.ts +2 -2
  44. package/dist/generated/method-access-map.d.ts +1 -1
  45. package/dist/generated/system-proxy.d.ts +3 -3
  46. package/dist/index.d.ts +2 -1
  47. package/dist/index.js +724 -138
  48. package/dist/index.mjs +711 -135
  49. package/dist/interfaces/addon.d.ts +9 -0
  50. package/dist/interfaces/ops-log.d.ts +2 -0
  51. package/dist/interfaces/recording-config.d.ts +33 -91
  52. package/dist/interfaces/relocate.d.ts +55 -0
  53. package/dist/interfaces/storage-location-declaration.d.ts +1 -1
  54. package/dist/interfaces/storage-location.d.ts +4 -0
  55. package/dist/interfaces/stream-broker.d.ts +1 -1
  56. package/dist/lifecycle/job.d.ts +6 -6
  57. package/dist/node.js +1 -0
  58. package/dist/node.mjs +1 -0
  59. package/dist/notification/condition-taxonomy.d.ts +61 -0
  60. package/dist/notification/format-transcode.d.ts +12 -1
  61. package/dist/{sleep-C3ceNSsf.mjs → sleep-B_Uaqbai.mjs} +7 -1
  62. package/dist/{sleep-DRg9F6JJ.js → sleep-DETsT9rJ.js} +7 -1
  63. package/package.json +1 -1
  64. package/dist/interfaces/recording-config-migrate.d.ts +0 -12
@@ -0,0 +1,29 @@
1
+ /**
2
+ * AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
3
+ *
4
+ * capName → method → the TOP-LEVEL input defaults the method's Zod schema
5
+ * would materialise. A cap call made from an addon (`ctx.api`) never passes
6
+ * through the tRPC router, so those `.default(…)` values never run — three
7
+ * production failures in one day came from exactly that (see the generator's
8
+ * header). The addon link merges these in, so a declared default means the same
9
+ * thing on both paths.
10
+ *
11
+ * Plain data, zero Zod: a forked runner must not import the schema barrel
12
+ * (~144MB RSS per runner — D28).
13
+ *
14
+ * Coverage: 21 caps, 48 methods with defaults.
15
+ */
16
+ export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
17
+ /**
18
+ * Fill the declared defaults for `(capName, method)` into `input`, WITHOUT
19
+ * touching anything the caller set.
20
+ *
21
+ * Deliberately additive-only:
22
+ * - a caller-provided value always wins (including `null`; only `undefined`
23
+ * is treated as absent);
24
+ * - unknown keys survive untouched — the addon path carries routing fields
25
+ * (`nodeId`, `addonId`) inline in the args, and a Zod parse would strip
26
+ * them and silently break routing;
27
+ * - a non-object input is returned as-is.
28
+ */
29
+ export declare function withCapInputDefaults(capName: string, method: string, input: unknown): unknown;
@@ -274,9 +274,9 @@ export interface DeviceProxy {
274
274
  readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'setPipelineDevicePin' | 'getPipelineDevicePin' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getAudioAssignments' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getCameraStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
275
275
  readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics' | 'runDetailSubtree'>;
276
276
  readonly plateGallery: Pick<InferDeviceProxyCap<typeof plateGalleryCapability>, 'listPlates' | 'getPlateByTrack'>;
277
- readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
277
+ readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'renderGif' | 'renderClip' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
278
278
  readonly recordingExport: Pick<InferDeviceProxyCap<typeof recordingExportCapability>, 'createExport' | 'listExports'>;
279
- readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'restartProfile' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
279
+ readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'renderPreBufferClip' | 'restartProfile' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
280
280
  }
281
281
  /**
282
282
  * Build a DeviceProxy that pre-binds deviceId + nodeId on every method call
@@ -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: 814 method paths across 117 capabilities.
9
+ * Coverage: 826 method paths across 117 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -63,13 +63,13 @@ export interface SystemProxy {
63
63
  readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'supportsCodec' | 'getInfo' | 'createSession' | 'destroySession' | 'pushPacket' | 'openStream' | 'pullFrames' | 'pullHandles' | 'getFrame' | 'getShmStats' | 'updateConfig' | 'getStats' | 'listActiveSessions' | 'reprobeHwaccel'>;
64
64
  readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
65
65
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice'>;
66
- readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'removeByIntegration' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema'>;
66
+ readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'removeByIntegration' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
67
67
  readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
68
68
  readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
69
69
  readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'removeSample' | 'listRecentFaces' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
70
70
  readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
71
71
  readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
72
- readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch'>;
72
+ readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch'>;
73
73
  readonly meshNetwork: Pick<InferProvider<typeof meshNetworkCapability>, 'getStatus' | 'join' | 'startLogin' | 'leave' | 'logout' | 'listPeers' | 'testConnection'>;
74
74
  readonly metricsProvider: Pick<InferProvider<typeof metricsProviderCapability>, 'collectSnapshot' | 'getCached' | 'getCurrent' | 'getDiskSpace' | 'getGpuInfo' | 'getCpuTemperature' | 'getProcessStats' | 'listAddonInstances' | 'getAddonStats' | 'listNodeProcesses' | 'killProcess' | 'dumpHeapSnapshot'>;
75
75
  readonly mqttBroker: Pick<InferProvider<typeof mqttBrokerCapability>, 'listBrokers' | 'getBrokerConfig' | 'addBroker' | 'removeBroker' | 'testConnection' | 'startEmbeddedBroker' | 'stopEmbeddedBroker' | 'getStatus'>;
@@ -82,7 +82,7 @@ export interface SystemProxy {
82
82
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
83
83
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop'>;
84
84
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
85
- readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog'>;
85
+ readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'relocateFootage' | 'getRelocateStatus' | 'cancelRelocate'>;
86
86
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl'>;
87
87
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
88
88
  readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'update' | 'delete' | 'count' | 'histogram' | 'isEmpty' | 'declareCollection'>;
package/dist/index.d.ts CHANGED
@@ -42,8 +42,8 @@ export type * from './interfaces/raw-tensor-engine.js';
42
42
  export type * from './interfaces/inference-capabilities.js';
43
43
  export type * from './interfaces/analysis.js';
44
44
  export * from './interfaces/recording-config.js';
45
- export { migrateConfigToBands } from './interfaces/recording-config-migrate.js';
46
45
  export * from './interfaces/ops-log.js';
46
+ export * from './interfaces/relocate.js';
47
47
  export type * from './interfaces/python-env.js';
48
48
  export type * from './interfaces/network.js';
49
49
  export type * from './interfaces/router.js';
@@ -139,6 +139,7 @@ export type { RuntimeStateBridge } from './device/runtime-state-helpers.js';
139
139
  export { startReachabilityPoll, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_PROBE_TIMEOUT_MS, } from './device/reachability-poll.js';
140
140
  export type { ReachabilityPollOptions, ReachabilityPollHandle, ReachabilityPollLogger, } from './device/reachability-poll.js';
141
141
  export { prepareNotification, type PreparedAction, type PreparedAttachment, type PreparedNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
142
+ export { isBaseConditionKey, knownValues, NC_BASE_CONDITION_KEYS, type NcBaseConditionKey, pickerForCondition, type TaxonomyGroup, type TaxonomyOption, type TaxonomyPicker, } from './notification/condition-taxonomy.js';
142
143
  export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
143
144
  export { TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, } from './notification/timelapse-rule.js';
144
145
  export type { TimelapseRule, TimelapseRuleInput, TimelapseRulePatch, TimelapseTemplate, } from './notification/timelapse-rule.js';