@camstack/system 1.1.48 → 1.1.50

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 (49) hide show
  1. package/dist/addon-runner.js +15 -3
  2. package/dist/addon-runner.mjs +15 -3
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  15. package/dist/builtins/hub-forwarder/index.js +1 -1
  16. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  17. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  18. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  19. package/dist/builtins/local-network/local-network.addon.js +1 -1
  20. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  21. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  22. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  23. package/dist/builtins/platform-probe/coral-accelerators.d.ts +22 -0
  24. package/dist/builtins/platform-probe/index.js +67 -2
  25. package/dist/builtins/platform-probe/index.mjs +67 -2
  26. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  27. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  28. package/dist/builtins/snapshot/index.js +1 -1
  29. package/dist/builtins/snapshot/index.mjs +1 -1
  30. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  31. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  32. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  33. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  34. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  35. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  36. package/dist/builtins/system-config/system-config.addon.js +1 -1
  37. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  38. package/dist/builtins/winston-logging/index.js +1 -1
  39. package/dist/builtins/winston-logging/index.mjs +1 -1
  40. package/dist/{dist-BMN1IAl3.mjs → dist-CC3E-_3h.mjs} +1235 -55
  41. package/dist/{dist-CiveK-yv.js → dist-CQYo6Zp8.js} +1252 -54
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +6 -3
  44. package/dist/index.mjs +6 -4
  45. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +2 -0
  46. package/dist/kernel/moleculer/child-cap-dispatch.d.ts +12 -0
  47. package/dist/{manifest-python-deps-CWBvn2eF.mjs → manifest-python-deps-DqATCsK0.mjs} +31 -4
  48. package/dist/{manifest-python-deps-DRE97YbS.js → manifest-python-deps-Wy8dNJpr.js} +31 -4
  49. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  let zod = require("zod");
2
- //#region ../types/dist/sleep-Baang_XW.mjs
2
+ //#region ../types/dist/sleep-_sv7WKkq.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -409,10 +409,51 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
409
409
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
410
410
  EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
411
411
  EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
412
+ /**
413
+ * Unified track-lifecycle event: ONE category carrying `phase:
414
+ * 'start' | 'update' | 'end'` with a rich, typed
415
+ * `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
416
+ * `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
417
+ * pair — a consumer subscribes once and branches on `phase`.
418
+ */
419
+ EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
420
+ /**
421
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
422
+ * (`phase:'start'`). Kept as a soft alias — no known subscribers.
423
+ */
412
424
  EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
425
+ /**
426
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
427
+ * (`phase:'end'`). Kept as a soft alias — no known subscribers.
428
+ */
413
429
  EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
414
430
  EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
415
431
  EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
432
+ /**
433
+ * Fired by `addon-post-analysis` when a parked (stationary) object appears
434
+ * (a track was promoted to a stationary-registry entry) or departs (the
435
+ * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
436
+ * the dedicated "Stationary" section — never the live event feed. Payload:
437
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
438
+ */
439
+ EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
440
+ /**
441
+ * Fired by `addon-post-analysis` whenever a gallery face row changes:
442
+ * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
443
+ * `'unassigned'` its identity link changed, `'deleted'` the row was
444
+ * removed. Telemetry semantics (D8): a lost event only delays a refresh,
445
+ * never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
446
+ */
447
+ EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
448
+ /**
449
+ * Fired by `addon-post-analysis` whenever a gallery plate row changes:
450
+ * `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
451
+ * `'assigned'` / `'unassigned'` its vehicle link changed
452
+ * (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
453
+ * semantics (D8): a lost event only delays a refresh, never a correctness
454
+ * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
455
+ */
456
+ EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
416
457
  EventCategory["FrigateLiveEvent"] = "frigate.live-event";
417
458
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
418
459
  /**
@@ -2860,7 +2901,8 @@ var MODEL_FORMATS = [
2860
2901
  "coreml",
2861
2902
  "openvino",
2862
2903
  "tflite",
2863
- "pt"
2904
+ "pt",
2905
+ "gguf"
2864
2906
  ];
2865
2907
  /**
2866
2908
  * Multi-file format payload.
@@ -2904,7 +2946,8 @@ var ModelFormatsSchema = zod.z.object({
2904
2946
  coreml: ModelFormatEntrySchema.optional(),
2905
2947
  openvino: ModelFormatEntrySchema.optional(),
2906
2948
  tflite: ModelFormatEntrySchema.optional(),
2907
- pt: ModelFormatEntrySchema.optional()
2949
+ pt: ModelFormatEntrySchema.optional(),
2950
+ gguf: ModelFormatEntrySchema.optional()
2908
2951
  });
2909
2952
  /**
2910
2953
  * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
@@ -2945,6 +2988,15 @@ var ModelCatalogEntrySchema = zod.z.object({
2945
2988
  width: zod.z.number(),
2946
2989
  height: zod.z.number()
2947
2990
  }),
2991
+ /**
2992
+ * Channel count of the model input tensor. Omit ⇒ 3 (RGB), the default for
2993
+ * every detector / classifier / embedder. Set to 1 for a grayscale CTC text
2994
+ * recognizer (EasyOCR VGG plate-OCR: input `[N,1,H,W]`) so the preprocess
2995
+ * feeds a single-channel, EasyOCR-normalized tensor instead of the default
2996
+ * 3-channel RGB one. Threaded through `PoolModelConfig.inputChannels` to the
2997
+ * Python inference pool.
2998
+ */
2999
+ inputChannels: zod.z.number().int().positive().optional(),
2948
3000
  labels: zod.z.array(LabelDefinitionSchema).readonly(),
2949
3001
  inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
