@camstack/types 1.2.402 → 1.2.404

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 (57) hide show
  1. package/dist/addon.js +2 -2
  2. package/dist/addon.mjs +2 -2
  3. package/dist/auth/credential-scope.d.ts +23 -3
  4. package/dist/auth/viewer-access.d.ts +112 -0
  5. package/dist/capabilities/capability-definition.d.ts +14 -0
  6. package/dist/capabilities/face-gallery.cap.d.ts +3 -0
  7. package/dist/capabilities/index.d.ts +3 -3
  8. package/dist/capabilities/pipeline-analytics.cap.d.ts +82 -0
  9. package/dist/capabilities/pipeline-executor.cap.d.ts +0 -64
  10. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +32 -124
  11. package/dist/capabilities/plate-gallery.cap.d.ts +3 -0
  12. package/dist/capabilities/scene-monitor.cap.d.ts +3 -0
  13. package/dist/capabilities/training.cap.d.ts +91 -71
  14. package/dist/capabilities/user-management.cap.d.ts +108 -18
  15. package/dist/client.js +9 -8
  16. package/dist/client.mjs +9 -8
  17. package/dist/clips/clip-event-labels.d.ts +96 -0
  18. package/dist/device/cap-vocabulary/entries/actuators.d.ts +5 -0
  19. package/dist/device/cap-vocabulary/entries/appliances.d.ts +5 -0
  20. package/dist/device/cap-vocabulary/entries/camera.d.ts +5 -0
  21. package/dist/device/cap-vocabulary/entries/sensors.d.ts +5 -0
  22. package/dist/device/cap-vocabulary/entries/system.d.ts +8 -0
  23. package/dist/device/cap-vocabulary/index.d.ts +9 -0
  24. package/dist/device/cap-vocabulary/l10n.d.ts +7 -0
  25. package/dist/device/cap-vocabulary/resolve.d.ts +100 -0
  26. package/dist/device/cap-vocabulary/templates.d.ts +11 -0
  27. package/dist/device/cap-vocabulary/types.d.ts +398 -0
  28. package/dist/device/cap-vocabulary/vocabulary.d.ts +5 -0
  29. package/dist/device/device-do-actions.d.ts +8 -2
  30. package/dist/enums/event-category.d.ts +2 -3
  31. package/dist/enums.js +1 -1
  32. package/dist/enums.mjs +1 -1
  33. package/dist/{event-category-7AwNbPjm.js → event-category-CXrwjC3e.js} +2 -3
  34. package/dist/{event-category-BfJwUd2S.mjs → event-category-fDPduoeC.mjs} +2 -3
  35. package/dist/generated/addon-api.d.ts +52 -56
  36. package/dist/generated/device-proxy.d.ts +1 -1
  37. package/dist/generated/method-access-map.d.ts +4 -1
  38. package/dist/generated/method-device-selectors.d.ts +2 -2
  39. package/dist/generated/system-proxy.d.ts +3 -3
  40. package/dist/index.d.ts +8 -3
  41. package/dist/index.js +7406 -2133
  42. package/dist/index.mjs +7372 -2132
  43. package/dist/interfaces/api-responses.d.ts +1 -1
  44. package/dist/interfaces/auth.d.ts +2 -2
  45. package/dist/interfaces/birth-decision-ledger.d.ts +20 -0
  46. package/dist/interfaces/pipeline-executor-capability.d.ts +2 -8
  47. package/dist/pipeline/auto-tune/plan-schemas.d.ts +8 -80
  48. package/dist/pipeline/step-settings-layers.d.ts +7 -8
  49. package/dist/schemas/auth-records.d.ts +77 -13
  50. package/dist/schemas/device-selector.d.ts +23 -4
  51. package/dist/{sleep-DVovpDRU.js → sleep-BKS4OPMo.js} +2 -4
  52. package/dist/{sleep-CUp20JkO.mjs → sleep-CHIEEJkY.mjs} +2 -4
  53. package/dist/types/agent-pipeline-settings.d.ts +37 -70
  54. package/dist/types/camera-pipeline.d.ts +2 -2
  55. package/dist/types/detection.d.ts +19 -0
  56. package/dist/types/pipeline-step.d.ts +0 -16
  57. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-DVovpDRU.js");
