@camstack/addon-post-analysis 1.1.26 → 1.1.28

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.
@@ -4308,6 +4308,14 @@ function object(shape, params) {
4308
4308
  ...normalizeParams(params)
4309
4309
  });
4310
4310
  }
4311
+ function looseObject(shape, params) {
4312
+ return new ZodObject({
4313
+ type: "object",
4314
+ shape,
4315
+ catchall: unknown(),
4316
+ ...normalizeParams(params)
4317
+ });
4318
+ }
4311
4319
  var ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
4312
4320
  $ZodUnion.init(inst, def);
4313
4321
  ZodType.init(inst, def);
@@ -4649,7 +4657,7 @@ function _instanceof(cls, params = {}) {
4649
4657
  return inst;
4650
4658
  }
4651
4659
  //#endregion
4652
- //#region ../types/dist/sleep-BC9Yqte7.mjs
4660
+ //#region ../types/dist/sleep-DkhOVOjW.mjs
4653
4661
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4654
4662
  EventCategory["SystemBoot"] = "system.boot";
4655
4663
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5059,10 +5067,43 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5059
5067
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
5060
5068
  EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
5061
5069
  EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
5070
+ /**
5071
+ * Unified track-lifecycle event: ONE category carrying `phase:
5072
+ * 'start' | 'update' | 'end'` with a rich, typed
5073
+ * `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
5074
+ * `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
5075
+ * pair — a consumer subscribes once and branches on `phase`.
5076
+ */
5077
+ EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
5078
+ /**
5079
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
5080
+ * (`phase:'start'`). Kept as a soft alias — no known subscribers.
5081
+ */
5062
5082
  EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
5083
+ /**
5084
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
5085
+ * (`phase:'end'`). Kept as a soft alias — no known subscribers.
5086
+ */
5063
5087
  EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
5064
5088
  EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
5065
5089
  EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
5090
+ /**
5091
+ * Fired by `addon-post-analysis` whenever a gallery face row changes:
5092
+ * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
5093
+ * `'unassigned'` its identity link changed, `'deleted'` the row was
5094
+ * removed. Telemetry semantics (D8): a lost event only delays a refresh,
5095
+ * never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
5096
+ */
5097
+ EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
5098
+ /**
5099
+ * Fired by `addon-post-analysis` whenever a gallery plate row changes:
5100
+ * `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
5101
+ * `'assigned'` / `'unassigned'` its vehicle link changed
5102
+ * (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
5103
+ * semantics (D8): a lost event only delays a refresh, never a correctness
5104
+ * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
5105
+ */
5106
+ EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
5066
5107
  EventCategory["FrigateLiveEvent"] = "frigate.live-event";
5067
5108
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
5068
5109
  /**
@@ -6380,11 +6421,6 @@ var ProfileRtspEntrySchema = object({
6380
6421
  codec: string().optional(),
6381
6422
  resolution: CamStreamResolutionSchema.optional()
6382
6423
  });
6383
- /** Narrow an unknown value to a plain `Record<string, unknown>` or return null. */
6384
- function asJsonObject(value) {
6385
- if (value === null || typeof value !== "object" || Array.isArray(value)) return null;
6386
- return { ...value };
6387
- }
6388
6424
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
6389
6425
  DeviceType["Camera"] = "camera";
6390
6426
  DeviceType["Hub"] = "hub";
@@ -6908,7 +6944,8 @@ var MODEL_FORMATS = [
6908
6944
  "coreml",
6909
6945
  "openvino",
6910
6946
  "tflite",
6911
- "pt"
6947
+ "pt",
6948
+ "gguf"
6912
6949
  ];
6913
6950
  /**
6914
6951
  * Multi-file format payload.
@@ -6952,7 +6989,8 @@ var ModelFormatsSchema = object({
6952
6989
  coreml: ModelFormatEntrySchema.optional(),
6953
6990
  openvino: ModelFormatEntrySchema.optional(),
6954
6991
  tflite: ModelFormatEntrySchema.optional(),
6955
- pt: ModelFormatEntrySchema.optional()
6992
+ pt: ModelFormatEntrySchema.optional(),
6993
+ gguf: ModelFormatEntrySchema.optional()
6956
6994
  });
6957
6995
  /**
6958
6996
  * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
@@ -10542,7 +10580,8 @@ var ModelFormatSchema$1 = _enum([
10542
10580
  "coreml",
10543
10581
  "openvino",
10544
10582
  "tflite",
10545
- "pt"
10583
+ "pt",
10584
+ "gguf"
10546
10585
  ]);
10547
10586
  var PipelineSlotSchema = _enum([
10548
10587
  "detector",
@@ -10797,7 +10836,15 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
10797
10836
  image: _instanceof(Uint8Array).optional(),
10798
10837
  referenceImage: string().optional(),
10799
10838
  deviceId: number().optional(),
10800
- sessionId: string().optional()
10839
+ sessionId: string().optional(),
10840
+ /**
10841
+ * Execution plane. 'full' (default) runs the whole tree — benchmark,
10842
+ * reference-image, and detail-subtree calls. 'frame' is the live
10843
+ * per-frame dispatch: ONLY root-plane steps run; crop children
10844
+ * (inputClasses ≠ null) are skipped and served per-track via
10845
+ * pipelineRunner.runDetailSubtree (two-plane design).
10846
+ */
10847
+ plane: _enum(["full", "frame"]).optional()
10801
10848
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
10802
10849
  engine: PipelineEngineChoiceSchema.optional(),
10803
10850
  steps: array(PipelineStepInputSchema).min(1),
@@ -10940,6 +10987,28 @@ var NativeCropResultSchema = object({
10940
10987
  width: number().int().positive(),
10941
10988
  height: number().int().positive()
10942
10989
  });
