@camstack/types 1.2.15 → 1.2.17
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.d.ts +1 -0
- package/dist/addon.js +265 -1
- package/dist/addon.mjs +264 -2
- package/dist/capabilities/addons.cap.d.ts +7 -7
- package/dist/capabilities/backup.cap.d.ts +73 -1
- package/dist/capabilities/broker.cap.d.ts +8 -8
- package/dist/capabilities/camera-streams.cap.d.ts +5 -5
- package/dist/capabilities/climate-control.cap.d.ts +8 -8
- package/dist/capabilities/day-night.cap.d.ts +8 -8
- package/dist/capabilities/decoder.cap.d.ts +2 -2
- package/dist/capabilities/device-manager.cap.d.ts +2 -2
- package/dist/capabilities/face-gallery.cap.d.ts +1 -1
- package/dist/capabilities/image-settings.cap.d.ts +16 -16
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/intercom.cap.d.ts +6 -6
- package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
- package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
- package/dist/capabilities/llm.cap.d.ts +4 -4
- package/dist/capabilities/local-network.cap.d.ts +38 -0
- package/dist/capabilities/media-player.cap.d.ts +9 -9
- package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
- package/dist/capabilities/mqtt-broker.cap.d.ts +3 -3
- package/dist/capabilities/notification-output.cap.d.ts +4 -0
- package/dist/capabilities/notification-rules.cap.d.ts +236 -18
- package/dist/capabilities/pipeline-analytics.cap.d.ts +64 -27
- package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +15 -15
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -2
- package/dist/capabilities/recording-export.cap.d.ts +7 -7
- package/dist/capabilities/recording.cap.d.ts +102 -129
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +4 -4
- package/dist/capabilities/storage-provider.cap.d.ts +44 -0
- package/dist/capabilities/storage.cap.d.ts +17 -0
- package/dist/capabilities/stream-broker.cap.d.ts +58 -12
- package/dist/capabilities/webrtc-session.cap.d.ts +6 -6
- package/dist/generated/addon-api.d.ts +5365 -30879
- package/dist/generated/cap-input-defaults.d.ts +29 -0
- package/dist/generated/device-proxy.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +693 -139
- package/dist/index.mjs +684 -136
- package/dist/interfaces/addon.d.ts +9 -0
- package/dist/interfaces/ops-log.d.ts +2 -0
- package/dist/interfaces/recording-config.d.ts +33 -91
- package/dist/interfaces/relocate.d.ts +55 -0
- package/dist/interfaces/storage-location-declaration.d.ts +1 -0
- package/dist/interfaces/storage-location.d.ts +4 -0
- package/dist/interfaces/stream-broker.d.ts +1 -1
- package/dist/lifecycle/job.d.ts +6 -6
- package/dist/node.js +1 -0
- package/dist/node.mjs +1 -0
- package/dist/notification/condition-taxonomy.d.ts +61 -0
- package/dist/notification/format-transcode.d.ts +12 -1
- package/dist/{sleep-C3ceNSsf.mjs → sleep-Ct4Is70g.mjs} +6 -0
- package/dist/{sleep-DRg9F6JJ.js → sleep-yfPaamGa.js} +6 -0
- package/package.json +1 -1
- 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:
|
|
9
|
+
* Coverage: 825 method paths across 117 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -58,7 +58,7 @@ export interface SystemProxy {
|
|
|
58
58
|
readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
|
|
59
59
|
readonly audioAnalyzer: Pick<InferProvider<typeof audioAnalyzerCapability>, 'analyseChunk' | 'classify' | 'isReady' | 'dispose' | 'reprobeAudioEngine'>;
|
|
60
60
|
readonly audioCodec: Pick<InferProvider<typeof audioCodecCapability>, 'listSupportedCodecs' | 'canHandle' | 'createDecodeSession' | 'createEncodeSession' | 'closeSession' | 'pushEncodedFrame' | 'pullPcm' | 'pushPcm' | 'pullEncoded' | 'flushEncode' | 'listActiveSessions'>;
|
|
61
|
-
readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule'>;
|
|
61
|
+
readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
|
|
62
62
|
readonly broker: Pick<InferProvider<typeof brokerCapability>, 'list' | 'get' | 'listProviders' | 'add' | 'remove' | 'testConnection' | 'getSettings' | 'setSettings' | 'getBrokerConfig' | 'getSettingsSchema' | 'testSettings' | 'publish' | 'subscribe' | 'unsubscribe' | 'getState' | 'getStatus'>;
|
|
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'>;
|
|
@@ -69,7 +69,7 @@ export interface SystemProxy {
|
|
|
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';
|