3
- const require_event_category = require("./event-category-7AwNbPjm.js");
2
+ const require_sleep = require("./sleep-BKS4OPMo.js");
3
+ const require_event_category = require("./event-category-CXrwjC3e.js");
4
4
  const require_err_msg = require("./err-msg-BhVbr0NX.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { $n as PEER_BYTES_TICKET_TTL_MS, $t as parseSecretPath, A as HF_REPO, An as RECORD_DEFAULT_MAX_DATA_BYTES, B as describeCustomActions, Bn as resolveSecretViewsIn, Br as isSecretFieldView, Bt as EntryDescriptorSchema, C as addonSliceHandleApi, Cn as UnknownRecordKindError, Cr as parseSecretRef, Dn as RECORD_BATCH_MAX_BYTES, Dr as emitReadiness, En as RECORD_BATCH_MAX, Er as createEvent, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_MAX_INDEX_FIELDS, Ft as makeInMemoryRecords, Gn as forgetKnownSecret, Gt as RecordRetentionSchema, H as adminUiCapability, Hn as createSecretsAccess, Hr as isSecretMarkerLike, Ht as RecordIndexSchema, I as CALLER_STAMPED_CAPABILITIES, In as RECORD_QUERY_MAX, It as defineEntryKind, Jn as scrubKnownSecrets, Jt as declarationsOf, Kn as knownSecretCount, Kt as StoredRecordKindDeclarationSchema, L as withoutCallerStamp, Ln as RECORD_SECRET_COLLECTION_PREFIX, Lr as SECRET_CLEAR, Lt as entryBody, Mn as RECORD_ID_MAX_LENGTH, N as deviceOpsCapability, Nn as RECORD_MAX_DATA_BYTES, On as RECORD_CLASSES, P as viewerUiCapability, Pn as RECORD_MAX_INDEXES, Qn as PEER_BYTES_STALL_MS, Qt as mapSecretLeaves, Rn as RECORD_SETTINGS_MAX_ROWS, Rr as classifySecretWrite, Rt as createRecordsAccess, Sn as UnindexedFilterError, Sr as normalizeSecretOwner, Tn as recordsErrorFromMessage, Un as MIN_SCRUBBED_LENGTH, Ur as makeSecretMarker, Ut as RecordKindDeclarationSchema, Vn as REVALIDATE_AFTER_MS, Vr as isSecretMarker, Vt as RecordFieldPathSchema, Wn as clearKnownSecrets, Wr as toSecretFieldView, Wt as RecordKindNameSchema, X as expandCapMethods, Xn as PEER_BYTES_CHUNK_BYTES, Xt as REMOVE_LEAF, Yn as shortSecretRefHash, Yt as defineRecordKinds, Zn as PEER_BYTES_MAX_OUTSTANDING, Zt as collectSecretLeaves, _ as readErrorI18n, _n as RecordTooLargeError, _r as arrayItemFieldPath, an as collectZodSecretPaths, at as readNodePin, b as isDeviceScopedCap, bn as RevConflictError, br as globalSecretScope, c as asString, cn as DeclarationRefusedError, ct as ReadinessRegistry, d as parseJsonUnknown, dn as InvalidRecordError, en as recordArrayItemPath, f as hfModelUrl, fn as NoCallerError, ft as scopeKey, g as ErrorI18nPayloadSchema, gn as RecordSecretUnavailableError, gr as SECRET_REF_SCHEME, hn as RecordNotFoundError, ir as BaseAddon, it as nodePin, jn as RECORD_DELETE_BATCH, kn as RECORD_DATABASES, ln as FilterRequiredError, lt as ReadinessTimeoutError, mn as RECORDS_ERROR_CODES, nn as recordSecretRef, o as asJsonObject, on as isZodSecret, or as normalizeAddonInitResult, p as BOOT_RECOVERY_BACKOFF_MS, pn as PlaintextSecretError, qn as registerKnownSecret, qt as assertValidDeclaration, r as maskUrlCredentials, rn as secretArrayPrefixes, rr as DisposerChain, sn as BatchTooLargeError, st as MODEL_FORMATS, t as sleep, tn as recordSecretCollection, tr as DATAPLANE_SECRET_HEADER, un as ForeignSecretMarkerError, vn as RecordUniqueViolationError, vr as buildSecretRef, w as createEventBusSliceSource, wn as asRecordsError, x as createDeviceProxy, xn as TransactRefusedError, xr as isSecretRef, y as DEVICE_SCOPED_CAPS, yn as RecordsError, yr as formatSecretScope, zn as RECORD_SWEEP_INTERVAL_MS, zr as isSecretClear, zt as assertTransactScope } from "./sleep-CUp20JkO.mjs";
2
- import { t as EventCategory } from "./event-category-BfJwUd2S.mjs";
1
+ import { $n as PEER_BYTES_TICKET_TTL_MS, $t as parseSecretPath, A as HF_REPO, An as RECORD_DEFAULT_MAX_DATA_BYTES, B as describeCustomActions, Bn as resolveSecretViewsIn, Br as isSecretFieldView, Bt as EntryDescriptorSchema, C as addonSliceHandleApi, Cn as UnknownRecordKindError, Cr as parseSecretRef, Dn as RECORD_BATCH_MAX_BYTES, Dr as emitReadiness, En as RECORD_BATCH_MAX, Er as createEvent, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_MAX_INDEX_FIELDS, Ft as makeInMemoryRecords, Gn as forgetKnownSecret, Gt as RecordRetentionSchema, H as adminUiCapability, Hn as createSecretsAccess, Hr as isSecretMarkerLike, Ht as RecordIndexSchema, I as CALLER_STAMPED_CAPABILITIES, In as RECORD_QUERY_MAX, It as defineEntryKind, Jn as scrubKnownSecrets, Jt as declarationsOf, Kn as knownSecretCount, Kt as StoredRecordKindDeclarationSchema, L as withoutCallerStamp, Ln as RECORD_SECRET_COLLECTION_PREFIX, Lr as SECRET_CLEAR, Lt as entryBody, Mn as RECORD_ID_MAX_LENGTH, N as deviceOpsCapability, Nn as RECORD_MAX_DATA_BYTES, On as RECORD_CLASSES, P as viewerUiCapability, Pn as RECORD_MAX_INDEXES, Qn as PEER_BYTES_STALL_MS, Qt as mapSecretLeaves, Rn as RECORD_SETTINGS_MAX_ROWS, Rr as classifySecretWrite, Rt as createRecordsAccess, Sn as UnindexedFilterError, Sr as normalizeSecretOwner, Tn as recordsErrorFromMessage, Un as MIN_SCRUBBED_LENGTH, Ur as makeSecretMarker, Ut as RecordKindDeclarationSchema, Vn as REVALIDATE_AFTER_MS, Vr as isSecretMarker, Vt as RecordFieldPathSchema, Wn as clearKnownSecrets, Wr as toSecretFieldView, Wt as RecordKindNameSchema, X as expandCapMethods, Xn as PEER_BYTES_CHUNK_BYTES, Xt as REMOVE_LEAF, Yn as shortSecretRefHash, Yt as defineRecordKinds, Zn as PEER_BYTES_MAX_OUTSTANDING, Zt as collectSecretLeaves, _ as readErrorI18n, _n as RecordTooLargeError, _r as arrayItemFieldPath, an as collectZodSecretPaths, at as readNodePin, b as isDeviceScopedCap, bn as RevConflictError, br as globalSecretScope, c as asString, cn as DeclarationRefusedError, ct as ReadinessRegistry, d as parseJsonUnknown, dn as InvalidRecordError, en as recordArrayItemPath, f as hfModelUrl, fn as NoCallerError, ft as scopeKey, g as ErrorI18nPayloadSchema, gn as RecordSecretUnavailableError, gr as SECRET_REF_SCHEME, hn as RecordNotFoundError, ir as BaseAddon, it as nodePin, jn as RECORD_DELETE_BATCH, kn as RECORD_DATABASES, ln as FilterRequiredError, lt as ReadinessTimeoutError, mn as RECORDS_ERROR_CODES, nn as recordSecretRef, o as asJsonObject, on as isZodSecret, or as normalizeAddonInitResult, p as BOOT_RECOVERY_BACKOFF_MS, pn as PlaintextSecretError, qn as registerKnownSecret, qt as assertValidDeclaration, r as maskUrlCredentials, rn as secretArrayPrefixes, rr as DisposerChain, sn as BatchTooLargeError, st as MODEL_FORMATS, t as sleep, tn as recordSecretCollection, tr as DATAPLANE_SECRET_HEADER, un as ForeignSecretMarkerError, vn as RecordUniqueViolationError, vr as buildSecretRef, w as createEventBusSliceSource, wn as asRecordsError, x as createDeviceProxy, xn as TransactRefusedError, xr as isSecretRef, y as DEVICE_SCOPED_CAPS, yn as RecordsError, yr as formatSecretScope, zn as RECORD_SWEEP_INTERVAL_MS, zr as isSecretClear, zt as assertTransactScope } from "./sleep-CHIEEJkY.mjs";
2
+ import { t as EventCategory } from "./event-category-fDPduoeC.mjs";
3
3
  import { a as DeviceType, t as errMsg } from "./err-msg-BXKzRBwg.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -27,7 +27,7 @@
27
27
  * addon read the same vocabulary.
28
28
  */
29
29
  import { z } from 'zod';
30
- import { MethodAccessSchema, type TokenScope } from '../schemas/auth-records.js';
30
+ import { MethodAccessSchema, type UserScope } from '../schemas/auth-records.js';
31
31
  /** The admin scope: every permission. */
32
32
  export declare const ADMIN_SCOPE = "*";
33
33
  /** At most this many devices in one share-view grant (the share-link bound). */
@@ -88,6 +88,16 @@ export declare const CredentialScopeSchema: z.ZodUnion<readonly [z.ZodLiteral<"*
88
88
  }>>;
89
89
  }, z.core.$strip>, z.ZodObject<{
90
90
  type: z.ZodLiteral<"preferences-self">;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ type: z.ZodLiteral<"viewer">;
93
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
94
+ block: z.ZodArray<z.ZodNumber>;
95
+ features: z.ZodArray<z.ZodEnum<{
96
+ "face-assignment": "face-assignment";
97
+ "plate-assignment": "plate-assignment";
98
+ retrain: "retrain";
99
+ scenes: "scenes";
100
+ }>>;
91
101
  }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
92
102
  type: z.ZodLiteral<"category">;