10990
+ /** Parent detection context passed to `runDetailSubtree` — the crop's
10991
+ * originating detection, in FRAME-space coordinates. Reuses
10992
+ * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
10993
+ * the coordinates are frame-space rather than getNativeCrop's
10994
+ * normalized [0,1] convention). */
10995
+ var DetailParentSchema = object({
10996
+ bbox: NativeCropBboxSchema,
10997
+ className: string()
10998
+ });
10999
+ /** One child-step result from `runDetailSubtree` — an embedding, label,
11000
+ * or refined detection produced by running the crop-subtree on a
11001
+ * single tracked detection. */
11002
+ var DetailResultSchema = object({
11003
+ stepId: string(),
11004
+ className: string(),
11005
+ score: number(),
11006
+ /** FRAME-space bbox (already mapped back from crop space). */
11007
+ bbox: NativeCropBboxSchema.optional(),
11008
+ embedding: string().optional(),
11009
+ label: string().optional(),
11010
+ alignedCropJpeg: string().optional()
11011
+ });
10943
11012
  /**
10944
11013
  * Per-camera tunable ranges + defaults. Single source of truth used
10945
11014
  * by both the Zod data schema (validation + default fallback) and
@@ -11200,7 +11269,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
11200
11269
  handle: FrameHandleSchema,
11201
11270
  bbox: NativeCropBboxSchema,
11202
11271
  maxWidth: number().int().positive().optional()
11203
- }), NativeCropResultSchema.nullable());
11272
+ }), NativeCropResultSchema.nullable()), method(object({
11273
+ deviceId: number(),
11274
+ frameHandle: FrameHandleSchema.optional(),
11275
+ cropJpeg: string().optional(),
11276
+ parent: DetailParentSchema,
11277
+ steps: array(string()).optional()
11278
+ }), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" });
11204
11279
  object({
11205
11280
  detected: boolean(),
11206
11281
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -11812,6 +11887,140 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
11812
11887
  deviceId: number(),
11813
11888
  status: PtzAutotrackStatusSchema
11814
11889
  });
11890
+ /**
11891
+ * scene-monitor — device-scoped reference-region state cap. An operator marks
11892
+ * a rect ROI on a camera frame and names one or more states; the engine
11893
+ * (pipeline-analytics, designated post-processing node) reports which state is
11894
+ * active on an ongoing basis. Two operator-selectable check modes share every-
11895
+ * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
11896
+ * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
11897
+ *
11898
+ * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
11899
+ * derives the device-detail contribution; the provider carries NO hand-written
11900
+ * settings-contribution methods. `status.kind:'push'` — the engine pushes on
11901
+ * every hysteresis flip / availability change; consumers never poll.
11902
+ */
11903
+ /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
11904
+ * be added without a wire break (matching falls back to any-condition refs). */
11905
+ var SceneConditionSchema = string();
11906
+ /** One captured reference — condition-tagged, model-version-gated. `embedding`
11907
+ * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
11908
+ var SceneReferenceSchema = object({
11909
+ embedding: array(number()),
11910
+ modelId: string(),
11911
+ condition: SceneConditionSchema,
11912
+ capturedAt: number(),
11913
+ thumbnailMediaId: string().optional()
11914
+ });
11915
+ var SceneMonitorStateSchema = object({
11916
+ id: string(),
11917
+ label: string(),
11918
+ references: array(SceneReferenceSchema),
11919
+ textPrompts: array(string()).optional(),
11920
+ referenceCount: number(),
11921
+ currentlyMatched: boolean()
11922
+ });
11923
+ /** Per-mode comparator params in a discriminated union so an `llm` scene never
11924
+ * carries similarity knobs and vice-versa. */
11925
+ var SceneCheckSchema = discriminatedUnion("mode", [object({
11926
+ mode: literal("similarity"),
11927
+ threshold: number().min(0).max(1),
11928
+ hysteresisCount: number().int().positive()
11929
+ }), object({
11930
+ mode: literal("llm"),
11931
+ prompt: string(),
11932
+ profileId: string().optional(),
11933
+ hysteresisCount: number().int().positive()
11934
+ })]);
11935
+ var SceneMonitorSchema = object({
11936
+ id: string(),
11937
+ label: string(),
11938
+ roi: MaskRectShapeSchema,
11939
+ enabled: boolean(),
11940
+ triggerMode: _enum([
11941
+ "periodic",
11942
+ "on-motion",
11943
+ "both"
11944
+ ]),
11945
+ checkIntervalSec: number().optional(),
11946
+ check: SceneCheckSchema,
11947
+ states: array(SceneMonitorStateSchema),
11948
+ currentStateId: string().nullable(),
11949
+ lastCheckedAt: number().nullable(),
11950
+ lastConfidence: number().nullable(),
11951
+ currentCondition: SceneConditionSchema.nullable(),
11952
+ availability: _enum(["ok", "unavailable"]),
11953
+ unavailableReason: string().nullable()
11954
+ });
11955
+ var SceneMonitorStatusSchema = object({
11956
+ monitors: array(SceneMonitorSchema),
11957
+ lastFetchedAt: number()
11958
+ });
11959
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
11960
+ deviceId: number(),
11961
+ label: string(),
11962
+ roi: MaskRectShapeSchema,
11963
+ check: SceneCheckSchema,
11964
+ triggerMode: _enum([
11965
+ "periodic",
11966
+ "on-motion",
11967
+ "both"
11968
+ ]).optional(),
11969
+ checkIntervalSec: number().optional()
11970
+ }), SceneMonitorSchema, {
11971
+ kind: "mutation",
11972
+ auth: "admin"
11973
+ }), method(object({
11974
+ deviceId: number(),
11975
+ monitorId: string(),
11976
+ patch: object({
11977
+ label: string().optional(),
11978
+ roi: MaskRectShapeSchema.optional(),
11979
+ enabled: boolean().optional(),
11980
+ triggerMode: _enum([
11981
+ "periodic",
11982
+ "on-motion",
11983
+ "both"
11984
+ ]).optional(),
11985
+ checkIntervalSec: number().optional(),
11986
+ check: SceneCheckSchema.optional()
11987
+ })
11988
+ }), _void(), {
11989
+ kind: "mutation",
11990
+ auth: "admin"
11991
+ }), method(object({
11992
+ deviceId: number(),
11993
+ monitorId: string()
11994
+ }), _void(), {
11995
+ kind: "mutation",
11996
+ auth: "admin"
11997
+ }), method(object({
11998
+ deviceId: number(),
11999
+ monitorId: string(),
12000
+ stateId: string().optional(),
12001
+ label: string().optional(),
12002
+ condition: SceneConditionSchema.optional()
12003
+ }), object({
12004
+ stateId: string(),
12005
+ referenceCount: number()
12006
+ }), {
12007
+ kind: "mutation",
12008
+ auth: "admin"
12009
+ }), method(object({
12010
+ deviceId: number(),
12011
+ monitorId: string(),
12012
+ stateId: string(),
12013
+ index: number()
12014
+ }), _void(), {
12015
+ kind: "mutation",
12016
+ auth: "admin"
12017
+ }), method(object({
12018
+ deviceId: number(),
12019
+ monitorId: string()
12020
+ }), _void(), {
12021
+ kind: "mutation",
12022
+ auth: "admin"
12023
+ });
11815
12024
  object({
11816
12025
  /** Whether the script is currently executing. */
11817
12026
  isRunning: boolean(),
@@ -12888,7 +13097,12 @@ var NotificationRuleConditionsSchema = object({
12888
13097
  clipDescription: object({
12889
13098
  text: string().min(1),
12890
13099
  minSimilarity: number().min(0).max(1)
12891
- }).optional()
13100
+ }).optional(),
13101
+ /** Match events whose recognized-entity label (face identity name or plate
13102
+ * vehicle name, propagated onto `event.data.label`) is one of these values.
13103
+ * Empty/absent → unaffected (back-compat). Enables "notify me when <named
13104
+ * vehicle/person> is seen". */
13105
+ labels: array(string()).readonly().optional()
12892
13106
  });
