@camstack/types 1.2.167 → 1.2.169
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/capabilities/face-gallery.cap.d.ts +98 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.js +142 -69
- package/dist/index.mjs +142 -69
- package/dist/interfaces/event-bus.d.ts +9 -2
- package/package.json +1 -1
|
@@ -19,6 +19,63 @@ declare const IdentitySampleInfoSchema: z.ZodObject<{
|
|
|
19
19
|
base64: z.ZodOptional<z.ZodString>;
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
export type IdentitySampleInfo = z.infer<typeof IdentitySampleInfoSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* One enrolled sample, judged against the gallery it lives in.
|
|
24
|
+
*
|
|
25
|
+
* The gallery is the one input to recognition nobody re-reads: a sample
|
|
26
|
+
* enrolled from the wrong face keeps voting forever, and because the matches it
|
|
27
|
+
* pulls then look confident, nobody goes back. The 2026-09-08 audit found
|
|
28
|
+
* exactly one such pair on this cluster — a sample scoring 0.61 against three
|
|
29
|
+
* samples of ANOTHER person, enrolled from the same camera in the same minute,
|
|
30
|
+
* where every other cross-identity pair sits under 0.50.
|
|
31
|
+
*/
|
|
32
|
+
declare const IdentitySampleAuditRowSchema: z.ZodObject<{
|
|
33
|
+
sampleId: z.ZodString;
|
|
34
|
+
enrolledAt: z.ZodNumber;
|
|
35
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
source: z.ZodEnum<{
|
|
37
|
+
detected: "detected";
|
|
38
|
+
photo: "photo";
|
|
39
|
+
}>;
|
|
40
|
+
mediaKey: z.ZodOptional<z.ZodString>;
|
|
41
|
+
comparable: z.ZodBoolean;
|
|
42
|
+
selfMean: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
bestForeign: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
identityId: z.ZodString;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
score: z.ZodNumber;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
suspicion: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type IdentitySampleAuditRow = z.infer<typeof IdentitySampleAuditRowSchema>;
|
|
51
|
+
declare const IdentitySampleAuditSchema: z.ZodObject<{
|
|
52
|
+
identityId: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
modelId: z.ZodString;
|
|
55
|
+
totalSamples: z.ZodNumber;
|
|
56
|
+
comparableSamples: z.ZodNumber;
|
|
57
|
+
flagged: z.ZodNumber;
|
|
58
|
+
flagThreshold: z.ZodNumber;
|
|
59
|
+
rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
60
|
+
sampleId: z.ZodString;
|
|
61
|
+
enrolledAt: z.ZodNumber;
|
|
62
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
source: z.ZodEnum<{
|
|
64
|
+
detected: "detected";
|
|
65
|
+
photo: "photo";
|
|
66
|
+
}>;
|
|
67
|
+
mediaKey: z.ZodOptional<z.ZodString>;
|
|
68
|
+
comparable: z.ZodBoolean;
|
|
69
|
+
selfMean: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
bestForeign: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
identityId: z.ZodString;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
score: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
suspicion: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type IdentitySampleAudit = z.infer<typeof IdentitySampleAuditSchema>;
|
|
22
79
|
declare const FaceInfoSchema: z.ZodObject<{
|
|
23
80
|
faceId: z.ZodString;
|
|
24
81
|
deviceId: z.ZodNumber;
|
|
@@ -122,6 +179,47 @@ export declare const faceGalleryCapability: {
|
|
|
122
179
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
123
180
|
base64: z.ZodOptional<z.ZodString>;
|
|
124
181
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
182
|
+
/**
|
|
183
|
+
* Re-analyse ONE person's enrolled samples against the whole gallery.
|
|
184
|
+
*
|
|
185
|
+
* A pure read — no write, no inference, just dot products over vectors the
|
|
186
|
+
* hub already holds (327 of them on this cluster). `admin` for the same
|
|
187
|
+
* reason `listIdentitySamples` is: the answer names every enrolled person
|
|
188
|
+
* and how well one person's samples match them, which is the gallery's
|
|
189
|
+
* shape and not a viewer-level fact.
|
|
190
|
+
*
|
|
191
|
+
* Removal deliberately stays `removeSample`: an analysis that could also
|
|
192
|
+
* delete would be one confirmation away from emptying a gallery.
|
|
193
|
+
*/
|
|
194
|
+
readonly auditIdentitySamples: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
195
|
+
identityId: z.ZodString;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
identityId: z.ZodString;
|
|
198
|
+
name: z.ZodString;
|
|
199
|
+
modelId: z.ZodString;
|
|
200
|
+
totalSamples: z.ZodNumber;
|
|
201
|
+
comparableSamples: z.ZodNumber;
|
|
202
|
+
flagged: z.ZodNumber;
|
|
203
|
+
flagThreshold: z.ZodNumber;
|
|
204
|
+
rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
205
|
+
sampleId: z.ZodString;
|
|
206
|
+
enrolledAt: z.ZodNumber;
|
|
207
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
source: z.ZodEnum<{
|
|
209
|
+
detected: "detected";
|
|
210
|
+
photo: "photo";
|
|
211
|
+
}>;
|
|
212
|
+
mediaKey: z.ZodOptional<z.ZodString>;
|
|
213
|
+
comparable: z.ZodBoolean;
|
|
214
|
+
selfMean: z.ZodNullable<z.ZodNumber>;
|
|
215
|
+
bestForeign: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
identityId: z.ZodString;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
score: z.ZodNumber;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
suspicion: z.ZodNumber;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
222
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
125
223
|
readonly removeSample: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
126
224
|
identityId: z.ZodString;
|
|
127
225
|
sampleId: z.ZodString;
|
|
@@ -149,7 +149,7 @@ export { type DoorbellPressEvent, DoorbellPressEventSchema, type DoorbellStatus,
|
|
|
149
149
|
export { type EnumSensorDateTimeFormat, EnumSensorDateTimeFormatSchema, type EnumSensorStatus, EnumSensorStatusSchema, enumSensorCapability, type IEnumSensorProvider, } from './enum-sensor.cap.js';
|
|
150
150
|
export { type EventEmitterStatus, EventEmitterStatusSchema, type EventFire, EventFireSchema, eventEmitterCapability, type IEventEmitterProvider, } from './event-emitter.cap.js';
|
|
151
151
|
export { EventItemSchema, eventsCapability, type IEventsProvider } from './events.cap.js';
|
|
152
|
-
export { type FaceCluster, type FaceInfo, type FaceSortDirection, type FaceSortField, faceGalleryCapability, type Identity, type IdentitySampleInfo, type IFaceGalleryProvider, type ListRecentFacesInput, type SuggestFaceClustersInput, } from './face-gallery.cap.js';
|
|
152
|
+
export { type FaceCluster, type FaceInfo, type FaceSortDirection, type FaceSortField, faceGalleryCapability, type Identity, type IdentitySampleAudit, type IdentitySampleAuditRow, type IdentitySampleInfo, type IFaceGalleryProvider, type ListRecentFacesInput, type SuggestFaceClustersInput, } from './face-gallery.cap.js';
|
|
153
153
|
export { type FanControlStatus, FanControlStatusSchema, type FanDirection, FanDirectionSchema, fanControlCapability, type IFanControlProvider, } from './fan-control.cap.js';
|
|
154
154
|
export { type FeatureProbeStatus, FeatureProbeStatusSchema, featureProbeCapability, type IFeatureProbeProvider, } from './feature-probe.cap.js';
|
|
155
155
|
export { type FloodStatus, FloodStatusSchema, floodCapability, type IFloodProvider, } from './flood.cap.js';
|
|
@@ -2977,6 +2977,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
2977
2977
|
output: z.infer<typeof faceGalleryCapability.methods.listIdentitySamples.output>;
|
|
2978
2978
|
meta: object;
|
|
2979
2979
|
}>;
|
|
2980
|
+
auditIdentitySamples: TRPCQueryProcedure<{
|
|
2981
|
+
input: {
|
|
2982
|
+
[x: string]: unknown;
|
|
2983
|
+
} & z.input<typeof faceGalleryCapability.methods.auditIdentitySamples.input>;
|
|
2984
|
+
output: z.infer<typeof faceGalleryCapability.methods.auditIdentitySamples.output>;
|
|
2985
|
+
meta: object;
|
|
2986
|
+
}>;
|
|
2980
2987
|
removeSample: TRPCMutationProcedure<{
|
|
2981
2988
|
input: {
|
|
2982
2989
|
[x: string]: unknown;
|
|
@@ -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: 1022 method paths across 129 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -71,7 +71,7 @@ export interface SystemProxy {
|
|
|
71
71
|
readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
|
|
72
72
|
readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
|
|
73
73
|
readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
|
|
74
|
-
readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'removeSample' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
|
|
74
|
+
readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'auditIdentitySamples' | '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
76
|
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'>;
|
|
77
77
|
readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getViewerEndpoints' | 'setViewerEndpoints' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch' | 'getTlsStatus' | 'regenerateCertificate' | 'uploadCertificate' | 'downloadCa' | 'revertToGeneratedCertificate'>;
|