2950
3002
  inputNormalization: zod.z.enum([
@@ -2954,6 +3006,16 @@ var ModelCatalogEntrySchema = zod.z.object({
2954
3006
  ]).optional(),
2955
3007
  preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
2956
3008
  /**
3009
+ * Per-MODEL postprocessor override. Absent ⇒ the step's own
3010
+ * `StepDefinition.postprocessor` applies (the normal case — every model in a
3011
+ * step shares its decode). Set it when a step hosts models with DIFFERENT raw
3012
+ * output layouts under one slot: e.g. object-detection is `'yolo'` by default,
3013
+ * but a Coral SSD MobileNet build emits the `TFLite_Detection_PostProcess`
3014
+ * 4-tensor layout and needs `'ssd'`. Threaded into `PoolModelConfig.postprocessor`
3015
+ * by the engine factory (`modelEntry.postprocessor ?? def.postprocessor`).
3016
+ */
3017
+ postprocessor: zod.z.custom().optional(),
3018
+ /**
2957
3019
  * When true, the executor produces a landmark-aligned crop (similarity warp
2958
3020
  * onto the canonical template) before this step runs, instead of a plain
2959
3021
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -7849,7 +7911,8 @@ var ModelFormatSchema$1 = zod.z.enum([
7849
7911
  "coreml",
7850
7912
  "openvino",
7851
7913
  "tflite",
7852
- "pt"
7914
+ "pt",
7915
+ "gguf"
7853
7916
  ]);
7854
7917
  var PipelineSlotSchema = zod.z.enum([
7855
7918
  "detector",
@@ -7944,7 +8007,8 @@ var EngineProvisioningSchema = zod.z.object({
7944
8007
  runtimeId: zod.z.enum([
7945
8008
  "onnx",
7946
8009
  "openvino",
7947
- "coreml"
8010
+ "coreml",
8011
+ "edgetpu"
7948
8012
  ]).nullable(),
7949
8013
  device: zod.z.string().nullable(),
7950
8014
  state: zod.z.enum([
@@ -9860,6 +9924,167 @@ var ptzAutotrackCapability = {
9860
9924
  runtimeState: PtzAutotrackRuntimeStateSchema
9861
9925
  };
9862
9926
  /**
9927
+ * scene-monitor — device-scoped reference-region state cap. An operator marks
9928
+ * a rect ROI on a camera frame and names one or more states; the engine
9929
+ * (pipeline-analytics, designated post-processing node) reports which state is
9930
+ * active on an ongoing basis. Two operator-selectable check modes share every-
9931
+ * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
9932
+ * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
9933
+ *
9934
+ * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
9935
+ * derives the device-detail contribution; the provider carries NO hand-written
9936
+ * settings-contribution methods. `status.kind:'push'` — the engine pushes on
9937
+ * every hysteresis flip / availability change; consumers never poll.
9938
+ */
9939
+ /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
9940
+ * be added without a wire break (matching falls back to any-condition refs). */
9941
+ var SceneConditionSchema = zod.z.string();
9942
+ /** One captured reference — condition-tagged, model-version-gated. `embedding`
9943
+ * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
9944
+ var SceneReferenceSchema = zod.z.object({
9945
+ embedding: zod.z.array(zod.z.number()),
9946
+ modelId: zod.z.string(),
9947
+ condition: SceneConditionSchema,
9948
+ capturedAt: zod.z.number(),
9949
+ thumbnailMediaId: zod.z.string().optional()
9950
+ });
9951
+ var SceneMonitorStateSchema = zod.z.object({
9952
+ id: zod.z.string(),
9953
+ label: zod.z.string(),
9954
+ references: zod.z.array(SceneReferenceSchema),
9955
+ textPrompts: zod.z.array(zod.z.string()).optional(),
9956
+ referenceCount: zod.z.number(),
9957
+ currentlyMatched: zod.z.boolean()
9958
+ });
9959
+ /** Per-mode comparator params in a discriminated union so an `llm` scene never
9960
+ * carries similarity knobs and vice-versa. */
9961
+ var SceneCheckSchema = zod.z.discriminatedUnion("mode", [zod.z.object({
9962
+ mode: zod.z.literal("similarity"),
9963
+ threshold: zod.z.number().min(0).max(1),
9964
+ hysteresisCount: zod.z.number().int().positive()
9965
+ }), zod.z.object({
9966
+ mode: zod.z.literal("llm"),
9967
+ prompt: zod.z.string(),
9968
+ profileId: zod.z.string().optional(),
9969
+ hysteresisCount: zod.z.number().int().positive()
9970
+ })]);
9971
+ var SceneMonitorSchema = zod.z.object({
9972
+ id: zod.z.string(),
9973
+ label: zod.z.string(),
9974
+ roi: MaskRectShapeSchema,
9975
+ enabled: zod.z.boolean(),
9976
+ triggerMode: zod.z.enum([
9977
+ "periodic",
9978
+ "on-motion",
9979
+ "both"
9980
+ ]),
9981
+ checkIntervalSec: zod.z.number().optional(),
9982
+ check: SceneCheckSchema,
9983
+ states: zod.z.array(SceneMonitorStateSchema),
9984
+ currentStateId: zod.z.string().nullable(),
9985
+ lastCheckedAt: zod.z.number().nullable(),
9986
+ lastConfidence: zod.z.number().nullable(),
9987
+ currentCondition: SceneConditionSchema.nullable(),
9988
+ availability: zod.z.enum(["ok", "unavailable"]),
9989
+ unavailableReason: zod.z.string().nullable()
9990
+ });
9991
+ var SceneMonitorStatusSchema = zod.z.object({
9992
+ monitors: zod.z.array(SceneMonitorSchema),
9993
+ lastFetchedAt: zod.z.number()
9994
+ });
9995
+ var sceneMonitorCapability = {
9996
+ name: "scene-monitor",
9997
+ scope: "device",
9998
+ mode: "singleton",
9999
+ kind: "wrapper",
10000
+ defaultActive: true,
10001
+ deviceTypes: [DeviceType.Camera],
10002
+ deviceConfig: { ui: {
10003
+ kind: "widget",
10004
+ widgetId: "host/scene-monitor-editor",
10005
+ tab: "scenes",
10006
+ label: "Scenes"
10007
+ } },
10008
+ methods: {
10009
+ listScenes: method(zod.z.object({ deviceId: zod.z.number() }), SceneMonitorStatusSchema),
10010
+ createScene: method(zod.z.object({
10011
+ deviceId: zod.z.number(),
10012
+ label: zod.z.string(),
10013
+ roi: MaskRectShapeSchema,
10014
+ check: SceneCheckSchema,
10015
+ triggerMode: zod.z.enum([
10016
+ "periodic",
10017
+ "on-motion",
10018
+ "both"
10019
+ ]).optional(),
10020
+ checkIntervalSec: zod.z.number().optional()
10021
+ }), SceneMonitorSchema, {
10022
+ kind: "mutation",
10023
+ auth: "admin"
10024
+ }),
10025
+ updateScene: method(zod.z.object({
10026
+ deviceId: zod.z.number(),
10027
+ monitorId: zod.z.string(),
10028
+ patch: zod.z.object({
10029
+ label: zod.z.string().optional(),
10030
+ roi: MaskRectShapeSchema.optional(),
10031
+ enabled: zod.z.boolean().optional(),
10032
+ triggerMode: zod.z.enum([
10033
+ "periodic",
10034
+ "on-motion",
10035
+ "both"
10036
+ ]).optional(),
10037
+ checkIntervalSec: zod.z.number().optional(),
10038
+ check: SceneCheckSchema.optional()
10039
+ })
10040
+ }), zod.z.void(), {
10041
+ kind: "mutation",
10042
+ auth: "admin"
10043
+ }),
10044
+ deleteScene: method(zod.z.object({
10045
+ deviceId: zod.z.number(),
10046
+ monitorId: zod.z.string()
10047
+ }), zod.z.void(), {
10048
+ kind: "mutation",
10049
+ auth: "admin"
10050
+ }),
10051
+ captureReference: method(zod.z.object({
10052
+ deviceId: zod.z.number(),
10053
+ monitorId: zod.z.string(),
10054
+ stateId: zod.z.string().optional(),
10055
+ label: zod.z.string().optional(),
10056
+ condition: SceneConditionSchema.optional()
10057
+ }), zod.z.object({
10058
+ stateId: zod.z.string(),
10059
+ referenceCount: zod.z.number()
10060
+ }), {
10061
+ kind: "mutation",
10062
+ auth: "admin"
10063
+ }),
10064
+ deleteReference: method(zod.z.object({
10065
+ deviceId: zod.z.number(),
10066
+ monitorId: zod.z.string(),
10067
+ stateId: zod.z.string(),
10068
+ index: zod.z.number()
10069
+ }), zod.z.void(), {
10070
+ kind: "mutation",
10071
+ auth: "admin"
10072
+ }),
10073
+ recheckNow: method(zod.z.object({
10074
+ deviceId: zod.z.number(),
10075
+ monitorId: zod.z.string()
10076
+ }), zod.z.void(), {
10077
+ kind: "mutation",
10078
+ auth: "admin"
10079
+ })
10080
+ },
10081
+ status: {
10082
+ schema: SceneMonitorStatusSchema,
10083
+ kind: "push"
10084
+ },
10085
+ runtimeState: SceneMonitorStatusSchema
10086
+ };
10087
+ /**
9863
10088
  * Script-runner cap. Models HA `script.*` entities on
9864
10089
  * `DeviceType.Script`. A Script is a pre-recorded action sequence
9865
10090
  * that can be invoked imperatively — optionally with a variables
@@ -10609,6 +10834,36 @@ var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
10609
10834
  * with the per-track detail panel and live overlay. */
10610
10835
  trackIds: zod.z.array(zod.z.string()).readonly()
10611
10836
  });
10837
+ /**
10838
+ * A parked ("stationary") object surfaced alongside occupancy — an object that
10839
+ * settled and stopped moving. It is NO LONGER a tracked object (the tracker was
10840
+ * told to forget it so it stops re-spawning tracks/events), but it IS still
10841
+ * physically present, so it keeps counting toward `frame` occupancy and is
10842
+ * listed here so the UI can show it in a dedicated "Stationary" section instead
10843
+ * of flooding the live event feed.
10844
+ */
10845
+ var StationaryObjectSchema = zod.z.object({
10846
+ id: zod.z.string(),
10847
+ className: zod.z.string(),
10848
+ bbox: zod.z.object({
10849
+ x: zod.z.number(),
10850
+ y: zod.z.number(),
10851
+ w: zod.z.number(),
10852
+ h: zod.z.number()
10853
+ }),
10854
+ frameWidth: zod.z.number().int().nonnegative(),
10855
+ frameHeight: zod.z.number().int().nonnegative(),
10856
+ /** When the source track was first seen. */
10857
+ firstSeenAt: zod.z.number().int(),
10858
+ /** When the object was recognised as parked (promotion time). */
10859
+ becameStationaryAt: zod.z.number().int(),
10860
+ /** Last frame a detection confirmed the object is still there. */
10861
+ lastConfirmedAt: zod.z.number().int(),
10862
+ /** Enrichment label carried from the source track (identity / plate). */
10863
+ label: zod.z.string().optional(),
10864
+ /** Native-resolution key-frame media key for the parked object's best image. */
10865
+ keyFrameMediaKey: zod.z.string().optional()
10866
+ });
10612
10867
  var CameraOccupancySnapshotSchema = zod.z.object({
10613
10868
  /** Frame timestamp of the inference result that produced this snapshot. */
10614
10869
  ts: zod.z.number().int(),
@@ -10617,10 +10872,15 @@ var CameraOccupancySnapshotSchema = zod.z.object({
10617
10872
  frameHeight: zod.z.number().int().nonnegative(),
10618
10873
  /** Per-zone breakdown — one entry per defined zone (user + onboard). */
10619
10874
  zones: zod.z.array(ZoneScopeBreakdownSchema).readonly(),
10620
- /** Frame-wide aggregate (everywhere, regardless of zone membership). */
10875
+ /** Frame-wide aggregate (everywhere, regardless of zone membership).
10876
+ * INCLUDES currently-confirmed stationary objects (they are still present). */
10621
10877
  frame: PerScopeBreakdownSchema,
10622
10878
  /** Detections that landed outside every zone. Empty when no zones defined. */
10623
- unzoned: PerScopeBreakdownSchema
10879
+ unzoned: PerScopeBreakdownSchema,
10880
+ /** Parked objects on this camera (additive — absent on legacy snapshots).
10881
+ * Surfaced separately so the UI shows them in a dedicated section rather
10882
+ * than as repeated tracks/events. */
10883
+ stationaryObjects: zod.z.array(StationaryObjectSchema).readonly().optional()
10624
10884
  });
10625
10885
  /**
10626
10886
  * Time-series resolution. The history methods return one bucket per
@@ -11560,7 +11820,12 @@ var NotificationRuleConditionsSchema = zod.z.object({
11560
11820
  clipDescription: zod.z.object({
11561
11821
  text: zod.z.string().min(1),
11562
11822
  minSimilarity: zod.z.number().min(0).max(1)
11563
- }).optional()
11823
+ }).optional(),
11824
+ /** Match events whose recognized-entity label (face identity name or plate
11825
+ * vehicle name, propagated onto `event.data.label`) is one of these values.
11826
+ * Empty/absent → unaffected (back-compat). Enables "notify me when <named
11827
+ * vehicle/person> is seen". */
11828
+ labels: zod.z.array(zod.z.string()).readonly().optional()
11564
11829
  });