12893
13107
  var NotificationRuleTemplateSchema = object({
12894
13108
  title: string(),
@@ -13146,11 +13360,19 @@ method(object({
13146
13360
  * login page needs NO change.
13147
13361
  *
13148
13362
  * - `widget` — a Module-Federation widget the login page mounts (via
13149
- * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
13150
- * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
13151
- * addon bundle. The referenced widget also declares `preAuth: true` in
13152
- * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
13153
- * stamps a public `bundleUrl` from `addonId` + `bundle`.
13363
+ * `loadRemoteBundle`) for an in-page ceremony. `auth.listLoginMethods`
13364
+ * stamps a public `bundleUrl` from `addonId` + `bundle`. Generic
13365
+ * mechanism kept for future use; no shipped addon uses it on the login
13366
+ * page (the passkey ceremony below runs natively in the shell instead).
13367
+ *
13368
+ * - `passkey` — a declarative WebAuthn ceremony the shell renders
13369
+ * natively (`@simplewebauthn/browser` lives in `addon-admin-ui`, not in
13370
+ * a remotely-loaded bundle). Carries the addon's effective `rpId` /
13371
+ * `origin` (from its `resolveRpID()` / `resolveOrigin()`) so the shell
13372
+ * can gate visibility (IP-literal origin, hostname/rpId mismatch) WITHOUT
13373
+ * fetching any remote code pre-auth. Contribution stays unconditional —
13374
+ * enrollment state is never leaked pre-auth; visibility is a shell
13375
+ * decision.
13154
13376
  *
13155
13377
  * Every contribution carries a `stage`:
13156
13378
  * - `primary` — shown on the first credentials screen (OIDC /
@@ -13164,30 +13386,45 @@ method(object({
13164
13386
  */
13165
13387
  /** When a login method renders in the two-phase login flow. */
13166
13388
  var LoginStageEnum = _enum(["primary", "second-factor"]);
13167
- /** One login-method contribution — redirect button OR pre-auth widget. */
13168
- var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
13169
- kind: literal("redirect"),
13170
- /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
13171
- id: string(),
13172
- /** Operator-facing button label. */
13173
- label: string(),
13174
- /** lucide-react icon name. */
13175
- icon: string().optional(),
13176
- /** Addon-owned HTTP route the button navigates to (GET). */
13177
- startUrl: string(),
13178
- stage: LoginStageEnum
13179
- }), object({
13180
- kind: literal("widget"),
13181
- /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
13182
- id: string(),
13183
- /** Owning addon id drives the public bundle URL + the MF namespace. */
13184
- addonId: string(),
13185
- /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
13186
- bundle: string(),
13187
- /** MF remote descriptor `{ remoteName, exposedModule, componentKey }`. */
13188
- remote: WidgetRemoteSchema,
13189
- stage: LoginStageEnum
13190
- })]);
13389
+ /** One login-method contribution — redirect button, pre-auth widget, or native passkey ceremony. */
13390
+ var LoginMethodContributionSchema = discriminatedUnion("kind", [
13391
+ object({
13392
+ kind: literal("redirect"),
13393
+ /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
13394
+ id: string(),
13395
+ /** Operator-facing button label. */
13396
+ label: string(),
13397
+ /** lucide-react icon name. */
13398
+ icon: string().optional(),
13399
+ /** Addon-owned HTTP route the button navigates to (GET). */
13400
+ startUrl: string(),
13401
+ stage: LoginStageEnum
13402
+ }),
13403
+ object({
13404
+ kind: literal("widget"),
13405
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
13406
+ id: string(),
13407
+ /** Owning addon id — drives the public bundle URL + the MF namespace. */
13408
+ addonId: string(),
13409
+ /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
13410
+ bundle: string(),
13411
+ /** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
13412
+ remote: WidgetRemoteSchema,
13413
+ stage: LoginStageEnum
13414
+ }),
13415
+ object({
13416
+ kind: literal("passkey"),
13417
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-direct-login`). */
13418
+ id: string(),
13419
+ /** Operator-facing button label. */
13420
+ label: string(),
13421
+ stage: LoginStageEnum,
13422
+ /** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
13423
+ rpId: string(),
13424
+ /** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
13425
+ origin: string().nullable()
13426
+ })
13427
+ ]);
13191
13428
  method(_void(), array(LoginMethodContributionSchema).readonly());
13192
13429
  /**
13193
13430
  * Orchestrator-side destination metadata. The orchestrator computes
@@ -15025,14 +15262,14 @@ var TargetKindCapsSchema = object({
15025
15262
  * the union is large and not meant for runtime validation here; the exported
15026
15263
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
15027
15264
  */
15028
- var ConfigSchemaPassthrough = unknown();
15265
+ var ConfigSchemaPassthrough$1 = unknown();
15029
15266
  var TargetKindSchema = object({
15030
15267
  kind: string(),
15031
15268
  label: string(),
15032
15269
  icon: string(),
15033
15270
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
15034
15271
  addonId: string(),
15035
- configSchema: ConfigSchemaPassthrough,
15272
+ configSchema: ConfigSchemaPassthrough$1,
15036
15273
  supportsDiscovery: boolean(),
15037
15274
  caps: TargetKindCapsSchema
15038
15275
  });
@@ -15085,6 +15322,298 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
15085
15322
  enabled: boolean()
15086
15323
  }), _void(), { kind: "mutation" });
15087
15324
  /**
15325
+ * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
15326
+ * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
15327
+ * caps stay wire-compatible without a circular cap→cap import.
15328
+ *
15329
+ * Errors are a discriminated-union RESULT, never thrown: the shape survives
15330
+ * every transport tier structurally, and failed calls still write usage rows.
15331
+ * Token counts only in v1 — no costUsd (operator decision, 2026-07-15).
15332
+ */
15333
+ var LlmUsageSchema = object({
15334
+ inputTokens: number(),
15335
+ outputTokens: number()
15336
+ });
15337
+ var LlmErrorCodeSchema = _enum([
15338
+ "timeout",
15339
+ "rate-limited",
15340
+ "auth",
15341
+ "refusal",
15342
+ "bad-request",
15343
+ "unavailable",
15344
+ "no-profile",
15345
+ "budget-exceeded",
15346
+ "adapter-error"
15347
+ ]);
15348
+ var LlmGenerateResultSchema = discriminatedUnion("ok", [object({
15349
+ ok: literal(true),
15350
+ text: string(),
15351
+ model: string(),
15352
+ usage: LlmUsageSchema,
15353
+ truncated: boolean(),
15354
+ latencyMs: number()
15355
+ }), object({
15356
+ ok: literal(false),
15357
+ code: LlmErrorCodeSchema,
15358
+ message: string(),
15359
+ retryAfterMs: number().optional()
15360
+ })]);
15361
+ /**
15362
+ * `Uint8Array` is the sanctioned binary convention — superjson + the UDS
15363
+ * MsgPack channel round-trip typed arrays (embedding-encoder.cap.ts:29,
15364
+ * notification-output.cap.ts:27-31 precedents).
15365
+ */
15366
+ var LlmImageSchema = object({
15367
+ bytes: _instanceof(Uint8Array),
15368
+ mimeType: string()
15369
+ });
15370
+ var LlmGenerateBaseInputSchema = object({
15371
+ /** Collection routing (the notification-output posture). */
15372
+ addonId: string().optional(),
15373
+ /** Explicit profile; else the resolution chain (spec §3). */
15374
+ profileId: string().optional(),
15375
+ /** MANDATORY usage tag: 'ai-summary', 'notifier-rules', 'adhoc-ui', … */
15376
+ consumer: string(),
15377
+ system: string().optional(),
15378
+ /** v1: single-turn. `messages[]` is a v2 additive field. */
15379
+ prompt: string(),
15380
+ /** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
15381
+ jsonSchema: record(string(), unknown()).optional(),
15382
+ /** Per-call override of the profile default. */
15383
+ maxTokens: number().int().positive().optional(),
15384
+ temperature: number().optional()
15385
+ });
15386
+ /**
15387
+ * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
15388
+ * on EVERY node where `addon-ai` is installed; the hub `llm` provider reaches
15389
+ * a specific node's runtime with `nodePin(profile.runtime.nodeId)` — normal
15390
+ * cap routing, zero bespoke plumbing. `internal: true`: the operator reaches
15391
+ * this only through the `llm` cap's methods.
15392
+ *
15393
+ * One running llama-server child per node in v1 (models are RAM-heavy).
15394
+ * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
15395
+ * watchdog — operator decision #3).
15396
+ */
15397
+ var ManagedModelRefSchema = discriminatedUnion("kind", [
15398
+ object({
15399
+ kind: literal("catalog"),
15400
+ catalogId: string()
15401
+ }),
15402
+ object({
15403
+ kind: literal("url"),
15404
+ url: string(),
15405
+ sha256: string().optional()
15406
+ }),
15407
+ object({
15408
+ kind: literal("path"),
15409
+ path: string()
15410
+ })
15411
+ ]);
15412
+ var ManagedRuntimeConfigSchema = object({
15413
+ /** WHERE the runtime lives — hub or any agent. */
15414
+ nodeId: string(),
15415
+ /** Closed for v1; 'ollama' is a v2 candidate. */
15416
+ engine: _enum(["llama-cpp"]),
15417
+ model: ManagedModelRefSchema,
15418
+ contextSize: number().int().default(4096),
15419
+ /** 0 = CPU-only. */
15420
+ gpuLayers: number().int().default(0),
15421
+ /** Default: cpus-2, clamped ≥1 (resolved node-side). */
15422
+ threads: number().int().optional(),
15423
+ /** Concurrent slots. */
15424
+ parallel: number().int().default(1),
15425
+ /** Else lazy: first generate boots it. */
15426
+ autoStart: boolean().default(false),
15427
+ /** 0 = never; frees RAM after quiet periods. */
15428
+ idleStopMinutes: number().int().default(30)
15429
+ });
15430
+ var LlmRuntimeStatusSchema = object({
15431
+ /** Status is ALWAYS node-qualified. */
15432
+ nodeId: string(),
15433
+ state: _enum([
15434
+ "stopped",
15435
+ "downloading",
15436
+ "starting",
15437
+ "ready",
15438
+ "crashed",
15439
+ "failed"
15440
+ ]),
15441
+ pid: number().optional(),
15442
+ port: number().optional(),
15443
+ modelPath: string().optional(),
15444
+ modelId: string().optional(),
15445
+ downloadProgress: number().min(0).max(1).optional(),
15446
+ lastError: string().optional(),
15447
+ crashesInWindow: number(),
15448
+ /** Child RSS (sampled best-effort). */
15449
+ memoryBytes: number().optional(),
15450
+ vramBytes: number().optional()
15451
+ });
15452
+ var LlmNodeModelSchema = object({
15453
+ file: string(),
15454
+ sizeBytes: number(),
15455
+ catalogId: string().optional(),
15456
+ installedAt: number().optional()
15457
+ });
15458
+ var LlmRuntimeDiskUsageSchema = object({
15459
+ nodeId: string(),
15460
+ modelsBytes: number(),
15461
+ freeBytes: number().optional()
15462
+ });
15463
+ method(LlmGenerateBaseInputSchema.extend({
15464
+ images: array(LlmImageSchema).optional(),
15465
+ runtime: ManagedRuntimeConfigSchema,
15466
+ /** The managed profile's timeout, threaded by the hub provider. */
15467
+ timeoutMs: number().int().positive().optional()
15468
+ }), LlmGenerateResultSchema, { kind: "mutation" }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
15469
+ kind: "mutation",
15470
+ auth: "admin"
15471
+ }), method(object({}), _void(), {
15472
+ kind: "mutation",
15473
+ auth: "admin"
15474
+ }), method(object({}), LlmRuntimeStatusSchema), method(object({ model: ManagedModelRefSchema }), _void(), {
15475
+ kind: "mutation",
15476
+ auth: "admin"
15477
+ }), method(object({ file: string() }), _void(), {
15478
+ kind: "mutation",
15479
+ auth: "admin"
15480
+ }), method(object({}), array(LlmNodeModelSchema)), method(object({}), LlmRuntimeDiskUsageSchema);
15481
+ /**
15482
+ * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
15483
+ * methods concat-fan across providers; single-row methods route to ONE
15484
+ * provider by the `addonId` in the call input (the notification-output
15485
+ * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
15486
+ * (hub-placed); the cap stays open for future providers.
15487
+ *
15488
+ * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
15489
+ * `apiKey` is a password field — providers REDACT it on read and merge on
15490
+ * write; a stored key NEVER round-trips to a client.
15491
+ */
15492
+ var LlmProfileKindSchema = _enum([
15493
+ "openai-compatible",
15494
+ "openai",
15495
+ "anthropic",
15496
+ "google",
15497
+ "managed-local"
15498
+ ]);
15499
+ var LlmProfileSchema = object({
15500
+ id: string(),
15501
+ name: string(),
15502
+ kind: LlmProfileKindSchema,
15503
+ /** Stamped by the provider — keeps the fanned catalog routable. */
15504
+ addonId: string(),
15505
+ enabled: boolean(),
15506
+ /** Vendor model id, or the managed runtime's loaded model. */
15507
+ model: string(),
15508
+ /** Required for openai-compatible; override for cloud kinds. */
15509
+ baseUrl: string().optional(),
15510
+ /** ConfigUISchema type:'password' — never round-trips (spec §5). */
15511
+ apiKey: string().optional(),
15512
+ supportsVision: boolean(),
15513
+ temperature: number().min(0).max(2).optional(),
15514
+ maxTokens: number().int().positive().optional(),
15515
+ timeoutMs: number().int().positive().default(6e4),
15516
+ extraHeaders: record(string(), string()).optional(),
15517
+ /** kind === 'managed-local' only (spec §4). */
15518
+ runtime: ManagedRuntimeConfigSchema.optional()
15519
+ });
15520
+ /** ConfigUISchema tree passed through untyped on the wire (the
15521
+ * notification-output `ConfigSchemaPassthrough` precedent at
15522
+ * notification-output.cap.ts:151); the exported TS type re-tightens it. */
15523
+ var ConfigSchemaPassthrough = unknown();
15524
+ var LlmProfileKindDescriptorSchema = object({
15525
+ kind: LlmProfileKindSchema,
15526
+ label: string(),
15527
+ icon: string(),
15528
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
15529
+ addonId: string(),
15530
+ configSchema: ConfigSchemaPassthrough
15531
+ });
15532
+ var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
15533
+ var LlmDefaultSchema = object({
15534
+ selector: LlmDefaultSelectorSchema,
15535
+ profileId: string()
15536
+ });
15537
+ /** Server-side rollup row — getUsage never dumps raw call rows (spec §6). */
15538
+ var LlmUsageRollupSchema = object({
15539
+ day: string(),
15540
+ consumer: string(),
15541
+ profileId: string(),
15542
+ calls: number(),
15543
+ okCalls: number(),
15544
+ errorCalls: number(),
15545
+ inputTokens: number(),
15546
+ outputTokens: number(),
15547
+ avgLatencyMs: number()
15548
+ });
15549
+ /** LLM-facing view over the reused ModelCatalogEntry mechanism (spec §4.2). */
15550
+ var ManagedModelCatalogEntrySchema = object({
15551
+ id: string(),
15552
+ label: string(),
15553
+ family: string(),
15554
+ purpose: _enum(["text", "vision"]),
15555
+ url: string(),
15556
+ sha256: string(),
15557
+ sizeBytes: number(),
15558
+ quantization: string(),
15559
+ /** Load-time guidance shown in the picker. */
15560
+ minRamBytes: number(),
15561
+ contextSizeDefault: number().int(),
15562
+ /** Vision models: companion projector file. */
15563
+ mmprojUrl: string().optional()
15564
+ });
15565
+ var LlmRuntimeNodeSchema = object({
15566
+ nodeId: string(),
15567
+ reachable: boolean(),
15568
+ status: LlmRuntimeStatusSchema.optional(),
15569
+ disk: LlmRuntimeDiskUsageSchema.optional(),
15570
+ error: string().optional()
15571
+ });
15572
+ var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: array(LlmImageSchema).min(1) });
15573
+ var ProfileRefInputSchema = object({
15574
+ addonId: string(),
15575
+ profileId: string()
15576
+ });
15577
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
15578
+ kind: "mutation",
15579
+ auth: "admin"
15580
+ }), method(ProfileRefInputSchema, _void(), {
15581
+ kind: "mutation",
15582
+ auth: "admin"
15583
+ }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
15584
+ kind: "mutation",
15585
+ auth: "admin"
15586
+ }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
15587
+ selector: LlmDefaultSelectorSchema,
15588
+ profileId: string().nullable()
15589
+ }), _void(), {
15590
+ kind: "mutation",
15591
+ auth: "admin"
15592
+ }), method(object({
15593
+ since: number().optional(),
15594
+ until: number().optional(),
15595
+ consumer: string().optional(),
15596
+ profileId: string().optional()
15597
+ }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
15598
+ nodeId: string(),
15599
+ model: ManagedModelRefSchema
15600
+ }), _void(), {
15601
+ kind: "mutation",
15602
+ auth: "admin"
15603
+ }), method(object({
15604
+ nodeId: string(),
15605
+ file: string()
15606
+ }), _void(), {
15607
+ kind: "mutation",
15608
+ auth: "admin"
15609
+ }), method(ProfileRefInputSchema, LlmRuntimeStatusSchema), method(ProfileRefInputSchema, LlmRuntimeStatusSchema, {
15610
+ kind: "mutation",
15611
+ auth: "admin"
15612
+ }), method(ProfileRefInputSchema, _void(), {
15613
+ kind: "mutation",
15614
+ auth: "admin"
15615
+ });
15616
+ /**
15088
15617
  * Zod schemas for persisted record types.
15089
15618
  *
15090
15619
  * These schemas serve as the single source of truth for types that are
@@ -15300,6 +15829,10 @@ var TrackSchema = object({
15300
15829
  snapshots: array(TrackSnapshotSchema).readonly(),
15301
15830
  /** Deduplicated zones the track has entered at least once. */
