@camstack/types 1.2.167 → 1.2.168
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 +73 -0
- package/dist/index.mjs +73 -0
- 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'>;
|
package/dist/index.js
CHANGED
|
@@ -27545,6 +27545,59 @@ var IdentitySampleInfoSchema = zod.z.object({
|
|
|
27545
27545
|
deviceId: zod.z.number().int().optional(),
|
|
27546
27546
|
base64: zod.z.string().optional()
|
|
27547
27547
|
});
|
|
27548
|
+
/**
|
|
27549
|
+
* One enrolled sample, judged against the gallery it lives in.
|
|
27550
|
+
*
|
|
27551
|
+
* The gallery is the one input to recognition nobody re-reads: a sample
|
|
27552
|
+
* enrolled from the wrong face keeps voting forever, and because the matches it
|
|
27553
|
+
* pulls then look confident, nobody goes back. The 2026-09-08 audit found
|
|
27554
|
+
* exactly one such pair on this cluster — a sample scoring 0.61 against three
|
|
27555
|
+
* samples of ANOTHER person, enrolled from the same camera in the same minute,
|
|
27556
|
+
* where every other cross-identity pair sits under 0.50.
|
|
27557
|
+
*/
|
|
27558
|
+
var IdentitySampleAuditRowSchema = zod.z.object({
|
|
27559
|
+
sampleId: zod.z.string(),
|
|
27560
|
+
enrolledAt: zod.z.number().int(),
|
|
27561
|
+
deviceId: zod.z.number().int().optional(),
|
|
27562
|
+
source: zod.z.enum(["detected", "photo"]),
|
|
27563
|
+
/** The enrolled crop's media key, so the panel can show the evidence. */
|
|
27564
|
+
mediaKey: zod.z.string().optional(),
|
|
27565
|
+
/**
|
|
27566
|
+
* False = the sample is stamped with a DIFFERENT face model, and a cosine
|
|
27567
|
+
* across feature spaces is a well-formed float with no meaning. Every number
|
|
27568
|
+
* below then says nothing — it must read as "cannot say", never as an
|
|
27569
|
+
* accusation and never as a clean bill: this list ends in a Remove button.
|
|
27570
|
+
*/
|
|
27571
|
+
comparable: zod.z.boolean(),
|
|
27572
|
+
/** Mean cosine against this person's other samples. Null when there are none
|
|
27573
|
+
* to compare with — never 0, which would read as "opposite". */
|
|
27574
|
+
selfMean: zod.z.number().nullable(),
|
|
27575
|
+
/** The other person this sample looks most like, when it looks like one.
|
|
27576
|
+
* This is the half that convicts: not looking like yourself can be a hard
|
|
27577
|
+
* angle; looking like someone the gallery can NAME is a mis-enrolment. */
|
|
27578
|
+
bestForeign: zod.z.object({
|
|
27579
|
+
identityId: zod.z.string(),
|
|
27580
|
+
name: zod.z.string(),
|
|
27581
|
+
score: zod.z.number()
|
|
27582
|
+
}).optional(),
|
|
27583
|
+
/** 0 = nothing to say. Higher = look at this one sooner. */
|
|
27584
|
+
suspicion: zod.z.number()
|
|
27585
|
+
});
|
|
27586
|
+
var IdentitySampleAuditSchema = zod.z.object({
|
|
27587
|
+
identityId: zod.z.string(),
|
|
27588
|
+
name: zod.z.string(),
|
|
27589
|
+
/** The cluster face model every comparison was made in. */
|
|
27590
|
+
modelId: zod.z.string(),
|
|
27591
|
+
totalSamples: zod.z.number().int(),
|
|
27592
|
+
comparableSamples: zod.z.number().int(),
|
|
27593
|
+
flagged: zod.z.number().int(),
|
|
27594
|
+
/** The bar `flagged` counts against, so the panel states the RULE and not
|
|
27595
|
+
* only its current result. */
|
|
27596
|
+
flagThreshold: zod.z.number(),
|
|
27597
|
+
/** Worst first. A row with nothing to say still appears, at the bottom: the
|
|
27598
|
+
* operator asked to see the gallery, not only its accusations. */
|
|
27599
|
+
rows: zod.z.array(IdentitySampleAuditRowSchema).readonly()
|
|
27600
|
+
});
|
|
27548
27601
|
var FaceInfoSchema = zod.z.object({
|
|
27549
27602
|
faceId: zod.z.string(),
|
|
27550
27603
|
deviceId: zod.z.number().int(),
|
|
@@ -27706,6 +27759,19 @@ includeCrops: zod.z.boolean().optional() }).optional(), zod.z.array(IdentitySche
|
|
|
27706
27759
|
auth: "admin"
|
|
27707
27760
|
}),
|
|
27708
27761
|
listIdentitySamples: require_sleep.method(zod.z.object({ identityId: zod.z.string() }), zod.z.array(IdentitySampleInfoSchema).readonly()),
|
|
27762
|
+
/**
|
|
27763
|
+
* Re-analyse ONE person's enrolled samples against the whole gallery.
|
|
27764
|
+
*
|
|
27765
|
+
* A pure read — no write, no inference, just dot products over vectors the
|
|
27766
|
+
* hub already holds (327 of them on this cluster). `admin` for the same
|
|
27767
|
+
* reason `listIdentitySamples` is: the answer names every enrolled person
|
|
27768
|
+
* and how well one person's samples match them, which is the gallery's
|
|
27769
|
+
* shape and not a viewer-level fact.
|
|
27770
|
+
*
|
|
27771
|
+
* Removal deliberately stays `removeSample`: an analysis that could also
|
|
27772
|
+
* delete would be one confirmation away from emptying a gallery.
|
|
27773
|
+
*/
|
|
27774
|
+
auditIdentitySamples: require_sleep.method(zod.z.object({ identityId: zod.z.string().min(1) }), IdentitySampleAuditSchema, { auth: "admin" }),
|
|
27709
27775
|
removeSample: require_sleep.method(zod.z.object({
|
|
27710
27776
|
identityId: zod.z.string(),
|
|
27711
27777
|
sampleId: zod.z.string()
|
|
@@ -42970,6 +43036,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
42970
43036
|
addonId: null,
|
|
42971
43037
|
access: "create"
|
|
42972
43038
|
},
|
|
43039
|
+
"faceGallery.auditIdentitySamples": {
|
|
43040
|
+
capName: "face-gallery",
|
|
43041
|
+
capScope: "system",
|
|
43042
|
+
addonId: null,
|
|
43043
|
+
access: "view"
|
|
43044
|
+
},
|
|
42973
43045
|
"faceGallery.createIdentity": {
|
|
42974
43046
|
capName: "face-gallery",
|
|
42975
43047
|
capScope: "system",
|
|
@@ -50196,6 +50268,7 @@ function createSystemProxy(api) {
|
|
|
50196
50268
|
renameIdentity: (input) => dispatch("faceGallery", "renameIdentity", "mutation", input),
|
|
50197
50269
|
deleteIdentity: (input) => dispatch("faceGallery", "deleteIdentity", "mutation", input),
|
|
50198
50270
|
listIdentitySamples: (input) => dispatch("faceGallery", "listIdentitySamples", "query", input),
|
|
50271
|
+
auditIdentitySamples: (input) => dispatch("faceGallery", "auditIdentitySamples", "query", input),
|
|
50199
50272
|
removeSample: (input) => dispatch("faceGallery", "removeSample", "mutation", input),
|
|
50200
50273
|
getFaceMedia: (input) => dispatch("faceGallery", "getFaceMedia", "query", input),
|
|
50201
50274
|
assignFace: (input) => dispatch("faceGallery", "assignFace", "mutation", input),
|
package/dist/index.mjs
CHANGED
|
@@ -27544,6 +27544,59 @@ var IdentitySampleInfoSchema = z.object({
|
|
|
27544
27544
|
deviceId: z.number().int().optional(),
|
|
27545
27545
|
base64: z.string().optional()
|
|
27546
27546
|
});
|
|
27547
|
+
/**
|
|
27548
|
+
* One enrolled sample, judged against the gallery it lives in.
|
|
27549
|
+
*
|
|
27550
|
+
* The gallery is the one input to recognition nobody re-reads: a sample
|
|
27551
|
+
* enrolled from the wrong face keeps voting forever, and because the matches it
|
|
27552
|
+
* pulls then look confident, nobody goes back. The 2026-09-08 audit found
|
|
27553
|
+
* exactly one such pair on this cluster — a sample scoring 0.61 against three
|
|
27554
|
+
* samples of ANOTHER person, enrolled from the same camera in the same minute,
|
|
27555
|
+
* where every other cross-identity pair sits under 0.50.
|
|
27556
|
+
*/
|
|
27557
|
+
var IdentitySampleAuditRowSchema = z.object({
|
|
27558
|
+
sampleId: z.string(),
|
|
27559
|
+
enrolledAt: z.number().int(),
|
|
27560
|
+
deviceId: z.number().int().optional(),
|
|
27561
|
+
source: z.enum(["detected", "photo"]),
|
|
27562
|
+
/** The enrolled crop's media key, so the panel can show the evidence. */
|
|
27563
|
+
mediaKey: z.string().optional(),
|
|
27564
|
+
/**
|
|
27565
|
+
* False = the sample is stamped with a DIFFERENT face model, and a cosine
|
|
27566
|
+
* across feature spaces is a well-formed float with no meaning. Every number
|
|
27567
|
+
* below then says nothing — it must read as "cannot say", never as an
|
|
27568
|
+
* accusation and never as a clean bill: this list ends in a Remove button.
|
|
27569
|
+
*/
|
|
27570
|
+
comparable: z.boolean(),
|
|
27571
|
+
/** Mean cosine against this person's other samples. Null when there are none
|
|
27572
|
+
* to compare with — never 0, which would read as "opposite". */
|
|
27573
|
+
selfMean: z.number().nullable(),
|
|
27574
|
+
/** The other person this sample looks most like, when it looks like one.
|
|
27575
|
+
* This is the half that convicts: not looking like yourself can be a hard
|
|
27576
|
+
* angle; looking like someone the gallery can NAME is a mis-enrolment. */
|
|
27577
|
+
bestForeign: z.object({
|
|
27578
|
+
identityId: z.string(),
|
|
27579
|
+
name: z.string(),
|
|
27580
|
+
score: z.number()
|
|
27581
|
+
}).optional(),
|
|
27582
|
+
/** 0 = nothing to say. Higher = look at this one sooner. */
|
|
27583
|
+
suspicion: z.number()
|
|
27584
|
+
});
|
|
27585
|
+
var IdentitySampleAuditSchema = z.object({
|
|
27586
|
+
identityId: z.string(),
|
|
27587
|
+
name: z.string(),
|
|
27588
|
+
/** The cluster face model every comparison was made in. */
|
|
27589
|
+
modelId: z.string(),
|
|
27590
|
+
totalSamples: z.number().int(),
|
|
27591
|
+
comparableSamples: z.number().int(),
|
|
27592
|
+
flagged: z.number().int(),
|
|
27593
|
+
/** The bar `flagged` counts against, so the panel states the RULE and not
|
|
27594
|
+
* only its current result. */
|
|
27595
|
+
flagThreshold: z.number(),
|
|
27596
|
+
/** Worst first. A row with nothing to say still appears, at the bottom: the
|
|
27597
|
+
* operator asked to see the gallery, not only its accusations. */
|
|
27598
|
+
rows: z.array(IdentitySampleAuditRowSchema).readonly()
|
|
27599
|
+
});
|
|
27547
27600
|
var FaceInfoSchema = z.object({
|
|
27548
27601
|
faceId: z.string(),
|
|
27549
27602
|
deviceId: z.number().int(),
|
|
@@ -27705,6 +27758,19 @@ includeCrops: z.boolean().optional() }).optional(), z.array(IdentitySchema).read
|
|
|
27705
27758
|
auth: "admin"
|
|
27706
27759
|
}),
|
|
27707
27760
|
listIdentitySamples: method(z.object({ identityId: z.string() }), z.array(IdentitySampleInfoSchema).readonly()),
|
|
27761
|
+
/**
|
|
27762
|
+
* Re-analyse ONE person's enrolled samples against the whole gallery.
|
|
27763
|
+
*
|
|
27764
|
+
* A pure read — no write, no inference, just dot products over vectors the
|
|
27765
|
+
* hub already holds (327 of them on this cluster). `admin` for the same
|
|
27766
|
+
* reason `listIdentitySamples` is: the answer names every enrolled person
|
|
27767
|
+
* and how well one person's samples match them, which is the gallery's
|
|
27768
|
+
* shape and not a viewer-level fact.
|
|
27769
|
+
*
|
|
27770
|
+
* Removal deliberately stays `removeSample`: an analysis that could also
|
|
27771
|
+
* delete would be one confirmation away from emptying a gallery.
|
|
27772
|
+
*/
|
|
27773
|
+
auditIdentitySamples: method(z.object({ identityId: z.string().min(1) }), IdentitySampleAuditSchema, { auth: "admin" }),
|
|
27708
27774
|
removeSample: method(z.object({
|
|
27709
27775
|
identityId: z.string(),
|
|
27710
27776
|
sampleId: z.string()
|
|
@@ -42962,6 +43028,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
42962
43028
|
addonId: null,
|
|
42963
43029
|
access: "create"
|
|
42964
43030
|
},
|
|
43031
|
+
"faceGallery.auditIdentitySamples": {
|
|
43032
|
+
capName: "face-gallery",
|
|
43033
|
+
capScope: "system",
|
|
43034
|
+
addonId: null,
|
|
43035
|
+
access: "view"
|
|
43036
|
+
},
|
|
42965
43037
|
"faceGallery.createIdentity": {
|
|
42966
43038
|
capName: "face-gallery",
|
|
42967
43039
|
capScope: "system",
|
|
@@ -50188,6 +50260,7 @@ function createSystemProxy(api) {
|
|
|
50188
50260
|
renameIdentity: (input) => dispatch("faceGallery", "renameIdentity", "mutation", input),
|
|
50189
50261
|
deleteIdentity: (input) => dispatch("faceGallery", "deleteIdentity", "mutation", input),
|
|
50190
50262
|
listIdentitySamples: (input) => dispatch("faceGallery", "listIdentitySamples", "query", input),
|
|
50263
|
+
auditIdentitySamples: (input) => dispatch("faceGallery", "auditIdentitySamples", "query", input),
|
|
50191
50264
|
removeSample: (input) => dispatch("faceGallery", "removeSample", "mutation", input),
|
|
50192
50265
|
getFaceMedia: (input) => dispatch("faceGallery", "getFaceMedia", "query", input),
|
|
50193
50266
|
assignFace: (input) => dispatch("faceGallery", "assignFace", "mutation", input),
|