11565
11830
  var NotificationRuleTemplateSchema = zod.z.object({
11566
11831
  title: zod.z.string(),
@@ -11944,11 +12209,19 @@ var authProviderCapability = {
11944
12209
  * login page needs NO change.
11945
12210
  *
11946
12211
  * - `widget` — a Module-Federation widget the login page mounts (via
11947
- * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
11948
- * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
11949
- * addon bundle. The referenced widget also declares `preAuth: true` in
11950
- * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
11951
- * stamps a public `bundleUrl` from `addonId` + `bundle`.
12212
+ * `loadRemoteBundle`) for an in-page ceremony. `auth.listLoginMethods`
12213
+ * stamps a public `bundleUrl` from `addonId` + `bundle`. Generic
12214
+ * mechanism kept for future use; no shipped addon uses it on the login
12215
+ * page (the passkey ceremony below runs natively in the shell instead).
12216
+ *
12217
+ * - `passkey` — a declarative WebAuthn ceremony the shell renders
12218
+ * natively (`@simplewebauthn/browser` lives in `addon-admin-ui`, not in
12219
+ * a remotely-loaded bundle). Carries the addon's effective `rpId` /
12220
+ * `origin` (from its `resolveRpID()` / `resolveOrigin()`) so the shell
12221
+ * can gate visibility (IP-literal origin, hostname/rpId mismatch) WITHOUT
12222
+ * fetching any remote code pre-auth. Contribution stays unconditional —
12223
+ * enrollment state is never leaked pre-auth; visibility is a shell
12224
+ * decision.
11952
12225
  *
11953
12226
  * Every contribution carries a `stage`:
11954
12227
  * - `primary` — shown on the first credentials screen (OIDC /
@@ -11997,8 +12270,30 @@ var WidgetLoginMethodSchema = zod.z.object({
11997
12270
  remote: WidgetRemoteSchema,
11998
12271
  stage: LoginStageEnum
11999
12272
  });
12000
- /** One login-method contribution — redirect button OR pre-auth widget. */
12001
- var LoginMethodContributionSchema = zod.z.discriminatedUnion("kind", [RedirectLoginMethodSchema, WidgetLoginMethodSchema]);
12273
+ /**
12274
+ * A declarative WebAuthn ceremony the shell renders natively (no remote
12275
+ * code). Carries the addon's EFFECTIVE `rpId`/`origin` so the shell can
12276
+ * gate visibility (IP-literal origin, hostname/rpId mismatch) before ever
12277
+ * showing the button — the contribution itself stays unconditional.
12278
+ */
12279
+ var PasskeyLoginMethodSchema = zod.z.object({
12280
+ kind: zod.z.literal("passkey"),
12281
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-direct-login`). */
12282
+ id: zod.z.string(),
12283
+ /** Operator-facing button label. */
12284
+ label: zod.z.string(),
12285
+ stage: LoginStageEnum,
12286
+ /** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
12287
+ rpId: zod.z.string(),
12288
+ /** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
12289
+ origin: zod.z.string().nullable()
12290
+ });
12291
+ /** One login-method contribution — redirect button, pre-auth widget, or native passkey ceremony. */
12292
+ var LoginMethodContributionSchema = zod.z.discriminatedUnion("kind", [
12293
+ RedirectLoginMethodSchema,
12294
+ WidgetLoginMethodSchema,
12295
+ PasskeyLoginMethodSchema
12296
+ ]);
12002
12297
  var loginMethodCapability = {
12003
12298
  name: "login-method",
12004
12299
  scope: "system",
@@ -12514,18 +12809,6 @@ var cameraPipelineConfigCapability = {
12514
12809
  exposesDeviceSettings: true,
12515
12810
  methods: {}
12516
12811
  };
12517
- /**
12518
- * Shared cap-router predicates — the SINGLE source for the structural Zod-shape
12519
- * checks + naming used by BOTH the runtime cap-router builder
12520
- * (`@camstack/system` `cap-router-builder.ts` + the server's
12521
- * `cap-router-runtime.ts`) AND the codegen scripts (`scripts/generate-cap-*.ts`).
12522
- *
12523
- * These used to be independently reimplemented on each side, held in sync only
12524
- * by "must stay byte-identical" comments — a live drift risk. Consolidating them
12525
- * here (next to `resolveCapMount` / `expandCapMethods`, the other shared model)
12526
- * makes the two paths provably agree. Each predicate accepts both Zod 4
12527
- * (`_def.type`) and legacy Zod 3 (`_def.typeName` / `constructor.name`) shapes.
12528
- */
12529
12812
  /** `z.void()` — input carries no data. */
12530
12813
  function isVoidInput(schema) {
12531
12814
  const def = schema._def;
@@ -12553,6 +12836,26 @@ function isArrayOutputSchema(schema) {
12553
12836
  return false;
12554
12837
  }
12555
12838
  /**
12839
+ * True when `method` on cap `def` is a COLLECTION cap's array-returning
12840
+ * (non-subscription) method — the methods whose contract is "union the result
12841
+ * across every registered provider" (`listTargets`, `listTargetKinds`,
12842
+ * `discoverTargets`, `listEndpoints`, …).
12843
+ *
12844
+ * Such a method is aggregated at the hub via `concatCollection` / the runtime
12845
+ * `concatArrayMethod`, both of which SKIP a provider that doesn't implement it
12846
+ * (contributes `[]`). That local skip is invisible across the UDS boundary — a
12847
+ * hub-side per-provider proxy fabricates a callable for every property, so the
12848
+ * call reaches the child's real (possibly partial) provider. This predicate lets
12849
+ * the child-side dispatcher reproduce the same graceful skip: a missing method
12850
+ * here yields `[]`, not a "method not found" error. Singleton caps and non-array
12851
+ * methods return `false` so a genuinely missing method still surfaces as a bug.
12852
+ */
12853
+ function isCollectionArrayMethod(def, method) {
12854
+ if (def === void 0 || def.mode !== "collection") return false;
12855
+ const m = expandCapMethods(def)[method];
12856
+ return m !== void 0 && m.kind !== "subscription" && isArrayOutputSchema(m.output);
12857
+ }
12858
+ /**
12556
12859
  * Apply `.loose()` to an object input schema when available (Zod 4) so the
12557
12860
  * router accepts the out-of-band `nodeId`/`addonId` selector keys without
12558
12861
  * stripping them. Falls back to the schema unchanged when `.loose()` is absent.
@@ -12561,6 +12864,64 @@ function looseSchema(schema) {
12561
12864
  const loose = schema.loose;
12562
12865
  return typeof loose === "function" ? loose.call(schema) : schema;
12563
12866
  }
12867
+ /**
12868
+ * Derive a COLLECTION-cap routing `addonId` from a NON-array mutation input
12869
+ * when the caller did NOT supply the top-level `{ addonId }` selector.
12870
+ *
12871
+ * Background: a `scope:'system', mode:'collection'` cap fans its ARRAY methods
12872
+ * (`listTargets`, `listTargetKinds`, …) across every provider, but routes each
12873
+ * single-object method (`send` / CRUD) to ONE provider. The runtime router
12874
+ * strips a TOP-LEVEL `addonId` selector and routes it via
12875
+ * `getProviderByAddonId`; absent that selector it falls through to the FIRST
12876
+ * registered provider — which misroutes (or hard-crashes on a partial provider)
12877
+ * when the target is owned by a DIFFERENT provider. See
12878
+ * `notification-output.cap.ts` (`Target.addonId` / `TargetKind.addonId` are
12879
+ * "stamped by each provider so the concat-fanned catalog stays routable").
12880
+ *
12881
+ * That routing `addonId` is ALREADY carried inside the mutation payload the
12882
+ * caller sends — e.g. `upsertTarget({ target: { …, addonId } })`. This helper
12883
+ * recovers it: it scans the input's DIRECT child object properties (bounded to
12884
+ * one level, first match wins) for a string `addonId`. Mirrors the child-side
12885
+ * `extractArgsAddonId` fallback in `child-cap-dispatch.ts`, which reads a
12886
+ * top-level `addonId` off the raw args; this covers the one-level-nested case
12887
+ * the top-level scan misses.
12888
+ *
12889
+ * Only used for non-array collection methods (array fan-out is never rerouted),
12890
+ * so it can never collapse a catalog aggregation onto a single provider. `null`
12891
+ * / non-object inputs yield `undefined` (fall back to the first provider,
12892
+ * preserving single-provider and id-only-payload back-compat).
12893
+ */
12894
+ function extractNestedAddonId(input) {
12895
+ if (input === null || typeof input !== "object") return void 0;
12896
+ for (const value of Object.values(input)) if (value !== null && typeof value === "object") {
12897
+ const nested = value.addonId;
12898
+ if (typeof nested === "string") return nested;
12899
+ }
12900
+ }
12901
+ /**
12902
+ * True when an OBJECT input schema declares a top-level `addonId` field.
12903
+ *
12904
+ * Such a cap method routes explicitly via the top-level `{ addonId }` selector
12905
+ * (the `llm.generate` / `deleteProfile` posture). The runtime router therefore
12906
+ * MUST NOT also fall back to {@link extractNestedAddonId} for it — that would
12907
+ * let an incidental nested `addonId` (e.g. a key inside a free-form `jsonSchema`
12908
+ * record) hijack routing. Nested recovery is reserved for methods whose input
12909
+ * carries NO top-level selector but embeds the owning `addonId` inside a domain
12910
+ * entity (`upsertTarget({ target: { addonId } })`, `upsertProfile({ profile })`).
12911
+ *
12912
+ * Accepts both Zod 4 (`.shape` / `_def.shape`) and legacy shapes; returns false
12913
+ * for non-object schemas.
12914
+ */
12915
+ function objectInputDeclaresAddonId(schema) {
12916
+ if (schema === null || typeof schema !== "object" && typeof schema !== "function") return false;
12917
+ const direct = schema.shape;
12918
+ const shape = direct !== void 0 && direct !== null ? direct : resolveDefShape(schema._def?.shape);
12919
+ return shape !== void 0 && shape !== null && typeof shape === "object" && Object.prototype.hasOwnProperty.call(shape, "addonId");
12920
+ }
12921
+ /** `_def.shape` may be a thunk (Zod defers object-shape evaluation) or a plain record. */
12922
+ function resolveDefShape(defShape) {
12923
+ return typeof defShape === "function" ? defShape() : defShape;
12924
+ }
12564
12925
  /** Auth level → base-procedure key. `superAdmin` collapses to `admin`. */
12565
12926
  function procedureAuthKey(auth) {
12566
12927
  if (auth === "public") return "public";
@@ -14671,14 +15032,14 @@ var TargetKindCapsSchema = zod.z.object({
14671
15032
  * the union is large and not meant for runtime validation here; the exported
14672
15033
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
14673
15034
  */
14674
- var ConfigSchemaPassthrough = zod.z.unknown();
15035
+ var ConfigSchemaPassthrough$1 = zod.z.unknown();
14675
15036
  var TargetKindSchema = zod.z.object({
14676
15037
  kind: zod.z.string(),
14677
15038
  label: zod.z.string(),
14678
15039
  icon: zod.z.string(),
14679
15040
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
14680
15041
  addonId: zod.z.string(),
14681
- configSchema: ConfigSchemaPassthrough,
15042
+ configSchema: ConfigSchemaPassthrough$1,
14682
15043
  supportsDiscovery: zod.z.boolean(),
14683
15044
  caps: TargetKindCapsSchema
14684
15045
  });
@@ -14745,6 +15106,345 @@ var notificationOutputCapability = {
14745
15106
  }
14746
15107
  };
14747
15108
  /**
15109
+ * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
15110
+ * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
15111
+ * caps stay wire-compatible without a circular cap→cap import.
15112
+ *
15113
+ * Errors are a discriminated-union RESULT, never thrown: the shape survives
15114
+ * every transport tier structurally, and failed calls still write usage rows.
15115
+ * Token counts only in v1 — no costUsd (operator decision, 2026-07-15).
15116
+ */
15117
+ var LlmUsageSchema = zod.z.object({
15118
+ inputTokens: zod.z.number(),
15119
+ outputTokens: zod.z.number()
15120
+ });
15121
+ var LlmErrorCodeSchema = zod.z.enum([
15122
+ "timeout",
15123
+ "rate-limited",
15124
+ "auth",
15125
+ "refusal",
15126
+ "bad-request",
15127
+ "unavailable",
15128
+ "no-profile",
15129
+ "budget-exceeded",
15130
+ "adapter-error"
15131
+ ]);
15132
+ var LlmGenerateOkSchema = zod.z.object({
15133
+ ok: zod.z.literal(true),
15134
+ text: zod.z.string(),
15135
+ model: zod.z.string(),
15136
+ usage: LlmUsageSchema,
15137
+ truncated: zod.z.boolean(),
15138
+ latencyMs: zod.z.number()
15139
+ });
15140
+ var LlmGenerateErrSchema = zod.z.object({
15141
+ ok: zod.z.literal(false),
15142
+ code: LlmErrorCodeSchema,
15143
+ message: zod.z.string(),
15144
+ retryAfterMs: zod.z.number().optional()
15145
+ });
15146
+ var LlmGenerateResultSchema = zod.z.discriminatedUnion("ok", [LlmGenerateOkSchema, LlmGenerateErrSchema]);
15147
+ /**
15148
+ * `Uint8Array` is the sanctioned binary convention — superjson + the UDS
15149
+ * MsgPack channel round-trip typed arrays (embedding-encoder.cap.ts:29,
15150
+ * notification-output.cap.ts:27-31 precedents).
15151
+ */
15152
+ var LlmImageSchema = zod.z.object({
15153
+ bytes: zod.z.instanceof(Uint8Array),
15154
+ mimeType: zod.z.string()
15155
+ });
15156
+ var LlmGenerateBaseInputSchema = zod.z.object({
15157
+ /** Collection routing (the notification-output posture). */
15158
+ addonId: zod.z.string().optional(),
15159
+ /** Explicit profile; else the resolution chain (spec §3). */
15160
+ profileId: zod.z.string().optional(),
15161
+ /** MANDATORY usage tag: 'ai-summary', 'notifier-rules', 'adhoc-ui', … */
15162
+ consumer: zod.z.string(),
15163
+ system: zod.z.string().optional(),
15164
+ /** v1: single-turn. `messages[]` is a v2 additive field. */
15165
+ prompt: zod.z.string(),
15166
+ /** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
15167
+ jsonSchema: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
15168
+ /** Per-call override of the profile default. */
15169
+ maxTokens: zod.z.number().int().positive().optional(),
15170
+ temperature: zod.z.number().optional()
15171
+ });
15172
+ /**
15173
+ * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
15174
+ * on EVERY node where `addon-ai` is installed; the hub `llm` provider reaches
15175
+ * a specific node's runtime with `nodePin(profile.runtime.nodeId)` — normal
15176
+ * cap routing, zero bespoke plumbing. `internal: true`: the operator reaches
15177
+ * this only through the `llm` cap's methods.
15178
+ *
15179
+ * One running llama-server child per node in v1 (models are RAM-heavy).
15180
+ * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
15181
+ * watchdog — operator decision #3).
15182
+ */
15183
+ var ManagedModelRefSchema = zod.z.discriminatedUnion("kind", [
15184
+ zod.z.object({
15185
+ kind: zod.z.literal("catalog"),
15186
+ catalogId: zod.z.string()
15187
+ }),
15188
+ zod.z.object({
15189
+ kind: zod.z.literal("url"),
15190
+ url: zod.z.string(),
15191
+ sha256: zod.z.string().optional()
15192
+ }),
15193
+ zod.z.object({
15194
+ kind: zod.z.literal("path"),
15195
+ path: zod.z.string()
15196
+ })
15197
+ ]);
15198
+ var ManagedRuntimeConfigSchema = zod.z.object({
15199
+ /** WHERE the runtime lives — hub or any agent. */
15200
+ nodeId: zod.z.string(),
15201
+ /** Closed for v1; 'ollama' is a v2 candidate. */
15202
+ engine: zod.z.enum(["llama-cpp"]),
15203
+ model: ManagedModelRefSchema,
15204
+ contextSize: zod.z.number().int().default(4096),
15205
+ /** 0 = CPU-only. */
15206
+ gpuLayers: zod.z.number().int().default(0),
15207
+ /** Default: cpus-2, clamped ≥1 (resolved node-side). */
15208
+ threads: zod.z.number().int().optional(),
15209
+ /** Concurrent slots. */
15210
+ parallel: zod.z.number().int().default(1),
15211
+ /** Else lazy: first generate boots it. */
15212
+ autoStart: zod.z.boolean().default(false),
15213
+ /** 0 = never; frees RAM after quiet periods. */
15214
+ idleStopMinutes: zod.z.number().int().default(30)
15215
+ });
15216
+ var LlmRuntimeStatusSchema = zod.z.object({
15217
+ /** Status is ALWAYS node-qualified. */
15218
+ nodeId: zod.z.string(),
15219
+ state: zod.z.enum([
15220
+ "stopped",
15221
+ "downloading",
15222
+ "starting",
15223
+ "ready",
15224
+ "crashed",
15225
+ "failed"
15226
+ ]),
15227
+ pid: zod.z.number().optional(),
15228
+ port: zod.z.number().optional(),
15229
+ modelPath: zod.z.string().optional(),
15230
+ modelId: zod.z.string().optional(),
15231
+ downloadProgress: zod.z.number().min(0).max(1).optional(),
15232
+ lastError: zod.z.string().optional(),
15233
+ crashesInWindow: zod.z.number(),
15234
+ /** Child RSS (sampled best-effort). */
15235
+ memoryBytes: zod.z.number().optional(),
15236
+ vramBytes: zod.z.number().optional()
15237
+ });
15238
+ var LlmNodeModelSchema = zod.z.object({
15239
+ file: zod.z.string(),
15240
+ sizeBytes: zod.z.number(),
15241
+ catalogId: zod.z.string().optional(),
15242
+ installedAt: zod.z.number().optional()
15243
+ });
15244
+ var LlmRuntimeDiskUsageSchema = zod.z.object({
15245
+ nodeId: zod.z.string(),
15246
+ modelsBytes: zod.z.number(),
15247
+ freeBytes: zod.z.number().optional()
15248
+ });
15249
+ var llmRuntimeCapability = {
15250
+ name: "llm-runtime",
15251
+ scope: "system",
15252
+ mode: "singleton",
15253
+ internal: true,
15254
+ methods: {
15255
+ complete: method(LlmGenerateBaseInputSchema.extend({
15256
+ images: zod.z.array(LlmImageSchema).optional(),
15257
+ runtime: ManagedRuntimeConfigSchema,
15258
+ /** The managed profile's timeout, threaded by the hub provider. */
15259
+ timeoutMs: zod.z.number().int().positive().optional()
15260
+ }), LlmGenerateResultSchema, { kind: "mutation" }),
15261
+ ensureStarted: method(zod.z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
15262
+ kind: "mutation",
15263
+ auth: "admin"
15264
+ }),
15265
+ stop: method(zod.z.object({}), zod.z.void(), {
15266
+ kind: "mutation",
15267
+ auth: "admin"
15268
+ }),
15269
+ status: method(zod.z.object({}), LlmRuntimeStatusSchema),
15270
+ installModel: method(zod.z.object({ model: ManagedModelRefSchema }), zod.z.void(), {
15271
+ kind: "mutation",
15272
+ auth: "admin"
15273
+ }),
15274
+ deleteModel: method(zod.z.object({ file: zod.z.string() }), zod.z.void(), {
15275
+ kind: "mutation",
15276
+ auth: "admin"
15277
+ }),
15278
+ listLocalModels: method(zod.z.object({}), zod.z.array(LlmNodeModelSchema)),
15279
+ getDiskUsage: method(zod.z.object({}), LlmRuntimeDiskUsageSchema)
15280
+ }
15281
+ };
15282
+ /**
15283
+ * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
15284
+ * methods concat-fan across providers; single-row methods route to ONE
15285
+ * provider by the `addonId` in the call input (the notification-output
15286
+ * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
15287
+ * (hub-placed); the cap stays open for future providers.
15288
+ *
15289
+ * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
15290
+ * `apiKey` is a password field — providers REDACT it on read and merge on
15291
+ * write; a stored key NEVER round-trips to a client.
15292
+ */
15293
+ var LlmProfileKindSchema = zod.z.enum([
15294
+ "openai-compatible",
15295
+ "openai",
15296
+ "anthropic",
15297
+ "google",
15298
+ "managed-local"
15299
+ ]);
15300
+ var LlmProfileSchema = zod.z.object({
15301
+ id: zod.z.string(),
15302
+ name: zod.z.string(),
15303
+ kind: LlmProfileKindSchema,
15304
+ /** Stamped by the provider — keeps the fanned catalog routable. */
15305
+ addonId: zod.z.string(),
15306
+ enabled: zod.z.boolean(),
15307
+ /** Vendor model id, or the managed runtime's loaded model. */
15308
+ model: zod.z.string(),
15309
+ /** Required for openai-compatible; override for cloud kinds. */
15310
+ baseUrl: zod.z.string().optional(),
15311
+ /** ConfigUISchema type:'password' — never round-trips (spec §5). */
15312
+ apiKey: zod.z.string().optional(),
15313
+ supportsVision: zod.z.boolean(),
15314
+ temperature: zod.z.number().min(0).max(2).optional(),
15315
+ maxTokens: zod.z.number().int().positive().optional(),
15316
+ timeoutMs: zod.z.number().int().positive().default(6e4),
15317
+ extraHeaders: zod.z.record(zod.z.string(), zod.z.string()).optional(),
15318
+ /** kind === 'managed-local' only (spec §4). */
15319
+ runtime: ManagedRuntimeConfigSchema.optional()
15320
+ });
15321
+ /** ConfigUISchema tree passed through untyped on the wire (the
15322
+ * notification-output `ConfigSchemaPassthrough` precedent at
15323
+ * notification-output.cap.ts:151); the exported TS type re-tightens it. */
15324
+ var ConfigSchemaPassthrough = zod.z.unknown();
15325
+ var LlmProfileKindDescriptorSchema = zod.z.object({
15326
+ kind: LlmProfileKindSchema,
15327
+ label: zod.z.string(),
15328
+ icon: zod.z.string(),
15329
+ /** Stamped by each provider so the concat-fanned catalog stays routable. */
15330
+ addonId: zod.z.string(),
15331
+ configSchema: ConfigSchemaPassthrough
15332
+ });
15333
+ var LlmDefaultSelectorSchema = zod.z.union([zod.z.object({ consumer: zod.z.string() }), zod.z.object({ purpose: zod.z.enum(["text", "vision"]) })]);
15334
+ var LlmDefaultSchema = zod.z.object({
15335
+ selector: LlmDefaultSelectorSchema,
15336
+ profileId: zod.z.string()
15337
+ });
15338
+ /** Server-side rollup row — getUsage never dumps raw call rows (spec §6). */
15339
+ var LlmUsageRollupSchema = zod.z.object({
15340
+ day: zod.z.string(),
15341
+ consumer: zod.z.string(),
15342
+ profileId: zod.z.string(),
15343
+ calls: zod.z.number(),
15344
+ okCalls: zod.z.number(),
15345
+ errorCalls: zod.z.number(),
15346
+ inputTokens: zod.z.number(),
15347
+ outputTokens: zod.z.number(),
15348
+ avgLatencyMs: zod.z.number()
15349
+ });
15350
+ /** LLM-facing view over the reused ModelCatalogEntry mechanism (spec §4.2). */
15351
+ var ManagedModelCatalogEntrySchema = zod.z.object({
15352
+ id: zod.z.string(),
15353
+ label: zod.z.string(),
15354
+ family: zod.z.string(),
15355
+ purpose: zod.z.enum(["text", "vision"]),
15356
+ url: zod.z.string(),
15357
+ sha256: zod.z.string(),
15358
+ sizeBytes: zod.z.number(),
15359
+ quantization: zod.z.string(),
15360
+ /** Load-time guidance shown in the picker. */
15361
+ minRamBytes: zod.z.number(),
15362
+ contextSizeDefault: zod.z.number().int(),
15363
+ /** Vision models: companion projector file. */
15364
+ mmprojUrl: zod.z.string().optional()
15365
+ });
15366
+ var LlmRuntimeNodeSchema = zod.z.object({
15367
+ nodeId: zod.z.string(),
15368
+ reachable: zod.z.boolean(),
15369
+ status: LlmRuntimeStatusSchema.optional(),
15370
+ disk: LlmRuntimeDiskUsageSchema.optional(),
15371
+ error: zod.z.string().optional()
15372
+ });
15373
+ var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: zod.z.array(LlmImageSchema).min(1) });
15374
+ var ProfileRefInputSchema = zod.z.object({
15375
+ addonId: zod.z.string(),
15376
+ profileId: zod.z.string()
15377
+ });
15378
+ var llmCapability = {
15379
+ name: "llm",
15380
+ scope: "system",
15381
+ mode: "collection",
15382
+ internal: false,
15383
+ providerKind: "ai",
15384
+ /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
15385
+ nodeIdMode: "data",
15386
+ methods: {
15387
+ generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
15388
+ generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
15389
+ listProfileKinds: method(zod.z.object({}), zod.z.array(LlmProfileKindDescriptorSchema)),
15390
+ listProfiles: method(zod.z.object({}), zod.z.array(LlmProfileSchema)),
15391
+ upsertProfile: method(zod.z.object({ profile: LlmProfileSchema }), LlmProfileSchema, {
15392
+ kind: "mutation",
15393
+ auth: "admin"
15394
+ }),
15395
+ deleteProfile: method(ProfileRefInputSchema, zod.z.void(), {
15396
+ kind: "mutation",
15397
+ auth: "admin"
15398
+ }),
15399
+ testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
15400
+ kind: "mutation",
15401
+ auth: "admin"
15402
+ }),
15403
+ /** Live vendor enumeration (GET /models etc.). */
15404
+ listModels: method(ProfileRefInputSchema, zod.z.array(zod.z.string())),
15405
+ getDefaults: method(zod.z.object({}), zod.z.array(LlmDefaultSchema)),
15406
+ setDefault: method(zod.z.object({
15407
+ selector: LlmDefaultSelectorSchema,
15408
+ profileId: zod.z.string().nullable()
15409
+ }), zod.z.void(), {
15410
+ kind: "mutation",
15411
+ auth: "admin"
15412
+ }),
15413
+ getUsage: method(zod.z.object({
15414
+ since: zod.z.number().optional(),
15415
+ until: zod.z.number().optional(),
15416
+ consumer: zod.z.string().optional(),
15417
+ profileId: zod.z.string().optional()
15418
+ }), zod.z.array(LlmUsageRollupSchema)),
15419
+ listModelCatalog: method(zod.z.object({}), zod.z.array(ManagedModelCatalogEntrySchema)),
15420
+ listRuntimeNodes: method(zod.z.object({}), zod.z.array(LlmRuntimeNodeSchema)),
15421
+ listNodeModels: method(zod.z.object({ nodeId: zod.z.string() }), zod.z.array(LlmNodeModelSchema)),
15422
+ installModel: method(zod.z.object({
15423
+ nodeId: zod.z.string(),
15424
+ model: ManagedModelRefSchema
15425
+ }), zod.z.void(), {
15426
+ kind: "mutation",
15427
+ auth: "admin"
15428
+ }),
15429
+ deleteModel: method(zod.z.object({
15430
+ nodeId: zod.z.string(),
15431
+ file: zod.z.string()
15432
+ }), zod.z.void(), {
15433
+ kind: "mutation",
15434
+ auth: "admin"
15435
+ }),
15436
+ getRuntimeStatus: method(ProfileRefInputSchema, LlmRuntimeStatusSchema),
15437
+ startRuntime: method(ProfileRefInputSchema, LlmRuntimeStatusSchema, {
15438
+ kind: "mutation",
15439
+ auth: "admin"
15440
+ }),
15441
+ stopRuntime: method(ProfileRefInputSchema, zod.z.void(), {
15442
+ kind: "mutation",
15443
+ auth: "admin"
15444
+ })
15445
+ }
15446
+ };
15447
+ /**
14748
15448
  * Zod schemas for persisted record types.
14749
15449
  *
14750
15450
  * These schemas serve as the single source of truth for types that are
@@ -14952,6 +15652,22 @@ var TrackSnapshotSchema = zod.z.object({
14952
15652
  /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
14953
15653
  mediaKey: zod.z.string()
14954
15654
  });
15655
+ /**
15656
+ * One audio-classification label heard on the track's camera while the
15657
+ * track was alive, aggregated per label. An "episode" is one persisted
15658
+ * audio event (the confident-classification path: score ≥ the device's
15659
+ * `classificationMinScore`, class-change-or-heartbeat coalesced) — NOT
15660
+ * one 32 ms inference chunk, so counts stay human-scaled.
15661
+ */
15662
+ var TrackAudioLabelSchema = zod.z.object({
15663
+ label: zod.z.string(),
15664
+ /** Highest classification score observed across the label's episodes. */
15665
+ peakScore: zod.z.number(),
15666
+ /** Number of coalesced audio-event episodes carrying this label. */
15667
+ count: zod.z.number(),
15668
+ firstAt: zod.z.number(),
15669
+ lastAt: zod.z.number()
15670
+ });
14955
15671
  var TrackSchema = zod.z.object({
14956
15672
  trackId: zod.z.string(),
14957
15673
  deviceId: zod.z.number(),
@@ -14966,6 +15682,10 @@ var TrackSchema = zod.z.object({
14966
15682
  snapshots: zod.z.array(TrackSnapshotSchema).readonly(),
14967
15683
  /** Deduplicated zones the track has entered at least once. */
14968
15684
  zonesVisited: zod.z.array(zod.z.string()).readonly(),
15685
+ /** Deduplicated set of detector classes observed for this track over its
15686
+ * life (a track may be reclassified, e.g. person→vehicle). Absent on
15687
+ * legacy rows written before class accumulation shipped. */
15688
+ classes: zod.z.array(zod.z.string()).readonly().optional(),
14969
15689
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
14970
15690
  totalDistance: zod.z.number(),
14971
15691
  state: TrackStateSchema,
@@ -14979,7 +15699,11 @@ var TrackSchema = zod.z.object({
14979
15699
  bestEventId: zod.z.string().optional(),
14980
15700
  /** Tag of the importance sub-signal that dominated the score
14981
15701
  * (identity|dwell|proximity|class|confidence|travel|zone). */
14982
- importanceReason: zod.z.string().optional()
15702
+ importanceReason: zod.z.string().optional(),
15703
+ /** Audio-classification labels heard on the camera during the track's
15704
+ * life (score ≥ device `classificationMinScore`), aggregated per label.
15705
+ * Absent on legacy rows / tracks with no confident audio. */
15706
+ audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional()
14983
15707
  });
14984
15708
  var BaseEventFields = {
14985
15709
  id: zod.z.string(),
@@ -15127,7 +15851,7 @@ var KeyEventSchema = zod.z.object({
15127
15851
  /** Track lifetime in ms (lastSeen - firstSeen). */
15128
15852
  windowMs: zod.z.number().optional()
15129
15853
  });
15130
- var TrackedDetectionSchema = zod.z.object({
15854
+ zod.z.object({
15131
15855
  trackId: zod.z.string(),
15132
15856
  className: zod.z.string(),
15133
15857
  confidence: zod.z.number(),
@@ -15135,6 +15859,23 @@ var TrackedDetectionSchema = zod.z.object({
15135
15859
  zones: zod.z.array(zod.z.string()).readonly(),
15136
15860
  state: TrackStateSchema
15137
15861
  });
15862
+ var OverlayDetectionSchema = zod.z.looseObject({
15863
+ id: zod.z.string(),
15864
+ kind: zod.z.enum(["first-level", "detail"]),
15865
+ macroClass: zod.z.string(),
15866
+ score: zod.z.number(),
15867
+ bbox: zod.z.object({
15868
+ x: zod.z.number(),
15869
+ y: zod.z.number(),
15870
+ width: zod.z.number(),
15871
+ height: zod.z.number()
15872
+ }),
15873
+ labels: zod.z.array(zod.z.looseObject({
15874
+ label: zod.z.string(),
15875
+ score: zod.z.number()
15876
+ })).readonly(),
15877
+ parentId: zod.z.string().optional()
15878
+ });
15138
15879
  var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: zod.z.number() });
15139
15880
  var SearchObjectEventsInput = zod.z.object({
15140
15881
  text: zod.z.string(),
@@ -15145,6 +15886,20 @@ var SearchObjectEventsInput = zod.z.object({
15145
15886
  limit: zod.z.number().default(50),
15146
15887
  minScore: zod.z.number().min(0).max(1).default(.2)
15147
15888
  });
15889
+ var TrackCascadeCountsSchema = zod.z.object({
15890
+ /** Persisted track roots deleted (authoritative). */
15891
+ tracks: zod.z.number().int(),
15892
+ /** Object events removed with their tracks (best-effort; see note above). */
15893
+ events: zod.z.number().int(),
15894
+ /** Track/face/plate-owned media removed (best-effort). Never identity media. */
15895
+ media: zod.z.number().int(),
15896
+ /** Unassigned (non-enrolled) face reads removed (best-effort). */
15897
+ faces: zod.z.number().int(),
15898
+ /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
15899
+ plates: zod.z.number().int(),
15900
+ /** Per-track CLIP search vectors removed (best-effort). */
15901
+ embeddings: zod.z.number().int()
15902
+ });
15148
15903
  var pipelineAnalyticsCapability = {
15149
15904
  name: "pipeline-analytics",
15150
15905
  scope: "device",
@@ -15198,12 +15953,14 @@ var pipelineAnalyticsCapability = {
15198
15953
  audio: zod.z.number().int()
15199
15954
  })).readonly()),
15200
15955
  /**
15201
- * Delete all events (motion + object + audio) for the given device
15202
- * that are older than `cutoffMs` (exclusive), and delete their
15203
- * thumbnails in lockstep. Returns per-kind deleted counts.
15204
- *
15205
- * Called by Phase B3 recorder orchestration to keep event history
15206
- * aligned with available footage.
15956
+ * @deprecated Prefer `pruneTracksBefore` the track is the ROOT of the
15957
+ * analytics model and retention must cascade from it (design §5.1). This
15958
+ * event-only prune leaves orphaned tracks/faces/plates/embeddings behind.
15959
+ * Retained as a compat shim for the Phase-B3 recorder orchestration caller,
15960
+ * which prunes events to keep history aligned with available footage and
15961
+ * reads the per-kind counts. Delete all events (motion + object + audio)
15962
+ * for the given device older than `cutoffMs` (exclusive) + their thumbnails
15963
+ * in lockstep; returns per-kind deleted counts.
15207
15964
  */
15208
15965
  pruneEventsBefore: method(zod.z.object({
15209
15966
  deviceId: zod.z.number(),
@@ -15216,34 +15973,85 @@ var pipelineAnalyticsCapability = {
15216
15973
  kind: "mutation",
15217
15974
  auth: "admin"
15218
15975
  }),
15219
- getEventMedia: method(zod.z.object({
15220
- eventId: zod.z.string(),
15221
- kind: MediaFileKindEnum.optional()
15222
- }), zod.z.array(MediaFileSchema).readonly()),
15223
- getTrackMedia: method(zod.z.object({ trackId: zod.z.string() }), zod.z.array(MediaFileSchema).readonly()),
15224
15976
  /**
15225
- * Search object events by text query using CLIP cosine similarity.
15226
- * Encodes `text` via the `embedding-encoder` cap, queries the
15227
- * `ObjectEmbeddingStore` with optional prefilters, ranks all matching
15228
- * embeddings by cosine similarity, and joins winners to their
15229
- * ObjectEvents by trackId. Returns up to `limit` events scored
15230
- * `minScore`, sorted descending by score.
15977
+ * Track-centric retention entry point (design §5.1). Selects every
15978
+ * persisted track for the device whose `lastSeen < cutoffMs` (paged) and
15979
+ * runs the extensible whole-track deletion cascade (design §3): object
15980
+ * events + their media, track/face/plate-owned media, unassigned face
15981
+ * reads, per-track CLIP embeddings, then the track root LAST. ENROLLED
15982
+ * (assigned) faces/plates and `ownerKind:'identity'` media are exempt
15983
+ * the durable matching gallery always persists. Fires the per-track
15984
+ * live-state cleanup so a pruned track can't linger in dispatch/overlay
15985
+ * state. Returns per-family deleted counts (`tracks` authoritative).
15986
+ *
15987
+ * Replaces `pruneEventsBefore` as the correct time-based retention prune.
15988
+ */
15989
+ pruneTracksBefore: method(zod.z.object({
15990
+ deviceId: zod.z.number(),
15991
+ cutoffMs: zod.z.number()
15992
+ }), TrackCascadeCountsSchema, {
15993
+ kind: "mutation",
15994
+ auth: "admin"
15995
+ }),
15996
+ /**
15997
+ * Operator "clean slate" for a device (design §5.3): prune EVERY track for
15998
+ * the device via the same cascade as `pruneTracksBefore` with `cutoffMs =
15999
+ * now`. One call per device — no client-side track enumeration. Enrolled
16000
+ * gallery + identity media are exempt (design §4). Returns per-family
16001
+ * deleted counts.
16002
+ */
16003
+ wipeAllAnalytics: method(zod.z.object({ deviceId: zod.z.number() }), TrackCascadeCountsSchema, {
16004
+ kind: "mutation",
16005
+ auth: "admin"
16006
+ }),
16007
+ /**
16008
+ * Delete whole tracks (object events) by id for the given device,
16009
+ * cascading their media in lockstep. Returns the number of tracks
16010
+ * actually deleted plus the ids that could not be removed.
16011
+ *
16012
+ * Operator-driven from the DI Events page (batch delete). Routes through
16013
+ * the same widened track-deletion cascade (design §5.2).
16014
+ */
16015
+ deleteTracks: method(zod.z.object({
16016
+ deviceId: zod.z.number(),
16017
+ trackIds: zod.z.array(zod.z.string()).min(1)
16018
+ }), zod.z.object({
16019
+ deleted: zod.z.number().int(),
16020
+ failed: zod.z.array(zod.z.string()).readonly()
16021
+ }), {
16022
+ kind: "mutation",
16023
+ auth: "admin"
16024
+ }),
16025
+ getEventMedia: method(zod.z.object({
16026
+ eventId: zod.z.string(),
16027
+ kind: MediaFileKindEnum.optional()
16028
+ }), zod.z.array(MediaFileSchema).readonly()),
16029
+ getTrackMedia: method(zod.z.object({ trackId: zod.z.string() }), zod.z.array(MediaFileSchema).readonly()),
16030
+ /**
16031
+ * Search object events by text query using CLIP cosine similarity.
16032
+ * Encodes `text` via the `embedding-encoder` cap, queries the
16033
+ * `ObjectEmbeddingStore` with optional prefilters, ranks all matching
16034
+ * embeddings by cosine similarity, and joins winners to their
16035
+ * ObjectEvents by trackId. Returns up to `limit` events scored ≥
16036
+ * `minScore`, sorted descending by score.
15231
16037
  */
15232
16038
  searchObjectEvents: method(SearchObjectEventsInput, zod.z.array(ScoredObjectEventSchema).readonly())
15233
16039
  },
15234
16040
  events: {
15235
16041
  /**
15236
- * Enriched frame emitted after refinement. Carries lightweight
15237
- * tracked-detection metadata (track id, class, zones, state) so
15238
- * downstream consumers (stream overlays, notifications) can
15239
- * annotate without querying full Track state.
16042
+ * Enriched frame emitted after refinement the live-overlay source of
16043
+ * truth (two-plane re-injection). Carries the frame's detections in the
16044
+ * `ObjectDetection` wire shape: first-level roots (with track info +
16045
+ * enrichment labels) plus synthesized `kind:'detail'` face/plate entries
16046
+ * re-projected from per-track detail state, so stream overlays render
16047
+ * boxes + recognized names without querying full Track state.
15240
16048
  */
15241
16049
  onFrameTracked: { data: zod.z.object({
15242
16050
  deviceId: zod.z.number(),
15243
16051
  timestamp: zod.z.number(),
15244
16052
  frameWidth: zod.z.number(),
15245
16053
  frameHeight: zod.z.number(),
15246
- detections: zod.z.array(TrackedDetectionSchema).readonly()
16054
+ detections: zod.z.array(OverlayDetectionSchema).readonly()
15247
16055
  }) },
15248
16056
  /** Track entered active state (first-seen). */
15249
16057
  onTrackStarted: { data: zod.z.object({
@@ -19239,6 +20047,24 @@ setOverlay: method(zod.z.object({
19239
20047
  }
19240
20048
  }] }
19241
20049
  };
20050
+ var VehicleSchema = zod.z.object({
20051
+ id: zod.z.string(),
20052
+ name: zod.z.string(),
20053
+ sampleCount: zod.z.number().int().nonnegative(),
20054
+ coverMediaKey: zod.z.string().optional(),
20055
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
20056
+ coverBase64: zod.z.string().optional()
20057
+ });
20058
+ var VehicleSampleInfoSchema = zod.z.object({
20059
+ id: zod.z.string(),
20060
+ /** The plate text this sample enrolled (self-labeling — no embedding). */
20061
+ text: zod.z.string(),
20062
+ /** OCR confidence of the enrolled read (0..1). */
20063
+ score: zod.z.number(),
20064
+ addedAt: zod.z.number().int(),
20065
+ deviceId: zod.z.number().int().optional(),
20066
+ base64: zod.z.string().optional()
20067
+ });
19242
20068
  var PlateInfoSchema = zod.z.object({
19243
20069
  plateId: zod.z.string(),
19244
20070
  deviceId: zod.z.number().int(),
@@ -19250,6 +20076,16 @@ var PlateInfoSchema = zod.z.object({
19250
20076
  score: zod.z.number(),
19251
20077
  /** True when the text was manually corrected (exempt from retention). */
19252
20078
  corrected: zod.z.boolean(),
20079
+ /** Recognized vehicle id when a matcher lookup named this read (SQL NULL → absent). */
20080
+ recognizedVehicleId: zod.z.string().optional(),
20081
+ /** Resolved vehicle name for `recognizedVehicleId` (UI convenience). */
20082
+ vehicleName: zod.z.string().optional(),
20083
+ /** True once the read was assigned to a vehicle (enrolled as a sample). */
20084
+ assigned: zod.z.boolean(),
20085
+ /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
20086
+ plateBbox: BoundingBoxSchema.optional(),
20087
+ /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
20088
+ keyFrameMediaKey: zod.z.string().optional(),
19253
20089
  base64: zod.z.string().optional()
19254
20090
  });
19255
20091
  var MediaFileLiteSchema = zod.z.object({
@@ -19311,6 +20147,58 @@ var plateGalleryCapability = {
19311
20147
  deletePlate: method(zod.z.object({ plateId: zod.z.string() }), zod.z.void(), {
19312
20148
  kind: "mutation",
19313
20149
  auth: "admin"
20150
+ }),
20151
+ listVehicles: method(zod.z.void(), zod.z.array(VehicleSchema).readonly()),
20152
+ createVehicle: method(zod.z.object({ name: zod.z.string().min(1) }), VehicleSchema, {
20153
+ kind: "mutation",
20154
+ auth: "admin"
20155
+ }),
20156
+ renameVehicle: method(zod.z.object({
20157
+ id: zod.z.string(),
20158
+ name: zod.z.string().min(1)
20159
+ }), zod.z.void(), {
20160
+ kind: "mutation",
20161
+ auth: "admin"
20162
+ }),
20163
+ deleteVehicle: method(zod.z.object({ id: zod.z.string() }), zod.z.void(), {
20164
+ kind: "mutation",
20165
+ auth: "admin"
20166
+ }),
20167
+ listVehicleSamples: method(zod.z.object({ vehicleId: zod.z.string() }), zod.z.array(VehicleSampleInfoSchema).readonly()),
20168
+ removeVehicleSample: method(zod.z.object({
20169
+ vehicleId: zod.z.string(),
20170
+ sampleId: zod.z.string()
20171
+ }), zod.z.void(), {
20172
+ kind: "mutation",
20173
+ auth: "admin"
20174
+ }),
20175
+ assignPlate: method(zod.z.object({
20176
+ plateId: zod.z.string(),
20177
+ vehicleId: zod.z.string()
20178
+ }), zod.z.void(), {
20179
+ kind: "mutation",
20180
+ auth: "admin"
20181
+ }),
20182
+ unassignPlate: method(zod.z.object({ plateId: zod.z.string() }), zod.z.void(), {
20183
+ kind: "mutation",
20184
+ auth: "admin"
20185
+ }),
20186
+ assignPlates: method(zod.z.object({
20187
+ plateIds: zod.z.array(zod.z.string()).min(1),
20188
+ vehicleId: zod.z.string()
20189
+ }), zod.z.object({
20190
+ assigned: zod.z.number().int(),
20191
+ failed: zod.z.array(zod.z.string()).readonly()
20192
+ }), {
20193
+ kind: "mutation",
20194
+ auth: "admin"
20195
+ }),
20196
+ unassignPlates: method(zod.z.object({ plateIds: zod.z.array(zod.z.string()).min(1) }), zod.z.object({
20197
+ unassigned: zod.z.number().int(),
20198
+ failed: zod.z.array(zod.z.string()).readonly()
20199
+ }), {
20200
+ kind: "mutation",
20201
+ auth: "admin"
19314
20202
  })
19315
20203
  }
19316
20204
  };
@@ -19392,6 +20280,10 @@ var GpuInfoSchema = zod.z.object({
19392
20280
  memoryMB: zod.z.number().optional()
19393
20281
  });
19394
20282
  var NpuInfoSchema = zod.z.object({ type: zod.z.enum(["apple-ane", "intel-npu"]) });
20283
+ var CoralInfoSchema = zod.z.object({
20284
+ type: zod.z.literal("coral-edgetpu"),
20285
+ bus: zod.z.string().optional()
20286
+ });
19395
20287
  var HardwareInfoSchema = zod.z.object({
19396
20288
  platform: HardwarePlatformSchema,
19397
20289
  arch: HardwareArchSchema,
@@ -19400,7 +20292,8 @@ var HardwareInfoSchema = zod.z.object({
19400
20292
  totalRAM_MB: zod.z.number(),
19401
20293
  availableRAM_MB: zod.z.number(),
19402
20294
  gpu: GpuInfoSchema.nullable(),
19403
- npu: NpuInfoSchema.nullable()
20295
+ npu: NpuInfoSchema.nullable(),
20296
+ coral: CoralInfoSchema.nullable().optional()
19404
20297
  });
19405
20298
  var PlatformScoreSchema = zod.z.object({
19406
20299
  runtime: zod.z.enum(["node", "python"]),
@@ -20471,6 +21364,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
20471
21364
  integrationsCapability,
20472
21365
  intercomCapability,
20473
21366
  lawnMowerControlCapability,
21367
+ llmCapability,
21368
+ llmRuntimeCapability,
20474
21369
  localNetworkCapability,
20475
21370
  lockControlCapability,
20476
21371
  logDestinationCapability,
@@ -20509,6 +21404,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
20509
21404
  ptzAutotrackCapability,
20510
21405
  rebootCapability,
20511
21406
  recordingCapability,
21407
+ sceneMonitorCapability,
20512
21408
  scriptRunnerCapability,
20513
21409
  serverManagementCapability,
20514
21410
  settingsStoreCapability,
@@ -20603,6 +21499,7 @@ var CAP_NAMES_WITH_STATUS = [
20603
21499
  "ptz",
20604
21500
  "ptz-autotrack",
20605
21501
  "recording",
21502
+ "scene-monitor",
20606
21503
  "script-runner",
20607
21504
  "smoke",
20608
21505
  "snapshot",
@@ -22526,6 +23423,168 @@ var METHOD_ACCESS_MAP = Object.freeze({
22526
23423
  addonId: null,
22527
23424
  access: "create"
22528
23425
  },
23426
+ "llm.deleteModel": {
23427
+ capName: "llm",
23428
+ capScope: "system",
23429
+ addonId: null,
23430
+ access: "delete"
23431
+ },
23432
+ "llm.deleteProfile": {
23433
+ capName: "llm",
23434
+ capScope: "system",
23435
+ addonId: null,
23436
+ access: "delete"
23437
+ },
23438
+ "llm.generate": {
23439
+ capName: "llm",
23440
+ capScope: "system",
23441
+ addonId: null,
23442
+ access: "create"
23443
+ },
23444
+ "llm.generateVision": {
23445
+ capName: "llm",
23446
+ capScope: "system",
23447
+ addonId: null,
23448
+ access: "create"
23449
+ },
23450
+ "llm.getDefaults": {
23451
+ capName: "llm",
23452
+ capScope: "system",
23453
+ addonId: null,
23454
+ access: "view"
23455
+ },
23456
+ "llm.getRuntimeStatus": {
23457
+ capName: "llm",
23458
+ capScope: "system",
23459
+ addonId: null,
23460
+ access: "view"
23461
+ },
23462
+ "llm.getUsage": {
23463
+ capName: "llm",
23464
+ capScope: "system",
23465
+ addonId: null,
23466
+ access: "view"
23467
+ },
23468
+ "llm.installModel": {
23469
+ capName: "llm",
23470
+ capScope: "system",
23471
+ addonId: null,
23472
+ access: "create"
23473
+ },
23474
+ "llm.listModelCatalog": {
23475
+ capName: "llm",
23476
+ capScope: "system",
23477
+ addonId: null,
23478
+ access: "view"
23479
+ },
23480
+ "llm.listModels": {
23481
+ capName: "llm",
23482
+ capScope: "system",
23483
+ addonId: null,
23484
+ access: "view"
23485
+ },
23486
+ "llm.listNodeModels": {
23487
+ capName: "llm",
23488
+ capScope: "system",
23489
+ addonId: null,
23490
+ access: "view"
23491
+ },
23492
+ "llm.listProfileKinds": {
23493
+ capName: "llm",
23494
+ capScope: "system",
23495
+ addonId: null,
23496
+ access: "view"
23497
+ },
23498
+ "llm.listProfiles": {
23499
+ capName: "llm",
23500
+ capScope: "system",
23501
+ addonId: null,
23502
+ access: "view"
23503
+ },
23504
+ "llm.listRuntimeNodes": {
23505
+ capName: "llm",
23506
+ capScope: "system",
23507
+ addonId: null,
23508
+ access: "view"
23509
+ },
23510
+ "llm.setDefault": {
23511
+ capName: "llm",
23512
+ capScope: "system",
23513
+ addonId: null,
23514
+ access: "create"
23515
+ },
23516
+ "llm.startRuntime": {
23517
+ capName: "llm",
23518
+ capScope: "system",
23519
+ addonId: null,
23520
+ access: "create"
23521
+ },
23522
+ "llm.stopRuntime": {
23523
+ capName: "llm",
23524
+ capScope: "system",
23525
+ addonId: null,
23526
+ access: "create"
23527
+ },
23528
+ "llm.testProfile": {
23529
+ capName: "llm",
23530
+ capScope: "system",
23531
+ addonId: null,
23532
+ access: "create"
23533
+ },
23534
+ "llm.upsertProfile": {
23535
+ capName: "llm",
23536
+ capScope: "system",
23537
+ addonId: null,
23538
+ access: "create"
23539
+ },
23540
+ "llmRuntime.complete": {
23541
+ capName: "llm-runtime",
23542
+ capScope: "system",
23543
+ addonId: null,
23544
+ access: "create"
23545
+ },
23546
+ "llmRuntime.deleteModel": {
23547
+ capName: "llm-runtime",
23548
+ capScope: "system",
23549
+ addonId: null,
23550
+ access: "delete"
23551
+ },
23552
+ "llmRuntime.ensureStarted": {
23553
+ capName: "llm-runtime",
23554
+ capScope: "system",
23555
+ addonId: null,
23556
+ access: "create"
23557
+ },
23558
+ "llmRuntime.getDiskUsage": {
23559
+ capName: "llm-runtime",
23560
+ capScope: "system",
23561
+ addonId: null,
23562
+ access: "view"
23563
+ },
23564
+ "llmRuntime.installModel": {
23565
+ capName: "llm-runtime",
23566
+ capScope: "system",
23567
+ addonId: null,
23568
+ access: "create"
23569
+ },
23570
+ "llmRuntime.listLocalModels": {
23571
+ capName: "llm-runtime",
23572
+ capScope: "system",
23573
+ addonId: null,
23574
+ access: "view"
23575
+ },
23576
+ "llmRuntime.status": {
23577
+ capName: "llm-runtime",
23578
+ capScope: "system",
23579
+ addonId: null,
23580
+ access: "view"
23581
+ },
23582
+ "llmRuntime.stop": {
23583
+ capName: "llm-runtime",
23584
+ capScope: "system",
23585
+ addonId: null,
23586
+ access: "create"
23587
+ },
22529
23588
  "localNetwork.getAllowedAddresses": {
22530
23589
  capName: "local-network",
22531
23590
  capScope: "system",
@@ -23156,6 +24215,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23156
24215
  addonId: null,
23157
24216
  access: "delete"
23158
24217
  },
24218
+ "pipelineAnalytics.deleteTracks": {
24219
+ capName: "pipeline-analytics",
24220
+ capScope: "device",
24221
+ addonId: null,
24222
+ access: "delete"
24223
+ },
23159
24224
  "pipelineAnalytics.getActiveTracks": {
23160
24225
  capName: "pipeline-analytics",
23161
24226
  capScope: "device",
@@ -23222,12 +24287,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
23222
24287
  addonId: null,
23223
24288
  access: "create"
23224
24289
  },
24290
+ "pipelineAnalytics.pruneTracksBefore": {
24291
+ capName: "pipeline-analytics",
24292
+ capScope: "device",
24293
+ addonId: null,
24294
+ access: "create"
24295
+ },
23225
24296
  "pipelineAnalytics.searchObjectEvents": {
23226
24297
  capName: "pipeline-analytics",
23227
24298
  capScope: "device",
23228
24299
  addonId: null,
23229
24300
  access: "view"
23230
24301
  },
24302
+ "pipelineAnalytics.wipeAllAnalytics": {
24303
+ capName: "pipeline-analytics",
24304
+ capScope: "device",
24305
+ addonId: null,
24306
+ access: "delete"
24307
+ },
23231
24308
  "pipelineExecutor.cacheFrameInPool": {
23232
24309
  capName: "pipeline-executor",
23233
24310
  capScope: "system",
@@ -23732,18 +24809,42 @@ var METHOD_ACCESS_MAP = Object.freeze({
23732
24809
  addonId: null,
23733
24810
  access: "create"
23734
24811
  },
24812
+ "plateGallery.assignPlate": {
24813
+ capName: "plate-gallery",
24814
+ capScope: "system",
24815
+ addonId: null,
24816
+ access: "create"
24817
+ },
24818
+ "plateGallery.assignPlates": {
24819
+ capName: "plate-gallery",
24820
+ capScope: "system",
24821
+ addonId: null,
24822
+ access: "create"
24823
+ },
23735
24824
  "plateGallery.correctPlateText": {
23736
24825
  capName: "plate-gallery",
23737
24826
  capScope: "system",
23738
24827
  addonId: null,
23739
24828
  access: "create"
23740
24829
  },
24830
+ "plateGallery.createVehicle": {
24831
+ capName: "plate-gallery",
24832
+ capScope: "system",
24833
+ addonId: null,
24834
+ access: "create"
24835
+ },
23741
24836
  "plateGallery.deletePlate": {
23742
24837
  capName: "plate-gallery",
23743
24838
  capScope: "system",
23744
24839
  addonId: null,
23745
24840
  access: "delete"
23746
24841
  },
24842
+ "plateGallery.deleteVehicle": {
24843
+ capName: "plate-gallery",
24844
+ capScope: "system",
24845
+ addonId: null,
24846
+ access: "delete"
24847
+ },
23747
24848
  "plateGallery.getPlateByTrack": {
23748
24849
  capName: "plate-gallery",
23749
24850
  capScope: "system",
@@ -23762,6 +24863,30 @@ var METHOD_ACCESS_MAP = Object.freeze({
23762
24863
  addonId: null,
23763
24864
  access: "view"
23764
24865
  },
24866
+ "plateGallery.listVehicles": {
24867
+ capName: "plate-gallery",
24868
+ capScope: "system",
24869
+ addonId: null,
24870
+ access: "view"
24871
+ },
24872
+ "plateGallery.listVehicleSamples": {
24873
+ capName: "plate-gallery",
24874
+ capScope: "system",
24875
+ addonId: null,
24876
+ access: "view"
24877
+ },
24878
+ "plateGallery.removeVehicleSample": {
24879
+ capName: "plate-gallery",
24880
+ capScope: "system",
24881
+ addonId: null,
24882
+ access: "delete"
24883
+ },
24884
+ "plateGallery.renameVehicle": {
24885
+ capName: "plate-gallery",
24886
+ capScope: "system",
24887
+ addonId: null,
24888
+ access: "create"
24889
+ },
23765
24890
  "plateGallery.searchPlates": {
23766
24891
  capName: "plate-gallery",
23767
24892
  capScope: "system",
@@ -23774,6 +24899,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
23774
24899
  addonId: null,
23775
24900
  access: "view"
23776
24901
  },
24902
+ "plateGallery.unassignPlate": {
24903
+ capName: "plate-gallery",
24904
+ capScope: "system",
24905
+ addonId: null,
24906
+ access: "create"
24907
+ },
24908
+ "plateGallery.unassignPlates": {
24909
+ capName: "plate-gallery",
24910
+ capScope: "system",
24911
+ addonId: null,
24912
+ access: "create"
24913
+ },
23777
24914
  "platformProbe.getCapabilities": {
23778
24915
  capName: "platform-probe",
23779
24916
  capScope: "system",
@@ -23966,6 +25103,48 @@ var METHOD_ACCESS_MAP = Object.freeze({
23966
25103
  addonId: null,
23967
25104
  access: "create"
23968
25105
  },
25106
+ "sceneMonitor.captureReference": {
25107
+ capName: "scene-monitor",
25108
+ capScope: "device",
25109
+ addonId: null,
25110
+ access: "create"
25111
+ },
25112
+ "sceneMonitor.createScene": {
25113
+ capName: "scene-monitor",
25114
+ capScope: "device",
25115
+ addonId: null,
25116
+ access: "create"
25117
+ },
25118
+ "sceneMonitor.deleteReference": {
25119
+ capName: "scene-monitor",
25120
+ capScope: "device",
25121
+ addonId: null,
25122
+ access: "delete"
25123
+ },
25124
+ "sceneMonitor.deleteScene": {
25125
+ capName: "scene-monitor",
25126
+ capScope: "device",
25127
+ addonId: null,
25128
+ access: "delete"
25129
+ },
25130
+ "sceneMonitor.listScenes": {
25131
+ capName: "scene-monitor",
25132
+ capScope: "device",
25133
+ addonId: null,
25134
+ access: "view"
25135
+ },
25136
+ "sceneMonitor.recheckNow": {
25137
+ capName: "scene-monitor",
25138
+ capScope: "device",
25139
+ addonId: null,
25140
+ access: "create"
25141
+ },
25142
+ "sceneMonitor.updateScene": {
25143
+ capName: "scene-monitor",
25144
+ capScope: "device",
25145
+ addonId: null,
25146
+ access: "create"
25147
+ },
23969
25148
  "scriptRunner.run": {
23970
25149
  capName: "script-runner",
23971
25150
  capScope: "device",
@@ -25050,6 +26229,7 @@ var METHOD_ACCESS_MAP = Object.freeze({
25050
26229
  Object.freeze({
25051
26230
  "broker": "broker",
25052
26231
  "device-export": "device-export",
26232
+ "llm": "ai",
25053
26233
  "mesh-network": "mesh",
25054
26234
  "mqtt-broker": "broker",
25055
26235
  "network-access": "ingress",
@@ -25402,6 +26582,12 @@ Object.defineProperty(exports, "expandCapMethods", {
25402
26582
  return expandCapMethods;
25403
26583
  }
25404
26584
  });
26585
+ Object.defineProperty(exports, "extractNestedAddonId", {
26586
+ enumerable: true,
26587
+ get: function() {
26588
+ return extractNestedAddonId;
26589
+ }
26590
+ });
25405
26591
  Object.defineProperty(exports, "filesystemBrowseCapability", {
25406
26592
  enumerable: true,
25407
26593
  get: function() {
@@ -25426,6 +26612,12 @@ Object.defineProperty(exports, "isArrayOutputSchema", {
25426
26612
  return isArrayOutputSchema;
25427
26613
  }
25428
26614
  });
26615
+ Object.defineProperty(exports, "isCollectionArrayMethod", {
26616
+ enumerable: true,
26617
+ get: function() {
26618
+ return isCollectionArrayMethod;
26619
+ }
26620
+ });
25429
26621
  Object.defineProperty(exports, "isDeviceConfigCap", {
25430
26622
  enumerable: true,
25431
26623
  get: function() {
@@ -25492,6 +26684,12 @@ Object.defineProperty(exports, "normalizeUnit", {
25492
26684
  return normalizeUnit;
25493
26685
  }
25494
26686
  });
26687
+ Object.defineProperty(exports, "objectInputDeclaresAddonId", {
26688
+ enumerable: true,
26689
+ get: function() {
26690
+ return objectInputDeclaresAddonId;
26691
+ }
26692
+ });
25495
26693
  Object.defineProperty(exports, "parseJsonObject", {
25496
26694
  enumerable: true,
25497
26695
  get: function() {