15302
15831
  zonesVisited: array(string()).readonly(),
15832
+ /** Deduplicated set of detector classes observed for this track over its
15833
+ * life (a track may be reclassified, e.g. person→vehicle). Absent on
15834
+ * legacy rows written before class accumulation shipped. */
15835
+ classes: array(string()).readonly().optional(),
15303
15836
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15304
15837
  totalDistance: number(),
15305
15838
  state: TrackStateSchema,
@@ -15461,7 +15994,7 @@ var KeyEventSchema = object({
15461
15994
  /** Track lifetime in ms (lastSeen - firstSeen). */
15462
15995
  windowMs: number().optional()
15463
15996
  });
15464
- var TrackedDetectionSchema = object({
15997
+ object({
15465
15998
  trackId: string(),
15466
15999
  className: string(),
15467
16000
  confidence: number(),
@@ -15469,6 +16002,23 @@ var TrackedDetectionSchema = object({
15469
16002
  zones: array(string()).readonly(),
15470
16003
  state: TrackStateSchema
15471
16004
  });
16005
+ var OverlayDetectionSchema = looseObject({
16006
+ id: string(),
16007
+ kind: _enum(["first-level", "detail"]),
16008
+ macroClass: string(),
16009
+ score: number(),
16010
+ bbox: object({
16011
+ x: number(),
16012
+ y: number(),
16013
+ width: number(),
16014
+ height: number()
16015
+ }),
16016
+ labels: array(looseObject({
16017
+ label: string(),
16018
+ score: number()
16019
+ })).readonly(),
16020
+ parentId: string().optional()
16021
+ });
15472
16022
  var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
15473
16023
  var SearchObjectEventsInput = object({
15474
16024
  text: string(),
@@ -15479,6 +16029,20 @@ var SearchObjectEventsInput = object({
15479
16029
  limit: number().default(50),
15480
16030
  minScore: number().min(0).max(1).default(.2)
15481
16031
  });
16032
+ var TrackCascadeCountsSchema = object({
16033
+ /** Persisted track roots deleted (authoritative). */
16034
+ tracks: number().int(),
16035
+ /** Object events removed with their tracks (best-effort; see note above). */
16036
+ events: number().int(),
16037
+ /** Track/face/plate-owned media removed (best-effort). Never identity media. */
16038
+ media: number().int(),
16039
+ /** Unassigned (non-enrolled) face reads removed (best-effort). */
16040
+ faces: number().int(),
16041
+ /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
16042
+ plates: number().int(),
16043
+ /** Per-track CLIP search vectors removed (best-effort). */
16044
+ embeddings: number().int()
16045
+ });
15482
16046
  var pipelineAnalyticsCapability = {
15483
16047
  name: "pipeline-analytics",
15484
16048
  scope: "device",
@@ -15532,12 +16096,14 @@ var pipelineAnalyticsCapability = {
15532
16096
  audio: number().int()
15533
16097
  })).readonly()),
15534
16098
  /**
15535
- * Delete all events (motion + object + audio) for the given device
15536
- * that are older than `cutoffMs` (exclusive), and delete their
15537
- * thumbnails in lockstep. Returns per-kind deleted counts.
15538
- *
15539
- * Called by Phase B3 recorder orchestration to keep event history
15540
- * aligned with available footage.
16099
+ * @deprecated Prefer `pruneTracksBefore` the track is the ROOT of the
16100
+ * analytics model and retention must cascade from it (design §5.1). This
16101
+ * event-only prune leaves orphaned tracks/faces/plates/embeddings behind.
16102
+ * Retained as a compat shim for the Phase-B3 recorder orchestration caller,
16103
+ * which prunes events to keep history aligned with available footage and
16104
+ * reads the per-kind counts. Delete all events (motion + object + audio)
16105
+ * for the given device older than `cutoffMs` (exclusive) + their thumbnails
16106
+ * in lockstep; returns per-kind deleted counts.
15541
16107
  */
15542
16108
  pruneEventsBefore: method(object({
15543
16109
  deviceId: number(),
@@ -15550,6 +16116,55 @@ var pipelineAnalyticsCapability = {
15550
16116
  kind: "mutation",
15551
16117
  auth: "admin"
15552
16118
  }),
16119
+ /**
16120
+ * Track-centric retention entry point (design §5.1). Selects every
16121
+ * persisted track for the device whose `lastSeen < cutoffMs` (paged) and
16122
+ * runs the extensible whole-track deletion cascade (design §3): object
16123
+ * events + their media, track/face/plate-owned media, unassigned face
16124
+ * reads, per-track CLIP embeddings, then the track root LAST. ENROLLED
16125
+ * (assigned) faces/plates and `ownerKind:'identity'` media are exempt —
16126
+ * the durable matching gallery always persists. Fires the per-track
16127
+ * live-state cleanup so a pruned track can't linger in dispatch/overlay
16128
+ * state. Returns per-family deleted counts (`tracks` authoritative).
16129
+ *
16130
+ * Replaces `pruneEventsBefore` as the correct time-based retention prune.
16131
+ */
16132
+ pruneTracksBefore: method(object({
16133
+ deviceId: number(),
16134
+ cutoffMs: number()
16135
+ }), TrackCascadeCountsSchema, {
16136
+ kind: "mutation",
16137
+ auth: "admin"
16138
+ }),
16139
+ /**
16140
+ * Operator "clean slate" for a device (design §5.3): prune EVERY track for
16141
+ * the device via the same cascade as `pruneTracksBefore` with `cutoffMs =
16142
+ * now`. One call per device — no client-side track enumeration. Enrolled
16143
+ * gallery + identity media are exempt (design §4). Returns per-family
16144
+ * deleted counts.
16145
+ */
16146
+ wipeAllAnalytics: method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
16147
+ kind: "mutation",
16148
+ auth: "admin"
16149
+ }),
16150
+ /**
16151
+ * Delete whole tracks (object events) by id for the given device,
16152
+ * cascading their media in lockstep. Returns the number of tracks
16153
+ * actually deleted plus the ids that could not be removed.
16154
+ *
16155
+ * Operator-driven from the DI Events page (batch delete). Routes through
16156
+ * the same widened track-deletion cascade (design §5.2).
16157
+ */
16158
+ deleteTracks: method(object({
16159
+ deviceId: number(),
16160
+ trackIds: array(string()).min(1)
16161
+ }), object({
16162
+ deleted: number().int(),
16163
+ failed: array(string()).readonly()
16164
+ }), {
16165
+ kind: "mutation",
16166
+ auth: "admin"
16167
+ }),
15553
16168
  getEventMedia: method(object({
15554
16169
  eventId: string(),
15555
16170
  kind: MediaFileKindEnum.optional()
@@ -15567,17 +16182,19 @@ var pipelineAnalyticsCapability = {
15567
16182
  },
15568
16183
  events: {
15569
16184
  /**
15570
- * Enriched frame emitted after refinement. Carries lightweight
15571
- * tracked-detection metadata (track id, class, zones, state) so
15572
- * downstream consumers (stream overlays, notifications) can
15573
- * annotate without querying full Track state.
16185
+ * Enriched frame emitted after refinement the live-overlay source of
16186
+ * truth (two-plane re-injection). Carries the frame's detections in the
16187
+ * `ObjectDetection` wire shape: first-level roots (with track info +
16188
+ * enrichment labels) plus synthesized `kind:'detail'` face/plate entries
16189
+ * re-projected from per-track detail state, so stream overlays render
16190
+ * boxes + recognized names without querying full Track state.
15574
16191
  */
15575
16192
  onFrameTracked: { data: object({
15576
16193
  deviceId: number(),
15577
16194
  timestamp: number(),
15578
16195
  frameWidth: number(),
15579
16196
  frameHeight: number(),
15580
- detections: array(TrackedDetectionSchema).readonly()
16197
+ detections: array(OverlayDetectionSchema).readonly()
15581
16198
  }) },
15582
16199
  /** Track entered active state (first-seen). */
15583
16200
  onTrackStarted: { data: object({
@@ -18390,17 +19007,45 @@ DeviceType.Camera, method(object({
18390
19007
  deviceId: number(),
18391
19008
  status: OsdStatusSchema
18392
19009
  });
18393
- var PlateInfoSchema = object({
18394
- plateId: string(),
18395
- deviceId: number().int(),
18396
- trackId: string(),
18397
- timestamp: number().int(),
18398
- /** Normalized OCR text (upper, no separators), or the human-corrected value. */
18399
- text: string(),
18400
- /** OCR confidence of the stored read (0..1); 1 when manually corrected. */
18401
- score: number(),
18402
- /** True when the text was manually corrected (exempt from retention). */
19010
+ var VehicleSchema = object({
19011
+ id: string(),
19012
+ name: string(),
19013
+ sampleCount: number().int().nonnegative(),
19014
+ coverMediaKey: string().optional(),
19015
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
19016
+ coverBase64: string().optional()
19017
+ });
19018
+ var VehicleSampleInfoSchema = object({
19019
+ id: string(),
19020
+ /** The plate text this sample enrolled (self-labeling — no embedding). */
19021
+ text: string(),
19022
+ /** OCR confidence of the enrolled read (0..1). */
19023
+ score: number(),
19024
+ addedAt: number().int(),
19025
+ deviceId: number().int().optional(),
19026
+ base64: string().optional()
19027
+ });
19028
+ var PlateInfoSchema = object({
19029
+ plateId: string(),
19030
+ deviceId: number().int(),
19031
+ trackId: string(),
19032
+ timestamp: number().int(),
19033
+ /** Normalized OCR text (upper, no separators), or the human-corrected value. */
19034
+ text: string(),
19035
+ /** OCR confidence of the stored read (0..1); 1 when manually corrected. */
19036
+ score: number(),
19037
+ /** True when the text was manually corrected (exempt from retention). */
18403
19038
  corrected: boolean(),
19039
+ /** Recognized vehicle id when a matcher lookup named this read (SQL NULL → absent). */
19040
+ recognizedVehicleId: string().optional(),
19041
+ /** Resolved vehicle name for `recognizedVehicleId` (UI convenience). */
19042
+ vehicleName: string().optional(),
19043
+ /** True once the read was assigned to a vehicle (enrolled as a sample). */
19044
+ assigned: boolean(),
19045
+ /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
19046
+ plateBbox: BoundingBoxSchema.optional(),
19047
+ /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
19048
+ keyFrameMediaKey: string().optional(),
18404
19049
  base64: string().optional()
18405
19050
  });
18406
19051
  var MediaFileLiteSchema = object({
@@ -18462,6 +19107,58 @@ var plateGalleryCapability = {
18462
19107
  deletePlate: method(object({ plateId: string() }), _void(), {
18463
19108
  kind: "mutation",
18464
19109
  auth: "admin"
19110
+ }),
19111
+ listVehicles: method(_void(), array(VehicleSchema).readonly()),
19112
+ createVehicle: method(object({ name: string().min(1) }), VehicleSchema, {
19113
+ kind: "mutation",
19114
+ auth: "admin"
19115
+ }),
19116
+ renameVehicle: method(object({
19117
+ id: string(),
19118
+ name: string().min(1)
19119
+ }), _void(), {
19120
+ kind: "mutation",
19121
+ auth: "admin"
19122
+ }),
19123
+ deleteVehicle: method(object({ id: string() }), _void(), {
19124
+ kind: "mutation",
19125
+ auth: "admin"
19126
+ }),
19127
+ listVehicleSamples: method(object({ vehicleId: string() }), array(VehicleSampleInfoSchema).readonly()),
19128
+ removeVehicleSample: method(object({
19129
+ vehicleId: string(),
19130
+ sampleId: string()
19131
+ }), _void(), {
19132
+ kind: "mutation",
19133
+ auth: "admin"
19134
+ }),
19135
+ assignPlate: method(object({
19136
+ plateId: string(),
19137
+ vehicleId: string()
19138
+ }), _void(), {
19139
+ kind: "mutation",
19140
+ auth: "admin"
19141
+ }),
19142
+ unassignPlate: method(object({ plateId: string() }), _void(), {
19143
+ kind: "mutation",
19144
+ auth: "admin"
19145
+ }),
19146
+ assignPlates: method(object({
19147
+ plateIds: array(string()).min(1),
19148
+ vehicleId: string()
19149
+ }), object({
19150
+ assigned: number().int(),
19151
+ failed: array(string()).readonly()
19152
+ }), {
19153
+ kind: "mutation",
19154
+ auth: "admin"
19155
+ }),
19156
+ unassignPlates: method(object({ plateIds: array(string()).min(1) }), object({
19157
+ unassigned: number().int(),
19158
+ failed: array(string()).readonly()
19159
+ }), {
19160
+ kind: "mutation",
19161
+ auth: "admin"
18465
19162
  })
18466
19163
  }
18467
19164
  };
@@ -21009,6 +21706,168 @@ Object.freeze({
21009
21706
  addonId: null,
21010
21707
  access: "create"
21011
21708
  },
21709
+ "llm.deleteModel": {
21710
+ capName: "llm",
21711
+ capScope: "system",
21712
+ addonId: null,
21713
+ access: "delete"
21714
+ },
21715
+ "llm.deleteProfile": {
21716
+ capName: "llm",
21717
+ capScope: "system",
21718
+ addonId: null,
21719
+ access: "delete"
21720
+ },
21721
+ "llm.generate": {
21722
+ capName: "llm",
21723
+ capScope: "system",
21724
+ addonId: null,
21725
+ access: "create"
21726
+ },
21727
+ "llm.generateVision": {
21728
+ capName: "llm",
21729
+ capScope: "system",
21730
+ addonId: null,
21731
+ access: "create"
21732
+ },
21733
+ "llm.getDefaults": {
21734
+ capName: "llm",
21735
+ capScope: "system",
21736
+ addonId: null,
21737
+ access: "view"
21738
+ },
21739
+ "llm.getRuntimeStatus": {
21740
+ capName: "llm",
21741
+ capScope: "system",
21742
+ addonId: null,
21743
+ access: "view"
21744
+ },
21745
+ "llm.getUsage": {
21746
+ capName: "llm",
21747
+ capScope: "system",
21748
+ addonId: null,
21749
+ access: "view"
21750
+ },
21751
+ "llm.installModel": {
21752
+ capName: "llm",
21753
+ capScope: "system",
21754
+ addonId: null,
21755
+ access: "create"
21756
+ },
21757
+ "llm.listModelCatalog": {
21758
+ capName: "llm",
21759
+ capScope: "system",
21760
+ addonId: null,
21761
+ access: "view"
21762
+ },
21763
+ "llm.listModels": {
21764
+ capName: "llm",
21765
+ capScope: "system",
21766
+ addonId: null,
21767
+ access: "view"
21768
+ },
21769
+ "llm.listNodeModels": {
21770
+ capName: "llm",
21771
+ capScope: "system",
21772
+ addonId: null,
21773
+ access: "view"
21774
+ },
21775
+ "llm.listProfileKinds": {
21776
+ capName: "llm",
21777
+ capScope: "system",
21778
+ addonId: null,
21779
+ access: "view"
21780
+ },
21781
+ "llm.listProfiles": {
21782
+ capName: "llm",
21783
+ capScope: "system",
21784
+ addonId: null,
21785
+ access: "view"
21786
+ },
21787
+ "llm.listRuntimeNodes": {
21788
+ capName: "llm",
21789
+ capScope: "system",
21790
+ addonId: null,
21791
+ access: "view"
21792
+ },
21793
+ "llm.setDefault": {
21794
+ capName: "llm",
21795
+ capScope: "system",
21796
+ addonId: null,
21797
+ access: "create"
21798
+ },
21799
+ "llm.startRuntime": {
21800
+ capName: "llm",
21801
+ capScope: "system",
21802
+ addonId: null,
21803
+ access: "create"
21804
+ },
21805
+ "llm.stopRuntime": {
21806
+ capName: "llm",
21807
+ capScope: "system",
21808
+ addonId: null,
21809
+ access: "create"
21810
+ },
21811
+ "llm.testProfile": {
21812
+ capName: "llm",
21813
+ capScope: "system",
21814
+ addonId: null,
21815
+ access: "create"
21816
+ },
21817
+ "llm.upsertProfile": {
21818
+ capName: "llm",
21819
+ capScope: "system",
21820
+ addonId: null,
21821
+ access: "create"
21822
+ },
21823
+ "llmRuntime.complete": {
21824
+ capName: "llm-runtime",
21825
+ capScope: "system",
21826
+ addonId: null,
21827
+ access: "create"
21828
+ },
21829
+ "llmRuntime.deleteModel": {
21830
+ capName: "llm-runtime",
21831
+ capScope: "system",
21832
+ addonId: null,
21833
+ access: "delete"
21834
+ },
21835
+ "llmRuntime.ensureStarted": {
21836
+ capName: "llm-runtime",
21837
+ capScope: "system",
21838
+ addonId: null,
21839
+ access: "create"
21840
+ },
21841
+ "llmRuntime.getDiskUsage": {
21842
+ capName: "llm-runtime",
21843
+ capScope: "system",
21844
+ addonId: null,
21845
+ access: "view"
21846
+ },
21847
+ "llmRuntime.installModel": {
21848
+ capName: "llm-runtime",
21849
+ capScope: "system",
21850
+ addonId: null,
21851
+ access: "create"
21852
+ },
21853
+ "llmRuntime.listLocalModels": {
21854
+ capName: "llm-runtime",
21855
+ capScope: "system",
21856
+ addonId: null,
21857
+ access: "view"
21858
+ },
21859
+ "llmRuntime.status": {
21860
+ capName: "llm-runtime",
21861
+ capScope: "system",
21862
+ addonId: null,
21863
+ access: "view"
21864
+ },
21865
+ "llmRuntime.stop": {
21866
+ capName: "llm-runtime",
21867
+ capScope: "system",
21868
+ addonId: null,
21869
+ access: "create"
21870
+ },
21012
21871
  "localNetwork.getAllowedAddresses": {
21013
21872
  capName: "local-network",
21014
21873
  capScope: "system",
@@ -21639,6 +22498,12 @@ Object.freeze({
21639
22498
  addonId: null,
21640
22499
  access: "delete"
21641
22500
  },
22501
+ "pipelineAnalytics.deleteTracks": {
22502
+ capName: "pipeline-analytics",
22503
+ capScope: "device",
22504
+ addonId: null,
22505
+ access: "delete"
22506
+ },
21642
22507
  "pipelineAnalytics.getActiveTracks": {
21643
22508
  capName: "pipeline-analytics",
21644
22509
  capScope: "device",
@@ -21705,12 +22570,24 @@ Object.freeze({
21705
22570
  addonId: null,
21706
22571
  access: "create"
21707
22572
  },
22573
+ "pipelineAnalytics.pruneTracksBefore": {
22574
+ capName: "pipeline-analytics",
22575
+ capScope: "device",
22576
+ addonId: null,
22577
+ access: "create"
22578
+ },
21708
22579
  "pipelineAnalytics.searchObjectEvents": {
21709
22580
  capName: "pipeline-analytics",
21710
22581
  capScope: "device",
21711
22582
  addonId: null,
21712
22583
  access: "view"
21713
22584
  },
22585
+ "pipelineAnalytics.wipeAllAnalytics": {
22586
+ capName: "pipeline-analytics",
22587
+ capScope: "device",
22588
+ addonId: null,
22589
+ access: "delete"
22590
+ },
21714
22591
  "pipelineExecutor.cacheFrameInPool": {
21715
22592
  capName: "pipeline-executor",
21716
22593
  capScope: "system",
@@ -22209,18 +23086,48 @@ Object.freeze({
22209
23086
  addonId: null,
22210
23087
  access: "create"
22211
23088
  },
23089
+ "pipelineRunner.runDetailSubtree": {
23090
+ capName: "pipeline-runner",
23091
+ capScope: "system",
23092
+ addonId: null,
23093
+ access: "create"
23094
+ },
23095
+ "plateGallery.assignPlate": {
23096
+ capName: "plate-gallery",
23097
+ capScope: "system",
23098
+ addonId: null,
23099
+ access: "create"
23100
+ },
23101
+ "plateGallery.assignPlates": {
23102
+ capName: "plate-gallery",
23103
+ capScope: "system",
23104
+ addonId: null,
23105
+ access: "create"
23106
+ },
22212
23107
  "plateGallery.correctPlateText": {
22213
23108
  capName: "plate-gallery",
22214
23109
  capScope: "system",
22215
23110
  addonId: null,
22216
23111
  access: "create"
22217
23112
  },
23113
+ "plateGallery.createVehicle": {
23114
+ capName: "plate-gallery",
23115
+ capScope: "system",
23116
+ addonId: null,
23117
+ access: "create"
23118
+ },
22218
23119
  "plateGallery.deletePlate": {
22219
23120
  capName: "plate-gallery",
22220
23121
  capScope: "system",
22221
23122
  addonId: null,
22222
23123
  access: "delete"
22223
23124
  },
23125
+ "plateGallery.deleteVehicle": {
23126
+ capName: "plate-gallery",
23127
+ capScope: "system",
23128
+ addonId: null,
23129
+ access: "delete"
23130
+ },
22224
23131
  "plateGallery.getPlateByTrack": {
22225
23132
  capName: "plate-gallery",
22226
23133
  capScope: "system",
@@ -22239,6 +23146,30 @@ Object.freeze({
22239
23146
  addonId: null,
22240
23147
  access: "view"
22241
23148
  },
23149
+ "plateGallery.listVehicles": {
23150
+ capName: "plate-gallery",
23151
+ capScope: "system",
23152
+ addonId: null,
23153
+ access: "view"
23154
+ },
23155
+ "plateGallery.listVehicleSamples": {
23156
+ capName: "plate-gallery",
23157
+ capScope: "system",
23158
+ addonId: null,
23159
+ access: "view"
23160
+ },
23161
+ "plateGallery.removeVehicleSample": {
23162
+ capName: "plate-gallery",
23163
+ capScope: "system",
23164
+ addonId: null,
23165
+ access: "delete"
23166
+ },
23167
+ "plateGallery.renameVehicle": {
23168
+ capName: "plate-gallery",
23169
+ capScope: "system",
23170
+ addonId: null,
23171
+ access: "create"
23172
+ },
22242
23173
  "plateGallery.searchPlates": {
22243
23174
  capName: "plate-gallery",
22244
23175
  capScope: "system",
@@ -22251,6 +23182,18 @@ Object.freeze({
22251
23182
  addonId: null,
22252
23183
  access: "view"
22253
23184
  },
23185
+ "plateGallery.unassignPlate": {
23186
+ capName: "plate-gallery",
23187
+ capScope: "system",
23188
+ addonId: null,
23189
+ access: "create"
23190
+ },
23191
+ "plateGallery.unassignPlates": {
23192
+ capName: "plate-gallery",
23193
+ capScope: "system",
23194
+ addonId: null,
23195
+ access: "create"
23196
+ },
22254
23197
  "platformProbe.getCapabilities": {
22255
23198
  capName: "platform-probe",
22256
23199
  capScope: "system",
@@ -22443,6 +23386,48 @@ Object.freeze({
22443
23386
  addonId: null,
22444
23387
  access: "create"
22445
23388
  },
23389
+ "sceneMonitor.captureReference": {
23390
+ capName: "scene-monitor",
23391
+ capScope: "device",
23392
+ addonId: null,
23393
+ access: "create"
23394
+ },
23395
+ "sceneMonitor.createScene": {
23396
+ capName: "scene-monitor",
23397
+ capScope: "device",
23398
+ addonId: null,
23399
+ access: "create"
23400
+ },
23401
+ "sceneMonitor.deleteReference": {
23402
+ capName: "scene-monitor",
23403
+ capScope: "device",
23404
+ addonId: null,
23405
+ access: "delete"
23406
+ },
23407
+ "sceneMonitor.deleteScene": {
23408
+ capName: "scene-monitor",
23409
+ capScope: "device",
23410
+ addonId: null,
23411
+ access: "delete"
23412
+ },
23413
+ "sceneMonitor.listScenes": {
23414
+ capName: "scene-monitor",
23415
+ capScope: "device",
23416
+ addonId: null,
23417
+ access: "view"
23418
+ },
23419
+ "sceneMonitor.recheckNow": {
23420
+ capName: "scene-monitor",
23421
+ capScope: "device",
23422
+ addonId: null,
23423
+ access: "create"
23424
+ },
23425
+ "sceneMonitor.updateScene": {
23426
+ capName: "scene-monitor",
23427
+ capScope: "device",
23428
+ addonId: null,
23429
+ access: "create"
23430
+ },
22446
23431
  "scriptRunner.run": {
22447
23432
  capName: "script-runner",
22448
23433
  capScope: "device",
@@ -23527,6 +24512,7 @@ Object.freeze({
23527
24512
  Object.freeze({
23528
24513
  "broker": "broker",
23529
24514
  "device-export": "device-export",
24515
+ "llm": "ai",
23530
24516
  "mesh-network": "mesh",
23531
24517
  "mqtt-broker": "broker",
23532
24518
  "network-access": "ingress",
@@ -23589,30 +24575,12 @@ Object.defineProperty(exports, "__toESM", {
23589
24575
  return __toESM;
23590
24576
  }
23591
24577
  });
23592
- Object.defineProperty(exports, "_enum", {
23593
- enumerable: true,
23594
- get: function() {
23595
- return _enum;
23596
- }
23597
- });
23598
24578
  Object.defineProperty(exports, "addonWidgetsSourceCapability", {
23599
24579
  enumerable: true,
23600
24580
  get: function() {
23601
24581
  return addonWidgetsSourceCapability;
23602
24582
  }
23603
24583
  });
23604
- Object.defineProperty(exports, "array", {
23605
- enumerable: true,
23606
- get: function() {
23607
- return array;
23608
- }
23609
- });
23610
- Object.defineProperty(exports, "asJsonObject", {
23611
- enumerable: true,
23612
- get: function() {
23613
- return asJsonObject;
23614
- }
23615
- });
23616
24584
  Object.defineProperty(exports, "audioMetricsCapability", {
23617
24585
  enumerable: true,
23618
24586
  get: function() {
@@ -23703,12 +24671,6 @@ Object.defineProperty(exports, "string", {
23703
24671
  return string;
23704
24672
  }
23705
24673
  });
23706
- Object.defineProperty(exports, "tuple", {
23707
- enumerable: true,
23708
- get: function() {
23709
- return tuple;
23710
- }
23711
- });
23712
24674
  Object.defineProperty(exports, "videoclipsCapability", {
23713
24675
  enumerable: true,
23714
24676
  get: function() {