@camstack/types 1.2.71 → 1.2.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +18 -2
- package/dist/addon.mjs +18 -2
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/llm-runtime.cap.d.ts +106 -0
- package/dist/capabilities/llm-shared.d.ts +37 -0
- package/dist/capabilities/llm.cap.d.ts +167 -0
- package/dist/capabilities/notification-rules.cap.d.ts +27 -19
- package/dist/capabilities/scene-monitor.cap.d.ts +353 -15
- package/dist/capabilities/system.cap.d.ts +130 -1
- package/dist/generated/addon-api.d.ts +33 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +521 -50
- package/dist/index.mjs +503 -51
- package/dist/notification/audio-condition.d.ts +53 -1
- package/dist/{sleep-DbVrpKVz.js → sleep-B-mRsuDp.js} +1 -0
- package/dist/{sleep-CTgUmjYq.mjs → sleep-CQayd2Su.mjs} +1 -0
- package/package.json +1 -1
|
@@ -3354,6 +3354,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
3354
3354
|
output: z.infer<typeof llmCapability.methods.generateVision.output>;
|
|
3355
3355
|
meta: object;
|
|
3356
3356
|
}>;
|
|
3357
|
+
cancel: TRPCMutationProcedure<{
|
|
3358
|
+
input: {
|
|
3359
|
+
[x: string]: unknown;
|
|
3360
|
+
} & z.input<typeof llmCapability.methods.cancel.input>;
|
|
3361
|
+
output: z.infer<typeof llmCapability.methods.cancel.output>;
|
|
3362
|
+
meta: object;
|
|
3363
|
+
}>;
|
|
3357
3364
|
listProfileKinds: TRPCQueryProcedure<{
|
|
3358
3365
|
input: {
|
|
3359
3366
|
[x: string]: unknown;
|
|
@@ -6464,6 +6471,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6464
6471
|
output: z.infer<typeof sceneMonitorCapability.methods.recheckNow.output>;
|
|
6465
6472
|
meta: object;
|
|
6466
6473
|
}>;
|
|
6474
|
+
resetScene: TRPCMutationProcedure<{
|
|
6475
|
+
input: {
|
|
6476
|
+
[x: string]: unknown;
|
|
6477
|
+
} & z.input<typeof sceneMonitorCapability.methods.resetScene.input>;
|
|
6478
|
+
output: z.infer<typeof sceneMonitorCapability.methods.resetScene.output>;
|
|
6479
|
+
meta: object;
|
|
6480
|
+
}>;
|
|
6467
6481
|
}>>;
|
|
6468
6482
|
scriptRunner: TRPCBuiltRouter<{
|
|
6469
6483
|
ctx: TrpcContext;
|
|
@@ -7487,6 +7501,25 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
7487
7501
|
output: z.infer<typeof systemCapability.methods.forceRetentionCleanup.output>;
|
|
7488
7502
|
meta: object;
|
|
7489
7503
|
}>;
|
|
7504
|
+
getSiteLocation: TRPCQueryProcedure<{
|
|
7505
|
+
input: {
|
|
7506
|
+
nodeId?: string | undefined;
|
|
7507
|
+
} | undefined;
|
|
7508
|
+
output: z.infer<typeof systemCapability.methods.getSiteLocation.output>;
|
|
7509
|
+
meta: object;
|
|
7510
|
+
}>;
|
|
7511
|
+
setSiteLocation: TRPCMutationProcedure<{
|
|
7512
|
+
input: z.input<typeof systemCapability.methods.setSiteLocation.input>;
|
|
7513
|
+
output: z.infer<typeof systemCapability.methods.setSiteLocation.output>;
|
|
7514
|
+
meta: object;
|
|
7515
|
+
}>;
|
|
7516
|
+
detectSiteLocation: TRPCMutationProcedure<{
|
|
7517
|
+
input: {
|
|
7518
|
+
nodeId?: string | undefined;
|
|
7519
|
+
} | undefined;
|
|
7520
|
+
output: z.infer<typeof systemCapability.methods.detectSiteLocation.output>;
|
|
7521
|
+
meta: object;
|
|
7522
|
+
}>;
|
|
7490
7523
|
}>>;
|
|
7491
7524
|
tamper: TRPCBuiltRouter<{
|
|
7492
7525
|
ctx: TrpcContext;
|
|
@@ -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: 938 method paths across 123 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 331 methods carry a device reference, of which
|
|
10
10
|
* 124 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Only TOP-LEVEL input fields appear here; a nested device id is not
|
|
@@ -73,7 +73,7 @@ export interface SystemProxy {
|
|
|
73
73
|
readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
|
|
74
74
|
readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'removeSample' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
|
|
75
75
|
readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
|
|
76
|
-
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'>;
|
|
76
|
+
readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'cancel' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
|
|
77
77
|
readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch'>;
|
|
78
78
|
readonly meshNetwork: Pick<InferProvider<typeof meshNetworkCapability>, 'getStatus' | 'join' | 'startLogin' | 'leave' | 'logout' | 'listPeers' | 'testConnection'>;
|
|
79
79
|
readonly metricsProvider: Pick<InferProvider<typeof metricsProviderCapability>, 'collectSnapshot' | 'getCached' | 'getCurrent' | 'getDiskSpace' | 'getGpuInfo' | 'getCpuTemperature' | 'getProcessStats' | 'listAddonInstances' | 'getAddonStats' | 'listNodeProcesses' | 'killProcess' | 'dumpHeapSnapshot'>;
|
|
@@ -94,7 +94,7 @@ export interface SystemProxy {
|
|
|
94
94
|
readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
|
|
95
95
|
readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel'>;
|
|
96
96
|
readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
|
|
97
|
-
readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup'>;
|
|
97
|
+
readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation'>;
|
|
98
98
|
readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listInstances' | 'createInstance' | 'deleteInstance' | 'setInstanceEnabled' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
|
|
99
99
|
readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
|
|
100
100
|
readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ export type { AudioCodecInfo, AudioDecodeSessionConfig, AudioEncodedChunk, Audio
|
|
|
188
188
|
export type { StreamQuality } from './interfaces/device-capabilities/camera.js';
|
|
189
189
|
export { STREAM_QUALITY_LABELS, streamQualityLabel, } from './interfaces/device-capabilities/camera.js';
|
|
190
190
|
export * from './lifecycle/index.js';
|
|
191
|
-
export { audioIsFailClosed, audioLabelChoices, audioOrDefaults, isAudioLabelSelected, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, type NcAudioLabelChoice, type NcAudioPatch, normalizeAudioLabel, patchAudio, toggleAudioLabel, } from './notification/audio-condition.js';
|
|
191
|
+
export { audioIsFailClosed, audioLabelChoices, audioModeOf, audioOrDefaults, isAudioLabelSelected, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, type NcAudioLabelChoice, type NcAudioMode, type NcAudioPatch, normalizeAudioLabel, patchAudio, toggleAudioLabel, } from './notification/audio-condition.js';
|
|
192
192
|
export { isBaseConditionKey, knownValues, NC_BASE_CONDITION_KEYS, type NcBaseConditionKey, pickerForCondition, type TaxonomyGroup, type TaxonomyOption, type TaxonomyPicker, } from './notification/condition-taxonomy.js';
|
|
193
193
|
export { type PreparedAction, type PreparedAttachment, type PreparedNotification, prepareNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
|
|
194
194
|
export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
|
|
@@ -197,8 +197,8 @@ export type { TimelapseCadencePair, TimelapsePreviewMode, TimelapseRule, Timelap
|
|
|
197
197
|
export { assertTimelapseCadences, DEFAULT_TIMELAPSE_PREVIEW_TEXT, readTimelapseGeneratedAt, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, } from './notification/timelapse-rule.js';
|
|
198
198
|
export { DEFAULT_DETAIL_CROP_CONVENTION, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, type DetailCropConvention, DetailCropConventionSchema, type DetailCropRect, deriveDetailCropRect, type HydratedSettingsSection, type HydratedSettingsView, pickDetailCropConvention, readDetailCropConvention, } from './pipeline/detail-crop.js';
|
|
199
199
|
export { DEFAULT_NATIVE_LEASE_SETTINGS, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_HOLD_FIELD, NATIVE_LEASE_HOLD_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TILE_BUDGET_FIELD, NATIVE_LEASE_TILE_BUDGET_KEY, type NativeLeaseAdmission, NativeLeaseAdmissionSchema, type NativeLeaseKnob, type NativeLeaseNumberKnob, type NativeLeaseSettings, type NativeLeaseSettingsOverride, NativeLeaseSettingsSchema, pickNativeLeaseOverride, readNativeLeaseOverride, } from './pipeline/native-lease.js';
|
|
200
|
-
export { type ApiKeyRecord, ApiKeyRecordSchema, type CapScope, CapScopeSchema, type DeviceSelector, DeviceSelectorSchema, type DeviceTokenScope, type MethodAccess, MethodAccessSchema, type ScopedToken, ScopedTokenSchema, type TokenScope, TokenScopeSchema, type UserRecord, UserRecordSchema, } from './schemas/auth-records.js';
|
|
201
200
|
export { ACCESS_ROLES, type AccessRoleAssignment, type AccessRoleId, type AccessRoleSpec, buildRoleScopes, detectAccessRole, roleSpec, } from './schemas/access-roles.js';
|
|
201
|
+
export { type ApiKeyRecord, ApiKeyRecordSchema, type CapScope, CapScopeSchema, type DeviceSelector, DeviceSelectorSchema, type DeviceTokenScope, type MethodAccess, MethodAccessSchema, type ScopedToken, ScopedTokenSchema, type TokenScope, TokenScopeSchema, type UserRecord, UserRecordSchema, } from './schemas/auth-records.js';
|
|
202
202
|
export { type DeviceMetaLike, type DeviceReachSummary, deviceSelectorMatches, type EffectiveScope, normalizeTokenScopes, resolveViewableDeviceIds, type ScopeGrantSummary, scopeInherits, summarizeEffectiveScope, } from './schemas/device-selector.js';
|
|
203
203
|
export type { CameraDetectionCapabilities, CameraMotionConfig, CameraNativeDetectionConfig, } from './types/camera-detection.js';
|
|
204
204
|
export { DEVICE_TYPE_INFO, type DeviceTypeInfo } from './types/device-type.js';
|