93
103
  target: z.ZodEnum<{
@@ -147,8 +157,8 @@ export declare function scopesGrantAdmin(scopes: readonly CredentialScope[]): bo
147
157
  * is still restricted to its FIRST share-view grant, never widened by the rest.
148
158
  */
149
159
  export declare function shareViewGrantOf(scopes: readonly CredentialScope[]): ShareViewGrant | null;
150
- /** The capability grants the tRPC scope matcher reads. */
151
- export declare function capabilityScopesOf(scopes: readonly CredentialScope[]): readonly TokenScope[];
160
+ /** The grants the tRPC scope matcher reads: capability rows, or a viewer row (D921). */
161
+ export declare function capabilityScopesOf(scopes: readonly CredentialScope[]): readonly UserScope[];
152
162
  /** True iff the set reaches every addon's own routes at `access`. */
153
163
  export declare function scopesAllowAddonRoutes(scopes: readonly CredentialScope[], access: z.infer<typeof MethodAccessSchema>): boolean;
154
164
  /**
@@ -210,6 +220,16 @@ export declare const CredentialTokenClaimsSchema: z.ZodObject<{
210
220
  }>>;
211
221
  }, z.core.$strip>, z.ZodObject<{
212
222
  type: z.ZodLiteral<"preferences-self">;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ type: z.ZodLiteral<"viewer">;
225
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
226
+ block: z.ZodArray<z.ZodNumber>;
227
+ features: z.ZodArray<z.ZodEnum<{
228
+ "face-assignment": "face-assignment";
229
+ "plate-assignment": "plate-assignment";
230
+ retrain: "retrain";
231
+ scenes: "scenes";
232
+ }>>;
213
233
  }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
214
234
  type: z.ZodLiteral<"category">;
215
235
  target: z.ZodEnum<{
@@ -0,0 +1,112 @@
1
+ /**
2
+ * The viewer role (D921): the ONE non-admin role a person can hold.
3
+ *
4
+ * A viewer reaches:
5
+ * - every cap method labelled `viewer` (the baseline a normal user of the
6
+ * viewer app needs: live, grids, recordings, events, device status and
7
+ * actuation, PTZ moves, talk-back, snoozing);
8
+ * - every method labelled `feature:<id>` for a feature the admin granted
9
+ * them (the {@link VIEWER_FEATURES} catalog);
10
+ * - nothing labelled `admin`;
11
+ * and only on the devices its two lists admit: `allow` (`'*'` = every device)
12
+ * minus `block`. A device is admitted through itself or any ancestor, so a
13
+ * camera's children follow it in both lists.
14
+ *
15
+ * A method's label is resolved by {@link resolveMethodRole} from the cap
16
+ * definition — an explicit `role` on the method, else on the cap, else derived
17
+ * from its `auth` tier and the cap's scope. Codegen writes it into
18
+ * `METHOD_ACCESS_MAP[path].role`, the one table the matcher reads.
19
+ *
20
+ * Adding a feature: one {@link VIEWER_FEATURES} entry, then `role: { feature }`
21
+ * on the methods it unlocks (cap- or method-level), then `npm run codegen`.
22
+ * `scripts/check-method-roles.ts` refuses an id outside the catalog and a
23
+ * catalog entry no method carries.
24
+ *
25
+ * Pure: no I/O.
26
+ */
27
+ import { z } from 'zod';
28
+ /** The feature ids an admin can grant a viewer. Grown one entry at a time. */
29
+ export declare const VIEWER_FEATURE_IDS: readonly ['face-assignment', 'plate-assignment', 'retrain', 'scenes'];
30
+ export declare const ViewerFeatureIdSchema: z.ZodEnum<{
31
+ "face-assignment": "face-assignment";
32
+ "plate-assignment": "plate-assignment";
33
+ retrain: "retrain";
34
+ scenes: "scenes";
35
+ }>;
36
+ export type ViewerFeatureId = z.infer<typeof ViewerFeatureIdSchema>;
37
+ /** One catalog entry, as the admin UI renders it. */
38
+ export interface ViewerFeatureSpec {
39
+ readonly id: ViewerFeatureId;
40
+ readonly label: string;
41
+ readonly description: string;
42
+ /** The viewer-app Library sections the feature reveals. */
43
+ readonly viewerSections: readonly string[];
44
+ }
45
+ export declare const VIEWER_FEATURES: readonly ViewerFeatureSpec[];
46
+ /** Which devices a viewer reaches: `allow` minus `block`. */
47
+ export declare const ViewerDeviceAllowSchema: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
48
+ export type ViewerDeviceAllow = z.infer<typeof ViewerDeviceAllowSchema>;
49
+ /**
50
+ * The viewer grant, stored as ONE row of a user's `scopes`. A principal that
51
+ * holds it is decided by the viewer rules ALONE — any other row it carries is
52
+ * ignored, so a viewer can never be widened by a leftover grant.
53
+ */
54
+ export declare const ViewerTokenScopeSchema: z.ZodObject<{
55
+ type: z.ZodLiteral<"viewer">;
56
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
57
+ block: z.ZodArray<z.ZodNumber>;
58
+ features: z.ZodArray<z.ZodEnum<{
59
+ "face-assignment": "face-assignment";
60
+ "plate-assignment": "plate-assignment";
61
+ retrain: "retrain";
62
+ scenes: "scenes";
63
+ }>>;
64
+ }, z.core.$strip>;
65
+ export type ViewerTokenScope = z.infer<typeof ViewerTokenScopeSchema>;
66
+ /** The grant a new viewer starts with: every device, nothing blocked, no feature. */
67
+ export declare const DEFAULT_VIEWER_SCOPE: ViewerTokenScope;
68
+ /** What a method is, for a viewer. `feature:<id>` is a granted extra. */
69
+ export type MethodRole = 'public' | 'viewer' | 'admin' | `feature:${ViewerFeatureId}`;
70
+ /** The explicit label a cap author writes (method- or cap-level). */
71
+ export type MethodRoleDecl = 'viewer' | 'admin' | {
72
+ readonly feature: ViewerFeatureId;
73
+ };
74
+ /** Render a declaration as its map value. */
75
+ export declare function methodRoleOf(decl: MethodRoleDecl): MethodRole;
76
+ /** The feature a role names, or `null` for a non-feature role. */
77
+ export declare function featureOfRole(role: MethodRole): ViewerFeatureId | null;
78
+ /** The inputs {@link resolveMethodRole} reads. */
79
+ export interface MethodRoleSource {
80
+ readonly capScope: 'device' | 'system';
81
+ readonly capRole: MethodRoleDecl | undefined;
82
+ readonly methodRole: MethodRoleDecl | undefined;
83
+ readonly auth: string;
84
+ }
85
+ /**
86
+ * The label of one method. Explicit wins (method, then cap). Otherwise:
87
+ * `public` stays public, `admin` stays admin, a `protected` method of a DEVICE
88
+ * cap is viewer baseline (it is a read or an actuation of one device, and the
89
+ * device lists still bound it), and a `protected` method of a SYSTEM cap is
90
+ * admin until someone labels it `viewer` — a system method reaches the whole
91
+ * installation, so it joins the baseline only by a reviewed decision.
92
+ */
93
+ export declare function resolveMethodRole(src: MethodRoleSource): MethodRole;
94
+ /**
95
+ * Resolves a device to its ancestors (parent, grandparent, …), or `null` when
96
+ * the device is UNKNOWN to the persisted mirror — "no parent" and "we cannot
97
+ * tell" are different answers here.
98
+ */
99
+ export type ViewerAncestorLookup = (deviceId: number) => readonly number[] | null;
100
+ /**
101
+ * Is `deviceId` admitted by the viewer's lists? The device and its ancestors
102
+ * form one chain: it is admitted when `allow` is `'*'` or names a link, and no
103
+ * link is in `block`. So a camera's children follow it in both lists.
104
+ *
105
+ * Unknown parentage fails closed. A device the mirror does not know (or no
106
+ * lookup at all) is admitted only when that cannot hide a block: under `'*'`
107
+ * only while `block` is empty, under a list only when the list names the
108
+ * device itself and it is not blocked.
109
+ */
110
+ export declare function viewerAdmitsDevice(scope: ViewerTokenScope, deviceId: number, ancestors: ViewerAncestorLookup | undefined): boolean;
111
+ /** Does the viewer hold the feature a role requires (or need none)? */
112
+ export declare function viewerHoldsRole(scope: ViewerTokenScope, role: MethodRole): boolean;
@@ -15,6 +15,7 @@ import { z } from 'zod';
15
15
  import { DeviceType } from '../device/device-type.js';
16
16
  import type { ConfigUISchemaWithValues } from '../interfaces/config-ui.js';
17
17
  import type { ExtensionSlotDescriptor } from '../device-extension/slot-descriptor.js';
18
+ import type { MethodRoleDecl } from '../auth/viewer-access.js';
18
19
  /**
19
20
  * tRPC procedure kind.
20
21
  * - 'query': read-only, no side effects
@@ -99,6 +100,12 @@ export interface CapabilityMethodSchema<TInput extends z.ZodType = z.ZodType, TO
99
100
  readonly auth?: CapabilityMethodAuth;
100
101
  /** Per-method access flavour. When unset, codegen derives it from `kind` + name heuristic. */
101
102
  readonly access?: CapabilityMethodAccess;
103
+ /**
104
+ * What this method is for a VIEWER (D921): baseline `viewer`, `admin`, or a
105
+ * named `{ feature }` an admin grants. Unset → the cap's `role`, else derived
106
+ * from `auth` and the cap scope (`resolveMethodRole`).
107
+ */
108
+ readonly role?: MethodRoleDecl;
102
109
  /** Moleculer action timeout override (ms). Overrides broker global requestTimeout for this action only. */
103
110
  readonly timeoutMs?: number;
104
111
  /**
@@ -720,6 +727,11 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
720
727
  * surface).
721
728
  */
722
729
  readonly internal?: boolean;
730
+ /**
731
+ * Default viewer label for every method of this cap (D921); a method's own
732
+ * `role` wins. Used when a whole cap is one named feature (`faceGallery`).
733
+ */
734
+ readonly role?: MethodRoleDecl;
723
735
  /**
724
736
  * Optional semantic role used by the admin UI's unified
725
737
  * "Integrations" page to group caps by what kind of external system
@@ -1115,6 +1127,8 @@ export interface CapabilityMethodOptions<TKind extends CapabilityMethodKind = Ca
1115
1127
  readonly auth?: CapabilityMethodAuth;
1116
1128
  /** Per-method access flavour. When unset, codegen derives it from `kind` + name heuristic. */
1117
1129
  readonly access?: CapabilityMethodAccess;
1130
+ /** What this method is for a viewer (D921). See {@link CapabilityMethodSchema.role}. */
1131
+ readonly role?: MethodRoleDecl;
1118
1132
  /** Moleculer action timeout override (ms). Overrides broker global requestTimeout for this action only. */
1119
1133
  readonly timeoutMs?: number;
1120
1134
  /**
@@ -139,6 +139,9 @@ declare const FaceClusterSchema: z.ZodObject<{
139
139
  export type FaceCluster = z.infer<typeof FaceClusterSchema>;
140
140
  export declare const faceGalleryCapability: {
141
141
  readonly name: 'face-gallery';
142
+ readonly role: {
143
+ readonly feature: 'face-assignment';
144
+ };
142
145
  readonly scope: 'system';
143
146
  readonly mode: 'singleton';
144
147
  readonly methods: {
@@ -104,7 +104,7 @@ export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, A
104
104
  export { consumableLowPercentOf, type INotificationRulesProvider, isRetiredClearKey, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_NONBLOCKING_MAX, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_AUDIO_DBFS_FLOOR, NC_AUTHORABLE_SYSTEM_EVENT_KINDS, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CLIP_POST_ROLL_DEFAULT_SEC, NC_CLIP_PRE_ROLL_DEFAULT_SEC, NC_CLIP_RETENTION_MAX_SEC, NC_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_DEFAULT_SNOOZE_MINUTES, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_RULE_CLEARABLE_KEYS, NC_RULE_RETIRED_CLEAR_KEYS, NC_SNOOZE_MAX_MINUTES, NC_TANK_SYSTEM_EVENT_KINDS, type NcActionBinding, NcActionBindingSchema, type NcAlarmBlocking, type NcAlarmBlockingEdit, NcAlarmBlockingEditSchema, NcAlarmBlockingSchema, type NcAlarmConfig, NcAlarmConfigSchema, type NcAlarmCreateProfileInput, NcAlarmCreateProfileInputSchema, type NcAlarmModeCoverage, NcAlarmModeCoverageSchema, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, NcAlarmModeDelaysEditSchema, NcAlarmModeDelaysSchema, type NcAlarmModeDeviceList, NcAlarmModeDeviceListSchema, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, NcAlarmNonBlockingEditSchema, NcAlarmNonBlockingSchema, type NcAlarmPostTriggeredAction, NcAlarmPostTriggeredActionSchema, type NcAlarmProfileIdInput, NcAlarmProfileIdInputSchema, type NcAlarmProfileMeta, NcAlarmProfileMetaSchema, type NcAlarmProfilesView, NcAlarmProfilesViewSchema, type NcAlarmRenameProfileInput, NcAlarmRenameProfileInputSchema, type NcAlarmSecureOnArmEdit, NcAlarmSecureOnArmEditSchema, type NcAlarmSecureOnArmOff, NcAlarmSecureOnArmOffSchema, type NcAlarmSensorReading, NcAlarmSensorReadingSchema, type NcAlarmSensorState, NcAlarmSensorStateSchema, type NcAlarmSensors, type NcAlarmSensorsInput, NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, type NcAlarmSettings, type NcAlarmSettingsPatch, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, type NcAlarmSkippedDevice, NcAlarmSkippedDeviceSchema, type NcAlarmSkipReason, NcAlarmSkipReasonSchema, type NcAudioCondition, NcAudioConditionSchema, type NcClipRetentionAsk, NcClipRetentionAskSchema, type NcClipRetentionPlan, NcClipRetentionPlanSchema, type NcConditionDescriptor, NcConditionDescriptorSchema, type NcConditions, NcConditionsSchema, type NcConfirm, type NcConfirmExpect, NcConfirmExpectSchema, NcConfirmSchema, type NcCrossing, NcCrossingSchema, type NcDelivery, NcDeliverySchema, type NcDeviceStateCondition, NcDeviceStateConditionSchema, type NcHistoryEntry, NcHistoryEntrySchema, type NcHistoryFilter, NcHistoryFilterSchema, type NcHistoryRecordKind, NcHistoryRecordKindSchema, type NcHistoryStatus, NcHistoryStatusSchema, type NcHistorySubject, NcHistorySubjectSchema, type NcHookBindings, NcHookBindingsSchema, type NcLegacyRuleActionSequence, NcLegacyRuleActionSequenceSchema, type NcLinkedCameraMode, NcLinkedCameraModeSchema, type NcMediaFrame, NcMediaFrameSchema, type NcMediaImage, NcMediaImageSchema, type NcMediaPolicy, NcMediaPolicySchema, type NcOccupancyCondition, NcOccupancyConditionSchema, type NcPlateMatcher, NcPlateMatcherSchema, type NcRule, type NcRuleAction, NcRuleActionSchema, type NcRuleActionSequence, NcRuleActionSequenceSchema, type NcRuleActions, NcRuleActionsSchema, type NcRuleClearableKey, NcRuleClearableKeySchema, type NcRuleInput, NcRuleInputSchema, NcRuleKindSchema, type NcRuleLastRun, NcRuleLastRunSchema, type NcRuleLastRuns, NcRuleLastRunsSchema, type NcRuleNotificationButton, NcRuleNotificationButtonSchema, type NcRulePatch, NcRulePatchSchema, NcRuleSchema, type NcRuleTarget, NcRuleTargetSchema, type NcRuleUpdateInput, NcRuleUpdateInputSchema, type NcSceneCondition, NcSceneConditionSchema, type NcSchedule, NcScheduleSchema, type NcScheduleWindow, NcScheduleWindowSchema, type NcSensorTransition, NcSensorTransitionSchema, type NcSharedSequence, type NcSharedSequenceInput, NcSharedSequenceInputSchema, NcSharedSequenceSchema, type NcSnooze, type NcSnoozeInput, NcSnoozeInputSchema, NcSnoozeSchema, type NcSnoozeScope, NcSnoozeScopeSchema, type NcSnoozeSuppressed, NcSnoozeSuppressedSchema, type NcStateSummaryPreview, type NcStateSummaryPreviewRow, NcStateSummaryPreviewRowSchema, NcStateSummaryPreviewSchema, type NcStateSummaryPreviewSection, NcStateSummaryPreviewSectionSchema, type NcStateSummarySectionId, NcStateSummarySectionIdSchema, type NcStateSummarySplit, NcStateSummarySplitSchema, type NcSystemEventCondition, NcSystemEventConditionSchema, type NcSystemEventDelivery, type NcSystemEventDeliveryMode, NcSystemEventDeliveryModeSchema, NcSystemEventDeliverySchema, type NcSystemEventKind, NcSystemEventKindSchema, type NcTemplateFamily, NcTemplateFamilySchema, type NcTemplateField, NcTemplateFieldSchema, type NcTemplatePreview, type NcTemplatePreviewInput, NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, type NcTemplateVarContext, NcTemplateVarContextSchema, type NcTemplateVarDescriptor, NcTemplateVarDescriptorSchema, type NcTemplateVarGroup, NcTemplateVarGroupSchema, type NcTemplateVarKind, NcTemplateVarKindSchema, type NcTestResult, NcTestResultSchema, type NcThrottle, type NcThrottleGranularity, NcThrottleGranularitySchema, NcThrottleSchema, type NcZoneCondition, NcZoneConditionSchema, notificationRulesCapability, } from './notification-rules.cap.js';
105
105
  export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
106
106
  export { type IOidcConnectionsProvider, type OidcConnection, OidcConnectionSchema, type OidcConnectionUpdateInput, OidcConnectionUpdateInputSchema, oidcConnectionsCapability, } from './oidc-connections.cap.js';
107
- export { AnalyticsLtsSeriesSchema, type AudioEvent, type AudioEventDraft, AudioEventSchema, type DetectionSource, DetectionSourceSchema, EVENT_DENSITY_BATCH_MAX, type EventDensityBucket, EventDensityBucketSchema, type EventDensityForDevice, EventDensityForDeviceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventKindsForDevice, EventKindsForDeviceSchema, type EventMediaKindBreakdown, type EventMediaKindFootprint, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type KeyEventsForDevice, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, LTS_SCOPE_CLASS_SEPARATOR, type LtsBucket, LtsBucketSchema, MAX_TRACK_DEBUG_NOTE_LEN, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileKindEnum, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, type MotionEventDraft, MotionEventSchema, type ObjectEvent, type ObjectEventDraft, ObjectEventSchema, occupancyScope, parseOccupancyScope, pipelineAnalyticsCapability, type RebuildObjectEmbeddingsRefusal, RebuildObjectEmbeddingsRefusalSchema, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainBoxReview, RetrainBoxReviewSchema, type RetrainDismissed, RetrainDismissedSchema, type RetrainFrameReview, RetrainFrameReviewSchema, type RetrainOrigin, RetrainOriginSchema, type RetrainReviewStatus, RetrainReviewStatusSchema, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, type RetrainAnnotationSource, RetrainAnnotationSourceSchema, type RetrainArchiveResult, RetrainArchiveResultSchema, type RetrainArchiveTarget, RetrainArchiveTargetSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainExportFilter, RetrainExportFilterSchema, type RetrainExportLayout, RetrainExportLayoutSchema, type AddRetrainFrameFromRecordingResult, AddRetrainFrameFromRecordingResultSchema, type RetrainDatasetSelection, RetrainDatasetSelectionSchema, type RetrainDatasetStats, RetrainDatasetStatsSchema, type RetrainDatasetVersion, RetrainDatasetVersionSchema, type RetrainTrainingCorpusResolveResult, RetrainTrainingCorpusResolveResultSchema, type RetrainTrainingCorpusSelection, RetrainTrainingCorpusSelectionSchema, type RetrainAssistProfile, RetrainAssistProfileSchema, type RetrainLlmAssistResult, RetrainLlmAssistResultSchema, type RetrainLlmProposal, RetrainLlmProposalSchema, type RetrainLlmReview, RetrainLlmReviewSchema, type RetrainCollection, type RetrainCollectionCreateResult, RetrainCollectionCreateResultSchema, type RetrainCollectionRenameResult, RetrainCollectionRenameResultSchema, RetrainCollectionSchema, type RetrainCorpusFilter, RetrainCorpusFilterSchema, type RetrainCorpusKpi, RetrainCorpusKpiSchema, type RetrainCorpusKpiCameraRow, RetrainCorpusKpiCameraRowSchema, type RetrainCorpusPage, RetrainCorpusPageSchema, type RetrainCorpusPageFrame, RetrainCorpusPageFrameSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, type RetrainFrameOrigin, RetrainFrameOriginSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainFrameWorkState, RetrainFrameWorkStateSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainPipelineBox, RetrainPipelineBoxSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
107
+ export { AnalyticsLtsSeriesSchema, type AudioEvent, type AudioEventDraft, AudioEventSchema, type DetectionSource, DetectionSourceSchema, EVENT_DENSITY_BATCH_MAX, type EventDensityBucket, EventDensityBucketSchema, type EventDensityForDevice, EventDensityForDeviceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventKindsForDevice, EventKindsForDeviceSchema, type EventMediaKindBreakdown, type EventMediaKindFootprint, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type KeyEventsForDevice, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, LTS_SCOPE_CLASS_SEPARATOR, type LtsBucket, LtsBucketSchema, MAX_TRACK_DEBUG_NOTE_LEN, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileKindEnum, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, type MotionEventDraft, MotionEventSchema, type ObjectEvent, type ObjectEventDraft, ObjectEventSchema, occupancyScope, parseOccupancyScope, pipelineAnalyticsCapability, type RebuildObjectEmbeddingsRefusal, RebuildObjectEmbeddingsRefusalSchema, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainBoxReview, RetrainBoxReviewSchema, type RetrainDismissed, RetrainDismissedSchema, type RetrainFrameReview, RetrainFrameReviewSchema, type RetrainOrigin, RetrainOriginSchema, type RetrainReviewStatus, RetrainReviewStatusSchema, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, type RetrainAnnotationSource, RetrainAnnotationSourceSchema, type RetrainArchiveResult, RetrainArchiveResultSchema, type RetrainArchiveTarget, RetrainArchiveTargetSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainExportFilter, RetrainExportFilterSchema, type RetrainExportLayout, RetrainExportLayoutSchema, type AddRetrainFrameFromRecordingResult, AddRetrainFrameFromRecordingResultSchema, type RetrainDatasetSelection, RetrainDatasetSelectionSchema, type RetrainDatasetStats, RetrainDatasetStatsSchema, type RetrainDatasetVersion, RetrainDatasetVersionSchema, type RetrainTrainingCorpusResolveResult, RetrainTrainingCorpusResolveResultSchema, type RetrainTrainingCorpusSelection, RetrainTrainingCorpusSelectionSchema, type RetrainAssistProfile, RetrainAssistProfileSchema, type RetrainLlmAssistResult, RetrainLlmAssistResultSchema, type RetrainLlmProposal, RetrainLlmProposalSchema, type RetrainLlmReview, RetrainLlmReviewSchema, type RetrainCollection, type RetrainCollectionCreateResult, RetrainCollectionCreateResultSchema, type RetrainCollectionRenameResult, RetrainCollectionRenameResultSchema, RetrainCollectionSchema, type RetrainCorpusFilter, RetrainCorpusFilterSchema, type RetrainCorpusKpi, RetrainCorpusKpiSchema, type RetrainCorpusKpiCameraRow, RetrainCorpusKpiCameraRowSchema, type RetrainCorpusPage, RetrainCorpusPageSchema, type RetrainCorpusPageFrame, RetrainCorpusPageFrameSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, type RetrainFrameOrigin, RetrainFrameOriginSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainFrameWorkState, RetrainFrameWorkStateSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainPipelineBox, RetrainPipelineBoxSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackPlacement, TrackPlacementSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
108
108
  export type { EffectiveTuning, EffectiveTuningInput, NativeCropRef, PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, SuppliedRootOutput, } from './pipeline-executor.cap.js';
109
109
  export { EffectiveTuningSchema, ModelSubstitutionSchema, NativeCropRefSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, SuppliedRootOutputSchema, } from './pipeline-executor.cap.js';
110
110
  export type { CameraAssignmentStatus, CameraAudioStatus, CameraBrokerProfile, CameraBrokerStatus, CameraDecoderStatus, CameraDetectionPhase, CameraDetectionProvisioning, CameraDetectionProvisioningState, CameraDetectionStatus, CameraMotionStatus, CameraRecordingMode, CameraRecordingStatus, CameraSourceStatus, CameraDetectionSource, CameraSourceStream, CameraStatus, CameraStatusDegradation, CameraStatusDegradationReason, CameraStatusStage, ClusterModelChoice, ClusterModelChoiceUnreadableReason, DiskReconcileJob, InferenceDeviceExclusionReason, IngestOwner, NodeInferenceDevice, NodeInferenceDevices, OccupancyLookAnswer, OccupancyLookRefusal, OccupancyLookRequest, SetCameraSensorsInput, } from './pipeline-orchestrator.cap.js';
@@ -250,8 +250,8 @@ export { type IZoneRulesProvider, type ZoneRuleStage, ZoneRuleStageEnum, zoneRul
250
250
  export { type IZonesProvider, type PolygonPoint, PolygonPointSchema, type Zone, type ZoneKind, ZoneKindEnum, ZoneSchema, zonesCapability, } from './zones.cap.js';
251
251
  export type { ITrainingCloudProvider, ProviderJobState, ProviderJobStatus, TrainerSourceRef, TrainingCredentialCheck, TrainingGpuOption, TrainingLogLine, TrainingProviderDefaults, TrainingProviderDescriptor, TrainingProviderEntry, TrainingProviderType, TrainingProviderUpdateEntryInput, TrainingRegionOption, } from './training-provider.cap.js';
252
252
  export { ProviderJobStateSchema, ProviderJobStatusSchema, TrainerSourceRefSchema, TrainingCredentialCheckSchema, TrainingGpuOptionSchema, TrainingLogLineSchema, TrainingProviderDefaultsSchema, TrainingProviderDescriptorSchema, TrainingProviderEntrySchema, TrainingProviderTypeSchema, TrainingProviderUpdateEntryInputSchema, TrainingRegionOptionSchema, trainingProviderCapability, } from './training-provider.cap.js';
253
- export type { ITrainingOrchestrator, TrainingBaseModel, TrainingCanary, TrainingCorpusSelection, TrainingFailureReason, TrainingJob, TrainingJobPlan, TrainingJobRequest, TrainingJobState, TrainingPreset, TrainingProgressPoint, TrainingRefusalReason, TrainingSplitPlan, } from './training.cap.js';
254
- export { TrainingBaseModelSchema, TrainingCanarySchema, TrainingCorpusSelectionSchema, TrainingFailureReasonSchema, TrainingJobPlanSchema, TrainingJobRequestSchema, TrainingJobSchema, TrainingJobStateSchema, TrainingPresetSchema, TrainingProgressPointSchema, TrainingRefusalReasonSchema, TrainingSplitPlanSchema, trainingCapability, } from './training.cap.js';
253
+ export type { ITrainingOrchestrator, TrainingAcceleratorRef, TrainingBaseModel, TrainingCanary, TrainingCanaryTarget, TrainingCorpusSelection, TrainingFailureReason, TrainingJob, TrainingJobPlan, TrainingJobRequest, TrainingJobState, TrainingPreset, TrainingProgressPoint, TrainingRefusalReason, TrainingSplitPlan, } from './training.cap.js';
254
+ export { TrainingAcceleratorRefSchema, TrainingBaseModelSchema, TrainingCanarySchema, TrainingCanaryTargetSchema, TrainingCorpusSelectionSchema, TrainingFailureReasonSchema, TrainingJobPlanSchema, TrainingJobRequestSchema, TrainingJobSchema, TrainingJobStateSchema, TrainingPresetSchema, TrainingProgressPointSchema, TrainingRefusalReasonSchema, TrainingSplitPlanSchema, trainingCapability, } from './training.cap.js';
255
255
  import type { IReadinessRegistry } from '../interfaces/readiness.js';
256
256
  import type { accessoriesCapability } from './accessories.cap.js';
257
257
  import type { addonPagesCapability } from './addon-pages.cap.js';
@@ -429,6 +429,20 @@ export declare const TrainingExportSummarySchema: z.ZodObject<{
429
429
  }, z.core.$strip>>>;
430
430
  }, z.core.$strip>;
431
431
  export type TrainingExportSummary = z.infer<typeof TrainingExportSummarySchema>;
432
+ /**
433
+ * Where one frame of a track was inferred: the runner NODE that emitted it
434
+ * (`PipelineInferenceResultPayload.nodeId`), the inference DEVICE its root ran
435
+ * on (`FrameResult.rootDeviceKey`, e.g. `openvino:npu`) and the ROOT model
436
+ * (`FrameResult.rootModelId`). Absent members are unknown, never empty: a
437
+ * camera's onboard detector names no device or model, and a runner older than
438
+ * `rootDeviceKey` names no device.
439
+ */
440
+ export declare const TrackPlacementSchema: z.ZodObject<{
441
+ nodeId: z.ZodString;
442
+ deviceKey: z.ZodOptional<z.ZodString>;
443
+ modelId: z.ZodOptional<z.ZodString>;
444
+ }, z.core.$strip>;
445
+ export type TrackPlacement = z.infer<typeof TrackPlacementSchema>;
432
446
  declare const TrackSchema: z.ZodObject<{
433
447
  markForTrain: z.ZodOptional<z.ZodBoolean>;
434
448
  debug: z.ZodOptional<z.ZodBoolean>;
@@ -536,6 +550,16 @@ declare const TrackSchema: z.ZodObject<{
536
550
  hasRider: z.ZodOptional<z.ZodBoolean>;
537
551
  previewMissReason: z.ZodOptional<z.ZodString>;
538
552
  modelId: z.ZodOptional<z.ZodString>;
553
+ openedPlacement: z.ZodOptional<z.ZodObject<{
554
+ nodeId: z.ZodString;
555
+ deviceKey: z.ZodOptional<z.ZodString>;
556
+ modelId: z.ZodOptional<z.ZodString>;
557
+ }, z.core.$strip>>;
558
+ closedPlacement: z.ZodOptional<z.ZodObject<{
559
+ nodeId: z.ZodString;
560
+ deviceKey: z.ZodOptional<z.ZodString>;
561
+ modelId: z.ZodOptional<z.ZodString>;
562
+ }, z.core.$strip>>;
539
563
  frameWidth: z.ZodOptional<z.ZodNumber>;
540
564
  frameHeight: z.ZodOptional<z.ZodNumber>;
541
565
  }, z.core.$strip>;
@@ -3115,6 +3139,16 @@ declare const RecentTracksPageSchema: z.ZodObject<{
3115
3139
  hasRider: z.ZodOptional<z.ZodBoolean>;
3116
3140
  previewMissReason: z.ZodOptional<z.ZodString>;
3117
3141
  modelId: z.ZodOptional<z.ZodString>;
3142
+ openedPlacement: z.ZodOptional<z.ZodObject<{
3143
+ nodeId: z.ZodString;
3144
+ deviceKey: z.ZodOptional<z.ZodString>;
3145
+ modelId: z.ZodOptional<z.ZodString>;
3146
+ }, z.core.$strip>>;
3147
+ closedPlacement: z.ZodOptional<z.ZodObject<{
3148
+ nodeId: z.ZodString;
3149
+ deviceKey: z.ZodOptional<z.ZodString>;
3150
+ modelId: z.ZodOptional<z.ZodString>;
3151
+ }, z.core.$strip>>;
3118
3152
  frameWidth: z.ZodOptional<z.ZodNumber>;
3119
3153
  frameHeight: z.ZodOptional<z.ZodNumber>;
3120
3154
  }, z.core.$strip>>>;
@@ -3685,6 +3719,16 @@ export declare const pipelineAnalyticsCapability: {
3685
3719
  hasRider: z.ZodOptional<z.ZodBoolean>;
3686
3720
  previewMissReason: z.ZodOptional<z.ZodString>;
3687
3721
  modelId: z.ZodOptional<z.ZodString>;
3722
+ openedPlacement: z.ZodOptional<z.ZodObject<{
3723
+ nodeId: z.ZodString;
3724
+ deviceKey: z.ZodOptional<z.ZodString>;
3725
+ modelId: z.ZodOptional<z.ZodString>;
3726
+ }, z.core.$strip>>;
3727
+ closedPlacement: z.ZodOptional<z.ZodObject<{
3728
+ nodeId: z.ZodString;
3729
+ deviceKey: z.ZodOptional<z.ZodString>;
3730
+ modelId: z.ZodOptional<z.ZodString>;
3731
+ }, z.core.$strip>>;
3688
3732
  frameWidth: z.ZodOptional<z.ZodNumber>;
3689
3733
  frameHeight: z.ZodOptional<z.ZodNumber>;
3690
3734
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -3798,6 +3842,16 @@ export declare const pipelineAnalyticsCapability: {
3798
3842
  hasRider: z.ZodOptional<z.ZodBoolean>;
3799
3843
  previewMissReason: z.ZodOptional<z.ZodString>;
3800
3844
  modelId: z.ZodOptional<z.ZodString>;
3845
+ openedPlacement: z.ZodOptional<z.ZodObject<{
3846
+ nodeId: z.ZodString;
3847
+ deviceKey: z.ZodOptional<z.ZodString>;
3848
+ modelId: z.ZodOptional<z.ZodString>;
3849
+ }, z.core.$strip>>;
3850
+ closedPlacement: z.ZodOptional<z.ZodObject<{
3851
+ nodeId: z.ZodString;
3852
+ deviceKey: z.ZodOptional<z.ZodString>;
3853
+ modelId: z.ZodOptional<z.ZodString>;
3854
+ }, z.core.$strip>>;
3801
3855
  frameWidth: z.ZodOptional<z.ZodNumber>;
3802
3856
  frameHeight: z.ZodOptional<z.ZodNumber>;
3803
3857
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -3941,6 +3995,16 @@ export declare const pipelineAnalyticsCapability: {
3941
3995
  hasRider: z.ZodOptional<z.ZodBoolean>;
3942
3996
  previewMissReason: z.ZodOptional<z.ZodString>;
3943
3997
  modelId: z.ZodOptional<z.ZodString>;
3998
+ openedPlacement: z.ZodOptional<z.ZodObject<{
3999
+ nodeId: z.ZodString;
4000
+ deviceKey: z.ZodOptional<z.ZodString>;
4001
+ modelId: z.ZodOptional<z.ZodString>;
4002
+ }, z.core.$strip>>;
4003
+ closedPlacement: z.ZodOptional<z.ZodObject<{
4004
+ nodeId: z.ZodString;
4005
+ deviceKey: z.ZodOptional<z.ZodString>;
4006
+ modelId: z.ZodOptional<z.ZodString>;
4007
+ }, z.core.$strip>>;
3944
4008
  frameWidth: z.ZodOptional<z.ZodNumber>;
3945
4009
  frameHeight: z.ZodOptional<z.ZodNumber>;
3946
4010
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -4080,6 +4144,16 @@ export declare const pipelineAnalyticsCapability: {
4080
4144
  hasRider: z.ZodOptional<z.ZodBoolean>;
4081
4145
  previewMissReason: z.ZodOptional<z.ZodString>;
4082
4146
  modelId: z.ZodOptional<z.ZodString>;
4147
+ openedPlacement: z.ZodOptional<z.ZodObject<{
4148
+ nodeId: z.ZodString;
4149
+ deviceKey: z.ZodOptional<z.ZodString>;
4150
+ modelId: z.ZodOptional<z.ZodString>;
4151
+ }, z.core.$strip>>;
4152
+ closedPlacement: z.ZodOptional<z.ZodObject<{
4153
+ nodeId: z.ZodString;
4154
+ deviceKey: z.ZodOptional<z.ZodString>;
4155
+ modelId: z.ZodOptional<z.ZodString>;
4156
+ }, z.core.$strip>>;
4083
4157
  frameWidth: z.ZodOptional<z.ZodNumber>;
4084
4158
  frameHeight: z.ZodOptional<z.ZodNumber>;
4085
4159
  }, z.core.$strip>>>;
@@ -4944,6 +5018,11 @@ export declare const pipelineAnalyticsCapability: {
4944
5018
  suppressed: "suppressed";
4945
5019
  }>;
4946
5020
  reason: z.ZodNullable<z.ZodString>;
5021
+ cropSource: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
5022
+ carried: "carried";
5023
+ fallback: "fallback";
5024
+ native: "native";
5025
+ }>>>;
4947
5026
  attempts: z.ZodNumber;
4948
5027
  deferredForMs: z.ZodNumber;
4949
5028
  decidedOnCoastedFrame: z.ZodBoolean;
@@ -4951,6 +5030,9 @@ export declare const pipelineAnalyticsCapability: {
4951
5030
  decidedByBirthEvidence: z.ZodBoolean;
4952
5031
  bestScore: z.ZodNullable<z.ZodNumber>;
4953
5032
  appliedMinConfidence: z.ZodNullable<z.ZodNumber>;
5033
+ detectorModelId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
5034
+ detectorDeviceKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
5035
+ detectorNodeId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4954
5036
  firstSeen: z.ZodNullable<z.ZodNumber>;
4955
5037
  motionOnsetAt: z.ZodNullable<z.ZodNumber>;
4956
5038
  birthLatencyMs: z.ZodNullable<z.ZodNumber>;
@@ -2,7 +2,6 @@ import { z } from 'zod';
2
2
  import type { ConfigField, ConfigUISchema } from '../interfaces/config-ui.js';
3
3
  import type { InferenceCapabilities, ModelAvailability } from '../interfaces/inference-capabilities.js';
4
4
  import type { AudioResult, FrameResult } from '../types/detection.js';
5
- import type { PipelineConfig } from '../types/pipeline.js';
6
5
  import { type InferProvider } from './capability-definition.js';
7
6
  /**
8
7
  * A root model's boxes standing in for one crop-kind step's own inference
@@ -327,7 +326,6 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
327
326
  defaultModelId: z.ZodString;
328
327
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
329
328
  enabledByDefault: z.ZodOptional<z.ZodBoolean>;
330
- backfillIntoExistingOverrides: z.ZodOptional<z.ZodBoolean>;
331
329
  defaultConfidence: z.ZodNumber;
332
330
  group: z.ZodOptional<z.ZodString>;
333
331
  configSchema: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodCustom<ConfigField, ConfigField>>>>;
@@ -441,7 +439,6 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
441
439
  defaultModelId: z.ZodString;
442
440
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
443
441
  enabledByDefault: z.ZodOptional<z.ZodBoolean>;
444
- backfillIntoExistingOverrides: z.ZodOptional<z.ZodBoolean>;
445
442
  defaultConfidence: z.ZodNumber;
446
443
  group: z.ZodOptional<z.ZodString>;
447
444
  configSchema: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodCustom<ConfigField, ConfigField>>>>;
@@ -591,7 +588,6 @@ declare const PipelineSchemaSchema: z.ZodObject<{
591
588
  defaultModelId: z.ZodString;
592
589
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
593
590
  enabledByDefault: z.ZodOptional<z.ZodBoolean>;
594
- backfillIntoExistingOverrides: z.ZodOptional<z.ZodBoolean>;
595
591
  defaultConfidence: z.ZodNumber;
596
592
  group: z.ZodOptional<z.ZodString>;
597
593
  configSchema: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodCustom<ConfigField, ConfigField>>>>;
@@ -717,19 +713,6 @@ export declare const pipelineExecutorCapability: {
717
713
  }>;
718
714
  device: z.ZodOptional<z.ZodString>;
719
715
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
720
- readonly getDefaultSteps: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
721
- runtime: z.ZodLiteral<"python">;
722
- backend: z.ZodString;
723
- format: z.ZodEnum<{
724
- coreml: "coreml";
725
- gguf: "gguf";
726
- onnx: "onnx";
727
- openvino: "openvino";
728
- pt: "pt";
729
- tflite: "tflite";
730
- }>;
731
- device: z.ZodOptional<z.ZodString>;
732
- }, z.core.$strip>, z.ZodArray<z.ZodType<PipelineDefaultStepOutput, unknown, z.core.$ZodTypeInternals<PipelineDefaultStepOutput, unknown>>>, import("./capability-definition.js").CapabilityMethodKind>;
733
716
  /**
734
717
  * Per-node detection-engine provisioning snapshot. Returns the live
735
718
  * state of the lazy runtime-provisioning machine on `nodeId`
@@ -772,50 +755,6 @@ export declare const pipelineExecutorCapability: {
772
755
  }, z.core.$strip>, z.ZodObject<{
773
756
  success: z.ZodLiteral<true>;
774
757
  }, z.core.$strip>, "mutation">;
775
- /**
776
- * Clear THIS node's executor-side PER-DEVICE settings stores (the
777
- * per-camera step overrides the object-detection root reads via
778
- * `applyDeviceOverridesToTree`). `nodeId` is the ROUTING key — the
779
- * generated cap-router strips it (default `nodeIdMode: 'routing'`) and
780
- * dispatches to that node, so the provider method runs ON the target
781
- * node and receives no `nodeId`.
782
- *
783
- * This is the slimmed executor leg of the orchestrator's
784
- * `resetNodePipelineDefaults` flow (which owns the real reset: node
785
- * addonDefaults pins + per-camera orchestrator overrides). The legacy
786
- * `resetToDefault` — which reset a persisted global step-tree seed
787
- * nothing in the live per-camera path read — was removed together with
788
- * that seed.
789
- */
790
- readonly clearDeviceOverrides: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
791
- nodeId: z.ZodString;
792
- }, z.core.$strip>, z.ZodObject<{
793
- success: z.ZodLiteral<true>;
794
- clearedDevices: z.ZodNumber;
795
- }, z.core.$strip>, "mutation">;
796
- /**
797
- * Auto tune (D745): the MODEL-BOUND thresholds (`bindsToModel` keys of
798
- * the object-detection root, and their binding keys) stored in THIS node's
799
- * per-camera detector settings — and, unless `dryRun`, remove them so the
800
- * running model's own defaults apply. Every other key of a camera's store
801
- * is kept. `nodeId` is the ROUTING key. `deviceIds` absent ⇒ every camera
802
- * with a store. A camera whose store could not be read is `refused`, never
803
- * reported as clean.
804
- */
805
- readonly clearModelBoundDeviceOverrides: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
806
- nodeId: z.ZodString;
807
- deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
808
- dryRun: z.ZodBoolean;
809
- }, z.core.$strip>, z.ZodObject<{
810
- entries: z.ZodReadonly<z.ZodArray<z.ZodObject<{
811
- deviceId: z.ZodNumber;
812
- keys: z.ZodReadonly<z.ZodArray<z.ZodString>>;
813
- }, z.core.$strip>>>;
814
- refused: z.ZodReadonly<z.ZodArray<z.ZodObject<{
815
- deviceId: z.ZodNumber;
816
- reason: z.ZodString;
817
- }, z.core.$strip>>>;
818
- }, z.core.$strip>, "mutation">;
819
758
  /**
820
759
  * Which of THIS node's inference devices the executor currently refuses,
821
760
  * and why. `nodeId` is the ROUTING key (stripped by the generated router).
@@ -1010,15 +949,12 @@ export declare const pipelineExecutorCapability: {
1010
949
  defaultModelId: z.ZodString;
1011
950
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1012
951
  enabledByDefault: z.ZodOptional<z.ZodBoolean>;
1013
- backfillIntoExistingOverrides: z.ZodOptional<z.ZodBoolean>;
1014
952
  defaultConfidence: z.ZodNumber;
1015
953
  group: z.ZodOptional<z.ZodString>;
1016
954
  configSchema: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodCustom<ConfigField, ConfigField>>>>;
1017
955
  }, z.core.$strip>>>;
1018
956
  }, z.core.$strip>>>;
1019
957
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1020
- readonly getGlobalSteps: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodType<PipelineDefaultStepOutput, unknown, z.core.$ZodTypeInternals<PipelineDefaultStepOutput, unknown>>>>>, import("./capability-definition.js").CapabilityMethodKind>;
1021
- readonly getGlobalPipelineConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodCustom<PipelineConfig | null, PipelineConfig | null>, import("./capability-definition.js").CapabilityMethodKind>;
1022
958
  readonly getOrchestratorConfigSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodCustom<ConfigUISchema, ConfigUISchema>, import("./capability-definition.js").CapabilityMethodKind>;
1023
959
  /**
1024
960
  * Gate B (pre-init config-correctness gate). PURE COMPUTE against this