@camstack/addon-provider-homeassistant 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +970 -38
- package/dist/addon.mjs +970 -38
- package/package.json +5 -1
package/dist/addon.mjs
CHANGED
|
@@ -4287,6 +4287,14 @@ function object(shape, params) {
|
|
|
4287
4287
|
...normalizeParams(params)
|
|
4288
4288
|
});
|
|
4289
4289
|
}
|
|
4290
|
+
function looseObject(shape, params) {
|
|
4291
|
+
return new ZodObject({
|
|
4292
|
+
type: "object",
|
|
4293
|
+
shape,
|
|
4294
|
+
catchall: unknown(),
|
|
4295
|
+
...normalizeParams(params)
|
|
4296
|
+
});
|
|
4297
|
+
}
|
|
4290
4298
|
var ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
|
|
4291
4299
|
$ZodUnion.init(inst, def);
|
|
4292
4300
|
ZodType.init(inst, def);
|
|
@@ -4628,7 +4636,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4628
4636
|
return inst;
|
|
4629
4637
|
}
|
|
4630
4638
|
//#endregion
|
|
4631
|
-
//#region ../types/dist/sleep-
|
|
4639
|
+
//#region ../types/dist/sleep-DkhOVOjW.mjs
|
|
4632
4640
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4633
4641
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4634
4642
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5038,10 +5046,43 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
5038
5046
|
EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
|
|
5039
5047
|
EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
|
|
5040
5048
|
EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
|
|
5049
|
+
/**
|
|
5050
|
+
* Unified track-lifecycle event: ONE category carrying `phase:
|
|
5051
|
+
* 'start' | 'update' | 'end'` with a rich, typed
|
|
5052
|
+
* `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
|
|
5053
|
+
* `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
|
|
5054
|
+
* pair — a consumer subscribes once and branches on `phase`.
|
|
5055
|
+
*/
|
|
5056
|
+
EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
|
|
5057
|
+
/**
|
|
5058
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
5059
|
+
* (`phase:'start'`). Kept as a soft alias — no known subscribers.
|
|
5060
|
+
*/
|
|
5041
5061
|
EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
|
|
5062
|
+
/**
|
|
5063
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
5064
|
+
* (`phase:'end'`). Kept as a soft alias — no known subscribers.
|
|
5065
|
+
*/
|
|
5042
5066
|
EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
|
|
5043
5067
|
EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
|
|
5044
5068
|
EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
|
|
5069
|
+
/**
|
|
5070
|
+
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
5071
|
+
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
5072
|
+
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
5073
|
+
* removed. Telemetry semantics (D8): a lost event only delays a refresh,
|
|
5074
|
+
* never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
|
|
5075
|
+
*/
|
|
5076
|
+
EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
|
|
5077
|
+
/**
|
|
5078
|
+
* Fired by `addon-post-analysis` whenever a gallery plate row changes:
|
|
5079
|
+
* `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
|
|
5080
|
+
* `'assigned'` / `'unassigned'` its vehicle link changed
|
|
5081
|
+
* (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
|
|
5082
|
+
* semantics (D8): a lost event only delays a refresh, never a correctness
|
|
5083
|
+
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
5084
|
+
*/
|
|
5085
|
+
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
5045
5086
|
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
5046
5087
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
5047
5088
|
/**
|
|
@@ -6886,7 +6927,8 @@ var MODEL_FORMATS = [
|
|
|
6886
6927
|
"coreml",
|
|
6887
6928
|
"openvino",
|
|
6888
6929
|
"tflite",
|
|
6889
|
-
"pt"
|
|
6930
|
+
"pt",
|
|
6931
|
+
"gguf"
|
|
6890
6932
|
];
|
|
6891
6933
|
/**
|
|
6892
6934
|
* Multi-file format payload.
|
|
@@ -6930,7 +6972,8 @@ var ModelFormatsSchema = object({
|
|
|
6930
6972
|
coreml: ModelFormatEntrySchema.optional(),
|
|
6931
6973
|
openvino: ModelFormatEntrySchema.optional(),
|
|
6932
6974
|
tflite: ModelFormatEntrySchema.optional(),
|
|
6933
|
-
pt: ModelFormatEntrySchema.optional()
|
|
6975
|
+
pt: ModelFormatEntrySchema.optional(),
|
|
6976
|
+
gguf: ModelFormatEntrySchema.optional()
|
|
6934
6977
|
});
|
|
6935
6978
|
/**
|
|
6936
6979
|
* Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
|
|
@@ -11924,7 +11967,8 @@ var ModelFormatSchema$1 = _enum([
|
|
|
11924
11967
|
"coreml",
|
|
11925
11968
|
"openvino",
|
|
11926
11969
|
"tflite",
|
|
11927
|
-
"pt"
|
|
11970
|
+
"pt",
|
|
11971
|
+
"gguf"
|
|
11928
11972
|
]);
|
|
11929
11973
|
var PipelineSlotSchema = _enum([
|
|
11930
11974
|
"detector",
|
|
@@ -13659,6 +13703,167 @@ var ptzAutotrackCapability = {
|
|
|
13659
13703
|
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
13660
13704
|
};
|
|
13661
13705
|
/**
|
|
13706
|
+
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
13707
|
+
* a rect ROI on a camera frame and names one or more states; the engine
|
|
13708
|
+
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
13709
|
+
* active on an ongoing basis. Two operator-selectable check modes share every-
|
|
13710
|
+
* thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
|
|
13711
|
+
* vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
|
|
13712
|
+
*
|
|
13713
|
+
* D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
|
|
13714
|
+
* derives the device-detail contribution; the provider carries NO hand-written
|
|
13715
|
+
* settings-contribution methods. `status.kind:'push'` — the engine pushes on
|
|
13716
|
+
* every hysteresis flip / availability change; consumers never poll.
|
|
13717
|
+
*/
|
|
13718
|
+
/** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
|
|
13719
|
+
* be added without a wire break (matching falls back to any-condition refs). */
|
|
13720
|
+
var SceneConditionSchema = string();
|
|
13721
|
+
/** One captured reference — condition-tagged, model-version-gated. `embedding`
|
|
13722
|
+
* is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
|
|
13723
|
+
var SceneReferenceSchema = object({
|
|
13724
|
+
embedding: array(number()),
|
|
13725
|
+
modelId: string(),
|
|
13726
|
+
condition: SceneConditionSchema,
|
|
13727
|
+
capturedAt: number(),
|
|
13728
|
+
thumbnailMediaId: string().optional()
|
|
13729
|
+
});
|
|
13730
|
+
var SceneMonitorStateSchema = object({
|
|
13731
|
+
id: string(),
|
|
13732
|
+
label: string(),
|
|
13733
|
+
references: array(SceneReferenceSchema),
|
|
13734
|
+
textPrompts: array(string()).optional(),
|
|
13735
|
+
referenceCount: number(),
|
|
13736
|
+
currentlyMatched: boolean()
|
|
13737
|
+
});
|
|
13738
|
+
/** Per-mode comparator params in a discriminated union so an `llm` scene never
|
|
13739
|
+
* carries similarity knobs and vice-versa. */
|
|
13740
|
+
var SceneCheckSchema = discriminatedUnion("mode", [object({
|
|
13741
|
+
mode: literal("similarity"),
|
|
13742
|
+
threshold: number().min(0).max(1),
|
|
13743
|
+
hysteresisCount: number().int().positive()
|
|
13744
|
+
}), object({
|
|
13745
|
+
mode: literal("llm"),
|
|
13746
|
+
prompt: string(),
|
|
13747
|
+
profileId: string().optional(),
|
|
13748
|
+
hysteresisCount: number().int().positive()
|
|
13749
|
+
})]);
|
|
13750
|
+
var SceneMonitorSchema = object({
|
|
13751
|
+
id: string(),
|
|
13752
|
+
label: string(),
|
|
13753
|
+
roi: MaskRectShapeSchema,
|
|
13754
|
+
enabled: boolean(),
|
|
13755
|
+
triggerMode: _enum([
|
|
13756
|
+
"periodic",
|
|
13757
|
+
"on-motion",
|
|
13758
|
+
"both"
|
|
13759
|
+
]),
|
|
13760
|
+
checkIntervalSec: number().optional(),
|
|
13761
|
+
check: SceneCheckSchema,
|
|
13762
|
+
states: array(SceneMonitorStateSchema),
|
|
13763
|
+
currentStateId: string().nullable(),
|
|
13764
|
+
lastCheckedAt: number().nullable(),
|
|
13765
|
+
lastConfidence: number().nullable(),
|
|
13766
|
+
currentCondition: SceneConditionSchema.nullable(),
|
|
13767
|
+
availability: _enum(["ok", "unavailable"]),
|
|
13768
|
+
unavailableReason: string().nullable()
|
|
13769
|
+
});
|
|
13770
|
+
var SceneMonitorStatusSchema = object({
|
|
13771
|
+
monitors: array(SceneMonitorSchema),
|
|
13772
|
+
lastFetchedAt: number()
|
|
13773
|
+
});
|
|
13774
|
+
var sceneMonitorCapability = {
|
|
13775
|
+
name: "scene-monitor",
|
|
13776
|
+
scope: "device",
|
|
13777
|
+
mode: "singleton",
|
|
13778
|
+
kind: "wrapper",
|
|
13779
|
+
defaultActive: true,
|
|
13780
|
+
deviceTypes: [DeviceType.Camera],
|
|
13781
|
+
deviceConfig: { ui: {
|
|
13782
|
+
kind: "widget",
|
|
13783
|
+
widgetId: "host/scene-monitor-editor",
|
|
13784
|
+
tab: "scenes",
|
|
13785
|
+
label: "Scenes"
|
|
13786
|
+
} },
|
|
13787
|
+
methods: {
|
|
13788
|
+
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
13789
|
+
createScene: method(object({
|
|
13790
|
+
deviceId: number(),
|
|
13791
|
+
label: string(),
|
|
13792
|
+
roi: MaskRectShapeSchema,
|
|
13793
|
+
check: SceneCheckSchema,
|
|
13794
|
+
triggerMode: _enum([
|
|
13795
|
+
"periodic",
|
|
13796
|
+
"on-motion",
|
|
13797
|
+
"both"
|
|
13798
|
+
]).optional(),
|
|
13799
|
+
checkIntervalSec: number().optional()
|
|
13800
|
+
}), SceneMonitorSchema, {
|
|
13801
|
+
kind: "mutation",
|
|
13802
|
+
auth: "admin"
|
|
13803
|
+
}),
|
|
13804
|
+
updateScene: method(object({
|
|
13805
|
+
deviceId: number(),
|
|
13806
|
+
monitorId: string(),
|
|
13807
|
+
patch: object({
|
|
13808
|
+
label: string().optional(),
|
|
13809
|
+
roi: MaskRectShapeSchema.optional(),
|
|
13810
|
+
enabled: boolean().optional(),
|
|
13811
|
+
triggerMode: _enum([
|
|
13812
|
+
"periodic",
|
|
13813
|
+
"on-motion",
|
|
13814
|
+
"both"
|
|
13815
|
+
]).optional(),
|
|
13816
|
+
checkIntervalSec: number().optional(),
|
|
13817
|
+
check: SceneCheckSchema.optional()
|
|
13818
|
+
})
|
|
13819
|
+
}), _void(), {
|
|
13820
|
+
kind: "mutation",
|
|
13821
|
+
auth: "admin"
|
|
13822
|
+
}),
|
|
13823
|
+
deleteScene: method(object({
|
|
13824
|
+
deviceId: number(),
|
|
13825
|
+
monitorId: string()
|
|
13826
|
+
}), _void(), {
|
|
13827
|
+
kind: "mutation",
|
|
13828
|
+
auth: "admin"
|
|
13829
|
+
}),
|
|
13830
|
+
captureReference: method(object({
|
|
13831
|
+
deviceId: number(),
|
|
13832
|
+
monitorId: string(),
|
|
13833
|
+
stateId: string().optional(),
|
|
13834
|
+
label: string().optional(),
|
|
13835
|
+
condition: SceneConditionSchema.optional()
|
|
13836
|
+
}), object({
|
|
13837
|
+
stateId: string(),
|
|
13838
|
+
referenceCount: number()
|
|
13839
|
+
}), {
|
|
13840
|
+
kind: "mutation",
|
|
13841
|
+
auth: "admin"
|
|
13842
|
+
}),
|
|
13843
|
+
deleteReference: method(object({
|
|
13844
|
+
deviceId: number(),
|
|
13845
|
+
monitorId: string(),
|
|
13846
|
+
stateId: string(),
|
|
13847
|
+
index: number()
|
|
13848
|
+
}), _void(), {
|
|
13849
|
+
kind: "mutation",
|
|
13850
|
+
auth: "admin"
|
|
13851
|
+
}),
|
|
13852
|
+
recheckNow: method(object({
|
|
13853
|
+
deviceId: number(),
|
|
13854
|
+
monitorId: string()
|
|
13855
|
+
}), _void(), {
|
|
13856
|
+
kind: "mutation",
|
|
13857
|
+
auth: "admin"
|
|
13858
|
+
})
|
|
13859
|
+
},
|
|
13860
|
+
status: {
|
|
13861
|
+
schema: SceneMonitorStatusSchema,
|
|
13862
|
+
kind: "push"
|
|
13863
|
+
},
|
|
13864
|
+
runtimeState: SceneMonitorStatusSchema
|
|
13865
|
+
};
|
|
13866
|
+
/**
|
|
13662
13867
|
* Script-runner cap. Models HA `script.*` entities on
|
|
13663
13868
|
* `DeviceType.Script`. A Script is a pre-recorded action sequence
|
|
13664
13869
|
* that can be invoked imperatively — optionally with a variables
|
|
@@ -14636,6 +14841,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14636
14841
|
pressureSensor: pressureSensorCapability,
|
|
14637
14842
|
privacyMask: privacyMaskCapability,
|
|
14638
14843
|
ptzAutotrack: ptzAutotrackCapability,
|
|
14844
|
+
sceneMonitor: sceneMonitorCapability,
|
|
14639
14845
|
scriptRunner: scriptRunnerCapability,
|
|
14640
14846
|
smoke: smokeCapability,
|
|
14641
14847
|
streamParams: streamParamsCapability,
|
|
@@ -15921,7 +16127,12 @@ var NotificationRuleConditionsSchema = object({
|
|
|
15921
16127
|
clipDescription: object({
|
|
15922
16128
|
text: string().min(1),
|
|
15923
16129
|
minSimilarity: number().min(0).max(1)
|
|
15924
|
-
}).optional()
|
|
16130
|
+
}).optional(),
|
|
16131
|
+
/** Match events whose recognized-entity label (face identity name or plate
|
|
16132
|
+
* vehicle name, propagated onto `event.data.label`) is one of these values.
|
|
16133
|
+
* Empty/absent → unaffected (back-compat). Enables "notify me when <named
|
|
16134
|
+
* vehicle/person> is seen". */
|
|
16135
|
+
labels: array(string()).readonly().optional()
|
|
15925
16136
|
});
|
|
15926
16137
|
var NotificationRuleTemplateSchema = object({
|
|
15927
16138
|
title: string(),
|
|
@@ -16179,11 +16390,19 @@ method(object({
|
|
|
16179
16390
|
* login page needs NO change.
|
|
16180
16391
|
*
|
|
16181
16392
|
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
16182
|
-
* `loadRemoteBundle`) for an in-page ceremony.
|
|
16183
|
-
*
|
|
16184
|
-
*
|
|
16185
|
-
*
|
|
16186
|
-
*
|
|
16393
|
+
* `loadRemoteBundle`) for an in-page ceremony. `auth.listLoginMethods`
|
|
16394
|
+
* stamps a public `bundleUrl` from `addonId` + `bundle`. Generic
|
|
16395
|
+
* mechanism kept for future use; no shipped addon uses it on the login
|
|
16396
|
+
* page (the passkey ceremony below runs natively in the shell instead).
|
|
16397
|
+
*
|
|
16398
|
+
* - `passkey` — a declarative WebAuthn ceremony the shell renders
|
|
16399
|
+
* natively (`@simplewebauthn/browser` lives in `addon-admin-ui`, not in
|
|
16400
|
+
* a remotely-loaded bundle). Carries the addon's effective `rpId` /
|
|
16401
|
+
* `origin` (from its `resolveRpID()` / `resolveOrigin()`) so the shell
|
|
16402
|
+
* can gate visibility (IP-literal origin, hostname/rpId mismatch) WITHOUT
|
|
16403
|
+
* fetching any remote code pre-auth. Contribution stays unconditional —
|
|
16404
|
+
* enrollment state is never leaked pre-auth; visibility is a shell
|
|
16405
|
+
* decision.
|
|
16187
16406
|
*
|
|
16188
16407
|
* Every contribution carries a `stage`:
|
|
16189
16408
|
* - `primary` — shown on the first credentials screen (OIDC /
|
|
@@ -16197,30 +16416,45 @@ method(object({
|
|
|
16197
16416
|
*/
|
|
16198
16417
|
/** When a login method renders in the two-phase login flow. */
|
|
16199
16418
|
var LoginStageEnum = _enum(["primary", "second-factor"]);
|
|
16200
|
-
/** One login-method contribution — redirect button
|
|
16201
|
-
var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16419
|
+
/** One login-method contribution — redirect button, pre-auth widget, or native passkey ceremony. */
|
|
16420
|
+
var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
16421
|
+
object({
|
|
16422
|
+
kind: literal("redirect"),
|
|
16423
|
+
/** Stable id within the login-method set (e.g. `auth-oidc/google`). */
|
|
16424
|
+
id: string(),
|
|
16425
|
+
/** Operator-facing button label. */
|
|
16426
|
+
label: string(),
|
|
16427
|
+
/** lucide-react icon name. */
|
|
16428
|
+
icon: string().optional(),
|
|
16429
|
+
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
16430
|
+
startUrl: string(),
|
|
16431
|
+
stage: LoginStageEnum
|
|
16432
|
+
}),
|
|
16433
|
+
object({
|
|
16434
|
+
kind: literal("widget"),
|
|
16435
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
|
|
16436
|
+
id: string(),
|
|
16437
|
+
/** Owning addon id — drives the public bundle URL + the MF namespace. */
|
|
16438
|
+
addonId: string(),
|
|
16439
|
+
/** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
|
|
16440
|
+
bundle: string(),
|
|
16441
|
+
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
16442
|
+
remote: WidgetRemoteSchema,
|
|
16443
|
+
stage: LoginStageEnum
|
|
16444
|
+
}),
|
|
16445
|
+
object({
|
|
16446
|
+
kind: literal("passkey"),
|
|
16447
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-direct-login`). */
|
|
16448
|
+
id: string(),
|
|
16449
|
+
/** Operator-facing button label. */
|
|
16450
|
+
label: string(),
|
|
16451
|
+
stage: LoginStageEnum,
|
|
16452
|
+
/** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
|
|
16453
|
+
rpId: string(),
|
|
16454
|
+
/** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
|
|
16455
|
+
origin: string().nullable()
|
|
16456
|
+
})
|
|
16457
|
+
]);
|
|
16224
16458
|
method(_void(), array(LoginMethodContributionSchema).readonly());
|
|
16225
16459
|
/**
|
|
16226
16460
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
@@ -18114,14 +18348,14 @@ var TargetKindCapsSchema = object({
|
|
|
18114
18348
|
* the union is large and not meant for runtime validation here; the exported
|
|
18115
18349
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
18116
18350
|
*/
|
|
18117
|
-
var ConfigSchemaPassthrough = unknown();
|
|
18351
|
+
var ConfigSchemaPassthrough$1 = unknown();
|
|
18118
18352
|
var TargetKindSchema = object({
|
|
18119
18353
|
kind: string(),
|
|
18120
18354
|
label: string(),
|
|
18121
18355
|
icon: string(),
|
|
18122
18356
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
18123
18357
|
addonId: string(),
|
|
18124
|
-
configSchema: ConfigSchemaPassthrough,
|
|
18358
|
+
configSchema: ConfigSchemaPassthrough$1,
|
|
18125
18359
|
supportsDiscovery: boolean(),
|
|
18126
18360
|
caps: TargetKindCapsSchema
|
|
18127
18361
|
});
|
|
@@ -18188,6 +18422,298 @@ var notificationOutputCapability = {
|
|
|
18188
18422
|
}
|
|
18189
18423
|
};
|
|
18190
18424
|
/**
|
|
18425
|
+
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
18426
|
+
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
18427
|
+
* caps stay wire-compatible without a circular cap→cap import.
|
|
18428
|
+
*
|
|
18429
|
+
* Errors are a discriminated-union RESULT, never thrown: the shape survives
|
|
18430
|
+
* every transport tier structurally, and failed calls still write usage rows.
|
|
18431
|
+
* Token counts only in v1 — no costUsd (operator decision, 2026-07-15).
|
|
18432
|
+
*/
|
|
18433
|
+
var LlmUsageSchema = object({
|
|
18434
|
+
inputTokens: number(),
|
|
18435
|
+
outputTokens: number()
|
|
18436
|
+
});
|
|
18437
|
+
var LlmErrorCodeSchema = _enum([
|
|
18438
|
+
"timeout",
|
|
18439
|
+
"rate-limited",
|
|
18440
|
+
"auth",
|
|
18441
|
+
"refusal",
|
|
18442
|
+
"bad-request",
|
|
18443
|
+
"unavailable",
|
|
18444
|
+
"no-profile",
|
|
18445
|
+
"budget-exceeded",
|
|
18446
|
+
"adapter-error"
|
|
18447
|
+
]);
|
|
18448
|
+
var LlmGenerateResultSchema = discriminatedUnion("ok", [object({
|
|
18449
|
+
ok: literal(true),
|
|
18450
|
+
text: string(),
|
|
18451
|
+
model: string(),
|
|
18452
|
+
usage: LlmUsageSchema,
|
|
18453
|
+
truncated: boolean(),
|
|
18454
|
+
latencyMs: number()
|
|
18455
|
+
}), object({
|
|
18456
|
+
ok: literal(false),
|
|
18457
|
+
code: LlmErrorCodeSchema,
|
|
18458
|
+
message: string(),
|
|
18459
|
+
retryAfterMs: number().optional()
|
|
18460
|
+
})]);
|
|
18461
|
+
/**
|
|
18462
|
+
* `Uint8Array` is the sanctioned binary convention — superjson + the UDS
|
|
18463
|
+
* MsgPack channel round-trip typed arrays (embedding-encoder.cap.ts:29,
|
|
18464
|
+
* notification-output.cap.ts:27-31 precedents).
|
|
18465
|
+
*/
|
|
18466
|
+
var LlmImageSchema = object({
|
|
18467
|
+
bytes: _instanceof(Uint8Array),
|
|
18468
|
+
mimeType: string()
|
|
18469
|
+
});
|
|
18470
|
+
var LlmGenerateBaseInputSchema = object({
|
|
18471
|
+
/** Collection routing (the notification-output posture). */
|
|
18472
|
+
addonId: string().optional(),
|
|
18473
|
+
/** Explicit profile; else the resolution chain (spec §3). */
|
|
18474
|
+
profileId: string().optional(),
|
|
18475
|
+
/** MANDATORY usage tag: 'ai-summary', 'notifier-rules', 'adhoc-ui', … */
|
|
18476
|
+
consumer: string(),
|
|
18477
|
+
system: string().optional(),
|
|
18478
|
+
/** v1: single-turn. `messages[]` is a v2 additive field. */
|
|
18479
|
+
prompt: string(),
|
|
18480
|
+
/** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
|
|
18481
|
+
jsonSchema: record(string(), unknown()).optional(),
|
|
18482
|
+
/** Per-call override of the profile default. */
|
|
18483
|
+
maxTokens: number().int().positive().optional(),
|
|
18484
|
+
temperature: number().optional()
|
|
18485
|
+
});
|
|
18486
|
+
/**
|
|
18487
|
+
* `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
|
|
18488
|
+
* on EVERY node where `addon-ai` is installed; the hub `llm` provider reaches
|
|
18489
|
+
* a specific node's runtime with `nodePin(profile.runtime.nodeId)` — normal
|
|
18490
|
+
* cap routing, zero bespoke plumbing. `internal: true`: the operator reaches
|
|
18491
|
+
* this only through the `llm` cap's methods.
|
|
18492
|
+
*
|
|
18493
|
+
* One running llama-server child per node in v1 (models are RAM-heavy).
|
|
18494
|
+
* Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
|
|
18495
|
+
* watchdog — operator decision #3).
|
|
18496
|
+
*/
|
|
18497
|
+
var ManagedModelRefSchema = discriminatedUnion("kind", [
|
|
18498
|
+
object({
|
|
18499
|
+
kind: literal("catalog"),
|
|
18500
|
+
catalogId: string()
|
|
18501
|
+
}),
|
|
18502
|
+
object({
|
|
18503
|
+
kind: literal("url"),
|
|
18504
|
+
url: string(),
|
|
18505
|
+
sha256: string().optional()
|
|
18506
|
+
}),
|
|
18507
|
+
object({
|
|
18508
|
+
kind: literal("path"),
|
|
18509
|
+
path: string()
|
|
18510
|
+
})
|
|
18511
|
+
]);
|
|
18512
|
+
var ManagedRuntimeConfigSchema = object({
|
|
18513
|
+
/** WHERE the runtime lives — hub or any agent. */
|
|
18514
|
+
nodeId: string(),
|
|
18515
|
+
/** Closed for v1; 'ollama' is a v2 candidate. */
|
|
18516
|
+
engine: _enum(["llama-cpp"]),
|
|
18517
|
+
model: ManagedModelRefSchema,
|
|
18518
|
+
contextSize: number().int().default(4096),
|
|
18519
|
+
/** 0 = CPU-only. */
|
|
18520
|
+
gpuLayers: number().int().default(0),
|
|
18521
|
+
/** Default: cpus-2, clamped ≥1 (resolved node-side). */
|
|
18522
|
+
threads: number().int().optional(),
|
|
18523
|
+
/** Concurrent slots. */
|
|
18524
|
+
parallel: number().int().default(1),
|
|
18525
|
+
/** Else lazy: first generate boots it. */
|
|
18526
|
+
autoStart: boolean().default(false),
|
|
18527
|
+
/** 0 = never; frees RAM after quiet periods. */
|
|
18528
|
+
idleStopMinutes: number().int().default(30)
|
|
18529
|
+
});
|
|
18530
|
+
var LlmRuntimeStatusSchema = object({
|
|
18531
|
+
/** Status is ALWAYS node-qualified. */
|
|
18532
|
+
nodeId: string(),
|
|
18533
|
+
state: _enum([
|
|
18534
|
+
"stopped",
|
|
18535
|
+
"downloading",
|
|
18536
|
+
"starting",
|
|
18537
|
+
"ready",
|
|
18538
|
+
"crashed",
|
|
18539
|
+
"failed"
|
|
18540
|
+
]),
|
|
18541
|
+
pid: number().optional(),
|
|
18542
|
+
port: number().optional(),
|
|
18543
|
+
modelPath: string().optional(),
|
|
18544
|
+
modelId: string().optional(),
|
|
18545
|
+
downloadProgress: number().min(0).max(1).optional(),
|
|
18546
|
+
lastError: string().optional(),
|
|
18547
|
+
crashesInWindow: number(),
|
|
18548
|
+
/** Child RSS (sampled best-effort). */
|
|
18549
|
+
memoryBytes: number().optional(),
|
|
18550
|
+
vramBytes: number().optional()
|
|
18551
|
+
});
|
|
18552
|
+
var LlmNodeModelSchema = object({
|
|
18553
|
+
file: string(),
|
|
18554
|
+
sizeBytes: number(),
|
|
18555
|
+
catalogId: string().optional(),
|
|
18556
|
+
installedAt: number().optional()
|
|
18557
|
+
});
|
|
18558
|
+
var LlmRuntimeDiskUsageSchema = object({
|
|
18559
|
+
nodeId: string(),
|
|
18560
|
+
modelsBytes: number(),
|
|
18561
|
+
freeBytes: number().optional()
|
|
18562
|
+
});
|
|
18563
|
+
method(LlmGenerateBaseInputSchema.extend({
|
|
18564
|
+
images: array(LlmImageSchema).optional(),
|
|
18565
|
+
runtime: ManagedRuntimeConfigSchema,
|
|
18566
|
+
/** The managed profile's timeout, threaded by the hub provider. */
|
|
18567
|
+
timeoutMs: number().int().positive().optional()
|
|
18568
|
+
}), LlmGenerateResultSchema, { kind: "mutation" }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
18569
|
+
kind: "mutation",
|
|
18570
|
+
auth: "admin"
|
|
18571
|
+
}), method(object({}), _void(), {
|
|
18572
|
+
kind: "mutation",
|
|
18573
|
+
auth: "admin"
|
|
18574
|
+
}), method(object({}), LlmRuntimeStatusSchema), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
18575
|
+
kind: "mutation",
|
|
18576
|
+
auth: "admin"
|
|
18577
|
+
}), method(object({ file: string() }), _void(), {
|
|
18578
|
+
kind: "mutation",
|
|
18579
|
+
auth: "admin"
|
|
18580
|
+
}), method(object({}), array(LlmNodeModelSchema)), method(object({}), LlmRuntimeDiskUsageSchema);
|
|
18581
|
+
/**
|
|
18582
|
+
* `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
|
|
18583
|
+
* methods concat-fan across providers; single-row methods route to ONE
|
|
18584
|
+
* provider by the `addonId` in the call input (the notification-output
|
|
18585
|
+
* posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
|
|
18586
|
+
* (hub-placed); the cap stays open for future providers.
|
|
18587
|
+
*
|
|
18588
|
+
* Profiles are ROWS (data), not addons: one row = one usable model endpoint.
|
|
18589
|
+
* `apiKey` is a password field — providers REDACT it on read and merge on
|
|
18590
|
+
* write; a stored key NEVER round-trips to a client.
|
|
18591
|
+
*/
|
|
18592
|
+
var LlmProfileKindSchema = _enum([
|
|
18593
|
+
"openai-compatible",
|
|
18594
|
+
"openai",
|
|
18595
|
+
"anthropic",
|
|
18596
|
+
"google",
|
|
18597
|
+
"managed-local"
|
|
18598
|
+
]);
|
|
18599
|
+
var LlmProfileSchema = object({
|
|
18600
|
+
id: string(),
|
|
18601
|
+
name: string(),
|
|
18602
|
+
kind: LlmProfileKindSchema,
|
|
18603
|
+
/** Stamped by the provider — keeps the fanned catalog routable. */
|
|
18604
|
+
addonId: string(),
|
|
18605
|
+
enabled: boolean(),
|
|
18606
|
+
/** Vendor model id, or the managed runtime's loaded model. */
|
|
18607
|
+
model: string(),
|
|
18608
|
+
/** Required for openai-compatible; override for cloud kinds. */
|
|
18609
|
+
baseUrl: string().optional(),
|
|
18610
|
+
/** ConfigUISchema type:'password' — never round-trips (spec §5). */
|
|
18611
|
+
apiKey: string().optional(),
|
|
18612
|
+
supportsVision: boolean(),
|
|
18613
|
+
temperature: number().min(0).max(2).optional(),
|
|
18614
|
+
maxTokens: number().int().positive().optional(),
|
|
18615
|
+
timeoutMs: number().int().positive().default(6e4),
|
|
18616
|
+
extraHeaders: record(string(), string()).optional(),
|
|
18617
|
+
/** kind === 'managed-local' only (spec §4). */
|
|
18618
|
+
runtime: ManagedRuntimeConfigSchema.optional()
|
|
18619
|
+
});
|
|
18620
|
+
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
18621
|
+
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
18622
|
+
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
18623
|
+
var ConfigSchemaPassthrough = unknown();
|
|
18624
|
+
var LlmProfileKindDescriptorSchema = object({
|
|
18625
|
+
kind: LlmProfileKindSchema,
|
|
18626
|
+
label: string(),
|
|
18627
|
+
icon: string(),
|
|
18628
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
18629
|
+
addonId: string(),
|
|
18630
|
+
configSchema: ConfigSchemaPassthrough
|
|
18631
|
+
});
|
|
18632
|
+
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
18633
|
+
var LlmDefaultSchema = object({
|
|
18634
|
+
selector: LlmDefaultSelectorSchema,
|
|
18635
|
+
profileId: string()
|
|
18636
|
+
});
|
|
18637
|
+
/** Server-side rollup row — getUsage never dumps raw call rows (spec §6). */
|
|
18638
|
+
var LlmUsageRollupSchema = object({
|
|
18639
|
+
day: string(),
|
|
18640
|
+
consumer: string(),
|
|
18641
|
+
profileId: string(),
|
|
18642
|
+
calls: number(),
|
|
18643
|
+
okCalls: number(),
|
|
18644
|
+
errorCalls: number(),
|
|
18645
|
+
inputTokens: number(),
|
|
18646
|
+
outputTokens: number(),
|
|
18647
|
+
avgLatencyMs: number()
|
|
18648
|
+
});
|
|
18649
|
+
/** LLM-facing view over the reused ModelCatalogEntry mechanism (spec §4.2). */
|
|
18650
|
+
var ManagedModelCatalogEntrySchema = object({
|
|
18651
|
+
id: string(),
|
|
18652
|
+
label: string(),
|
|
18653
|
+
family: string(),
|
|
18654
|
+
purpose: _enum(["text", "vision"]),
|
|
18655
|
+
url: string(),
|
|
18656
|
+
sha256: string(),
|
|
18657
|
+
sizeBytes: number(),
|
|
18658
|
+
quantization: string(),
|
|
18659
|
+
/** Load-time guidance shown in the picker. */
|
|
18660
|
+
minRamBytes: number(),
|
|
18661
|
+
contextSizeDefault: number().int(),
|
|
18662
|
+
/** Vision models: companion projector file. */
|
|
18663
|
+
mmprojUrl: string().optional()
|
|
18664
|
+
});
|
|
18665
|
+
var LlmRuntimeNodeSchema = object({
|
|
18666
|
+
nodeId: string(),
|
|
18667
|
+
reachable: boolean(),
|
|
18668
|
+
status: LlmRuntimeStatusSchema.optional(),
|
|
18669
|
+
disk: LlmRuntimeDiskUsageSchema.optional(),
|
|
18670
|
+
error: string().optional()
|
|
18671
|
+
});
|
|
18672
|
+
var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: array(LlmImageSchema).min(1) });
|
|
18673
|
+
var ProfileRefInputSchema = object({
|
|
18674
|
+
addonId: string(),
|
|
18675
|
+
profileId: string()
|
|
18676
|
+
});
|
|
18677
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
18678
|
+
kind: "mutation",
|
|
18679
|
+
auth: "admin"
|
|
18680
|
+
}), method(ProfileRefInputSchema, _void(), {
|
|
18681
|
+
kind: "mutation",
|
|
18682
|
+
auth: "admin"
|
|
18683
|
+
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
18684
|
+
kind: "mutation",
|
|
18685
|
+
auth: "admin"
|
|
18686
|
+
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
18687
|
+
selector: LlmDefaultSelectorSchema,
|
|
18688
|
+
profileId: string().nullable()
|
|
18689
|
+
}), _void(), {
|
|
18690
|
+
kind: "mutation",
|
|
18691
|
+
auth: "admin"
|
|
18692
|
+
}), method(object({
|
|
18693
|
+
since: number().optional(),
|
|
18694
|
+
until: number().optional(),
|
|
18695
|
+
consumer: string().optional(),
|
|
18696
|
+
profileId: string().optional()
|
|
18697
|
+
}), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
|
|
18698
|
+
nodeId: string(),
|
|
18699
|
+
model: ManagedModelRefSchema
|
|
18700
|
+
}), _void(), {
|
|
18701
|
+
kind: "mutation",
|
|
18702
|
+
auth: "admin"
|
|
18703
|
+
}), method(object({
|
|
18704
|
+
nodeId: string(),
|
|
18705
|
+
file: string()
|
|
18706
|
+
}), _void(), {
|
|
18707
|
+
kind: "mutation",
|
|
18708
|
+
auth: "admin"
|
|
18709
|
+
}), method(ProfileRefInputSchema, LlmRuntimeStatusSchema), method(ProfileRefInputSchema, LlmRuntimeStatusSchema, {
|
|
18710
|
+
kind: "mutation",
|
|
18711
|
+
auth: "admin"
|
|
18712
|
+
}), method(ProfileRefInputSchema, _void(), {
|
|
18713
|
+
kind: "mutation",
|
|
18714
|
+
auth: "admin"
|
|
18715
|
+
});
|
|
18716
|
+
/**
|
|
18191
18717
|
* Zod schemas for persisted record types.
|
|
18192
18718
|
*
|
|
18193
18719
|
* These schemas serve as the single source of truth for types that are
|
|
@@ -18403,6 +18929,10 @@ var TrackSchema = object({
|
|
|
18403
18929
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
18404
18930
|
/** Deduplicated zones the track has entered at least once. */
|
|
18405
18931
|
zonesVisited: array(string()).readonly(),
|
|
18932
|
+
/** Deduplicated set of detector classes observed for this track over its
|
|
18933
|
+
* life (a track may be reclassified, e.g. person→vehicle). Absent on
|
|
18934
|
+
* legacy rows written before class accumulation shipped. */
|
|
18935
|
+
classes: array(string()).readonly().optional(),
|
|
18406
18936
|
/** Cumulative normalized distance travelled (0..1 units = full frame width). */
|
|
18407
18937
|
totalDistance: number(),
|
|
18408
18938
|
state: TrackStateSchema,
|
|
@@ -18564,7 +19094,7 @@ var KeyEventSchema = object({
|
|
|
18564
19094
|
/** Track lifetime in ms (lastSeen - firstSeen). */
|
|
18565
19095
|
windowMs: number().optional()
|
|
18566
19096
|
});
|
|
18567
|
-
|
|
19097
|
+
object({
|
|
18568
19098
|
trackId: string(),
|
|
18569
19099
|
className: string(),
|
|
18570
19100
|
confidence: number(),
|
|
@@ -18572,6 +19102,23 @@ var TrackedDetectionSchema = object({
|
|
|
18572
19102
|
zones: array(string()).readonly(),
|
|
18573
19103
|
state: TrackStateSchema
|
|
18574
19104
|
});
|
|
19105
|
+
var OverlayDetectionSchema = looseObject({
|
|
19106
|
+
id: string(),
|
|
19107
|
+
kind: _enum(["first-level", "detail"]),
|
|
19108
|
+
macroClass: string(),
|
|
19109
|
+
score: number(),
|
|
19110
|
+
bbox: object({
|
|
19111
|
+
x: number(),
|
|
19112
|
+
y: number(),
|
|
19113
|
+
width: number(),
|
|
19114
|
+
height: number()
|
|
19115
|
+
}),
|
|
19116
|
+
labels: array(looseObject({
|
|
19117
|
+
label: string(),
|
|
19118
|
+
score: number()
|
|
19119
|
+
})).readonly(),
|
|
19120
|
+
parentId: string().optional()
|
|
19121
|
+
});
|
|
18575
19122
|
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
|
|
18576
19123
|
var SearchObjectEventsInput = object({
|
|
18577
19124
|
text: string(),
|
|
@@ -18582,6 +19129,20 @@ var SearchObjectEventsInput = object({
|
|
|
18582
19129
|
limit: number().default(50),
|
|
18583
19130
|
minScore: number().min(0).max(1).default(.2)
|
|
18584
19131
|
});
|
|
19132
|
+
var TrackCascadeCountsSchema = object({
|
|
19133
|
+
/** Persisted track roots deleted (authoritative). */
|
|
19134
|
+
tracks: number().int(),
|
|
19135
|
+
/** Object events removed with their tracks (best-effort; see note above). */
|
|
19136
|
+
events: number().int(),
|
|
19137
|
+
/** Track/face/plate-owned media removed (best-effort). Never identity media. */
|
|
19138
|
+
media: number().int(),
|
|
19139
|
+
/** Unassigned (non-enrolled) face reads removed (best-effort). */
|
|
19140
|
+
faces: number().int(),
|
|
19141
|
+
/** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
|
|
19142
|
+
plates: number().int(),
|
|
19143
|
+
/** Per-track CLIP search vectors removed (best-effort). */
|
|
19144
|
+
embeddings: number().int()
|
|
19145
|
+
});
|
|
18585
19146
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
18586
19147
|
deviceId: number(),
|
|
18587
19148
|
trackId: string()
|
|
@@ -18613,6 +19174,24 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18613
19174
|
}), {
|
|
18614
19175
|
kind: "mutation",
|
|
18615
19176
|
auth: "admin"
|
|
19177
|
+
}), method(object({
|
|
19178
|
+
deviceId: number(),
|
|
19179
|
+
cutoffMs: number()
|
|
19180
|
+
}), TrackCascadeCountsSchema, {
|
|
19181
|
+
kind: "mutation",
|
|
19182
|
+
auth: "admin"
|
|
19183
|
+
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
19184
|
+
kind: "mutation",
|
|
19185
|
+
auth: "admin"
|
|
19186
|
+
}), method(object({
|
|
19187
|
+
deviceId: number(),
|
|
19188
|
+
trackIds: array(string()).min(1)
|
|
19189
|
+
}), object({
|
|
19190
|
+
deleted: number().int(),
|
|
19191
|
+
failed: array(string()).readonly()
|
|
19192
|
+
}), {
|
|
19193
|
+
kind: "mutation",
|
|
19194
|
+
auth: "admin"
|
|
18616
19195
|
}), method(object({
|
|
18617
19196
|
eventId: string(),
|
|
18618
19197
|
kind: MediaFileKindEnum.optional()
|
|
@@ -18621,7 +19200,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18621
19200
|
timestamp: number(),
|
|
18622
19201
|
frameWidth: number(),
|
|
18623
19202
|
frameHeight: number(),
|
|
18624
|
-
detections: array(
|
|
19203
|
+
detections: array(OverlayDetectionSchema).readonly()
|
|
18625
19204
|
}), object({
|
|
18626
19205
|
deviceId: number(),
|
|
18627
19206
|
trackId: string(),
|
|
@@ -21479,6 +22058,24 @@ DeviceType.Camera, method(object({
|
|
|
21479
22058
|
deviceId: number(),
|
|
21480
22059
|
status: OsdStatusSchema
|
|
21481
22060
|
});
|
|
22061
|
+
var VehicleSchema = object({
|
|
22062
|
+
id: string(),
|
|
22063
|
+
name: string(),
|
|
22064
|
+
sampleCount: number().int().nonnegative(),
|
|
22065
|
+
coverMediaKey: string().optional(),
|
|
22066
|
+
/** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
|
|
22067
|
+
coverBase64: string().optional()
|
|
22068
|
+
});
|
|
22069
|
+
var VehicleSampleInfoSchema = object({
|
|
22070
|
+
id: string(),
|
|
22071
|
+
/** The plate text this sample enrolled (self-labeling — no embedding). */
|
|
22072
|
+
text: string(),
|
|
22073
|
+
/** OCR confidence of the enrolled read (0..1). */
|
|
22074
|
+
score: number(),
|
|
22075
|
+
addedAt: number().int(),
|
|
22076
|
+
deviceId: number().int().optional(),
|
|
22077
|
+
base64: string().optional()
|
|
22078
|
+
});
|
|
21482
22079
|
var PlateInfoSchema = object({
|
|
21483
22080
|
plateId: string(),
|
|
21484
22081
|
deviceId: number().int(),
|
|
@@ -21490,6 +22087,16 @@ var PlateInfoSchema = object({
|
|
|
21490
22087
|
score: number(),
|
|
21491
22088
|
/** True when the text was manually corrected (exempt from retention). */
|
|
21492
22089
|
corrected: boolean(),
|
|
22090
|
+
/** Recognized vehicle id when a matcher lookup named this read (SQL NULL → absent). */
|
|
22091
|
+
recognizedVehicleId: string().optional(),
|
|
22092
|
+
/** Resolved vehicle name for `recognizedVehicleId` (UI convenience). */
|
|
22093
|
+
vehicleName: string().optional(),
|
|
22094
|
+
/** True once the read was assigned to a vehicle (enrolled as a sample). */
|
|
22095
|
+
assigned: boolean(),
|
|
22096
|
+
/** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
|
|
22097
|
+
plateBbox: BoundingBoxSchema.optional(),
|
|
22098
|
+
/** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
|
|
22099
|
+
keyFrameMediaKey: string().optional(),
|
|
21493
22100
|
base64: string().optional()
|
|
21494
22101
|
});
|
|
21495
22102
|
var MediaFileLiteSchema = object({
|
|
@@ -21529,6 +22136,48 @@ method(object({
|
|
|
21529
22136
|
}), method(object({ plateId: string() }), _void(), {
|
|
21530
22137
|
kind: "mutation",
|
|
21531
22138
|
auth: "admin"
|
|
22139
|
+
}), method(_void(), array(VehicleSchema).readonly()), method(object({ name: string().min(1) }), VehicleSchema, {
|
|
22140
|
+
kind: "mutation",
|
|
22141
|
+
auth: "admin"
|
|
22142
|
+
}), method(object({
|
|
22143
|
+
id: string(),
|
|
22144
|
+
name: string().min(1)
|
|
22145
|
+
}), _void(), {
|
|
22146
|
+
kind: "mutation",
|
|
22147
|
+
auth: "admin"
|
|
22148
|
+
}), method(object({ id: string() }), _void(), {
|
|
22149
|
+
kind: "mutation",
|
|
22150
|
+
auth: "admin"
|
|
22151
|
+
}), method(object({ vehicleId: string() }), array(VehicleSampleInfoSchema).readonly()), method(object({
|
|
22152
|
+
vehicleId: string(),
|
|
22153
|
+
sampleId: string()
|
|
22154
|
+
}), _void(), {
|
|
22155
|
+
kind: "mutation",
|
|
22156
|
+
auth: "admin"
|
|
22157
|
+
}), method(object({
|
|
22158
|
+
plateId: string(),
|
|
22159
|
+
vehicleId: string()
|
|
22160
|
+
}), _void(), {
|
|
22161
|
+
kind: "mutation",
|
|
22162
|
+
auth: "admin"
|
|
22163
|
+
}), method(object({ plateId: string() }), _void(), {
|
|
22164
|
+
kind: "mutation",
|
|
22165
|
+
auth: "admin"
|
|
22166
|
+
}), method(object({
|
|
22167
|
+
plateIds: array(string()).min(1),
|
|
22168
|
+
vehicleId: string()
|
|
22169
|
+
}), object({
|
|
22170
|
+
assigned: number().int(),
|
|
22171
|
+
failed: array(string()).readonly()
|
|
22172
|
+
}), {
|
|
22173
|
+
kind: "mutation",
|
|
22174
|
+
auth: "admin"
|
|
22175
|
+
}), method(object({ plateIds: array(string()).min(1) }), object({
|
|
22176
|
+
unassigned: number().int(),
|
|
22177
|
+
failed: array(string()).readonly()
|
|
22178
|
+
}), {
|
|
22179
|
+
kind: "mutation",
|
|
22180
|
+
auth: "admin"
|
|
21532
22181
|
});
|
|
21533
22182
|
var ModelFormatSchema = _enum(MODEL_FORMATS);
|
|
21534
22183
|
var HwAccelBackendInputSchema = _enum([
|
|
@@ -24074,6 +24723,168 @@ Object.freeze({
|
|
|
24074
24723
|
addonId: null,
|
|
24075
24724
|
access: "create"
|
|
24076
24725
|
},
|
|
24726
|
+
"llm.deleteModel": {
|
|
24727
|
+
capName: "llm",
|
|
24728
|
+
capScope: "system",
|
|
24729
|
+
addonId: null,
|
|
24730
|
+
access: "delete"
|
|
24731
|
+
},
|
|
24732
|
+
"llm.deleteProfile": {
|
|
24733
|
+
capName: "llm",
|
|
24734
|
+
capScope: "system",
|
|
24735
|
+
addonId: null,
|
|
24736
|
+
access: "delete"
|
|
24737
|
+
},
|
|
24738
|
+
"llm.generate": {
|
|
24739
|
+
capName: "llm",
|
|
24740
|
+
capScope: "system",
|
|
24741
|
+
addonId: null,
|
|
24742
|
+
access: "create"
|
|
24743
|
+
},
|
|
24744
|
+
"llm.generateVision": {
|
|
24745
|
+
capName: "llm",
|
|
24746
|
+
capScope: "system",
|
|
24747
|
+
addonId: null,
|
|
24748
|
+
access: "create"
|
|
24749
|
+
},
|
|
24750
|
+
"llm.getDefaults": {
|
|
24751
|
+
capName: "llm",
|
|
24752
|
+
capScope: "system",
|
|
24753
|
+
addonId: null,
|
|
24754
|
+
access: "view"
|
|
24755
|
+
},
|
|
24756
|
+
"llm.getRuntimeStatus": {
|
|
24757
|
+
capName: "llm",
|
|
24758
|
+
capScope: "system",
|
|
24759
|
+
addonId: null,
|
|
24760
|
+
access: "view"
|
|
24761
|
+
},
|
|
24762
|
+
"llm.getUsage": {
|
|
24763
|
+
capName: "llm",
|
|
24764
|
+
capScope: "system",
|
|
24765
|
+
addonId: null,
|
|
24766
|
+
access: "view"
|
|
24767
|
+
},
|
|
24768
|
+
"llm.installModel": {
|
|
24769
|
+
capName: "llm",
|
|
24770
|
+
capScope: "system",
|
|
24771
|
+
addonId: null,
|
|
24772
|
+
access: "create"
|
|
24773
|
+
},
|
|
24774
|
+
"llm.listModelCatalog": {
|
|
24775
|
+
capName: "llm",
|
|
24776
|
+
capScope: "system",
|
|
24777
|
+
addonId: null,
|
|
24778
|
+
access: "view"
|
|
24779
|
+
},
|
|
24780
|
+
"llm.listModels": {
|
|
24781
|
+
capName: "llm",
|
|
24782
|
+
capScope: "system",
|
|
24783
|
+
addonId: null,
|
|
24784
|
+
access: "view"
|
|
24785
|
+
},
|
|
24786
|
+
"llm.listNodeModels": {
|
|
24787
|
+
capName: "llm",
|
|
24788
|
+
capScope: "system",
|
|
24789
|
+
addonId: null,
|
|
24790
|
+
access: "view"
|
|
24791
|
+
},
|
|
24792
|
+
"llm.listProfileKinds": {
|
|
24793
|
+
capName: "llm",
|
|
24794
|
+
capScope: "system",
|
|
24795
|
+
addonId: null,
|
|
24796
|
+
access: "view"
|
|
24797
|
+
},
|
|
24798
|
+
"llm.listProfiles": {
|
|
24799
|
+
capName: "llm",
|
|
24800
|
+
capScope: "system",
|
|
24801
|
+
addonId: null,
|
|
24802
|
+
access: "view"
|
|
24803
|
+
},
|
|
24804
|
+
"llm.listRuntimeNodes": {
|
|
24805
|
+
capName: "llm",
|
|
24806
|
+
capScope: "system",
|
|
24807
|
+
addonId: null,
|
|
24808
|
+
access: "view"
|
|
24809
|
+
},
|
|
24810
|
+
"llm.setDefault": {
|
|
24811
|
+
capName: "llm",
|
|
24812
|
+
capScope: "system",
|
|
24813
|
+
addonId: null,
|
|
24814
|
+
access: "create"
|
|
24815
|
+
},
|
|
24816
|
+
"llm.startRuntime": {
|
|
24817
|
+
capName: "llm",
|
|
24818
|
+
capScope: "system",
|
|
24819
|
+
addonId: null,
|
|
24820
|
+
access: "create"
|
|
24821
|
+
},
|
|
24822
|
+
"llm.stopRuntime": {
|
|
24823
|
+
capName: "llm",
|
|
24824
|
+
capScope: "system",
|
|
24825
|
+
addonId: null,
|
|
24826
|
+
access: "create"
|
|
24827
|
+
},
|
|
24828
|
+
"llm.testProfile": {
|
|
24829
|
+
capName: "llm",
|
|
24830
|
+
capScope: "system",
|
|
24831
|
+
addonId: null,
|
|
24832
|
+
access: "create"
|
|
24833
|
+
},
|
|
24834
|
+
"llm.upsertProfile": {
|
|
24835
|
+
capName: "llm",
|
|
24836
|
+
capScope: "system",
|
|
24837
|
+
addonId: null,
|
|
24838
|
+
access: "create"
|
|
24839
|
+
},
|
|
24840
|
+
"llmRuntime.complete": {
|
|
24841
|
+
capName: "llm-runtime",
|
|
24842
|
+
capScope: "system",
|
|
24843
|
+
addonId: null,
|
|
24844
|
+
access: "create"
|
|
24845
|
+
},
|
|
24846
|
+
"llmRuntime.deleteModel": {
|
|
24847
|
+
capName: "llm-runtime",
|
|
24848
|
+
capScope: "system",
|
|
24849
|
+
addonId: null,
|
|
24850
|
+
access: "delete"
|
|
24851
|
+
},
|
|
24852
|
+
"llmRuntime.ensureStarted": {
|
|
24853
|
+
capName: "llm-runtime",
|
|
24854
|
+
capScope: "system",
|
|
24855
|
+
addonId: null,
|
|
24856
|
+
access: "create"
|
|
24857
|
+
},
|
|
24858
|
+
"llmRuntime.getDiskUsage": {
|
|
24859
|
+
capName: "llm-runtime",
|
|
24860
|
+
capScope: "system",
|
|
24861
|
+
addonId: null,
|
|
24862
|
+
access: "view"
|
|
24863
|
+
},
|
|
24864
|
+
"llmRuntime.installModel": {
|
|
24865
|
+
capName: "llm-runtime",
|
|
24866
|
+
capScope: "system",
|
|
24867
|
+
addonId: null,
|
|
24868
|
+
access: "create"
|
|
24869
|
+
},
|
|
24870
|
+
"llmRuntime.listLocalModels": {
|
|
24871
|
+
capName: "llm-runtime",
|
|
24872
|
+
capScope: "system",
|
|
24873
|
+
addonId: null,
|
|
24874
|
+
access: "view"
|
|
24875
|
+
},
|
|
24876
|
+
"llmRuntime.status": {
|
|
24877
|
+
capName: "llm-runtime",
|
|
24878
|
+
capScope: "system",
|
|
24879
|
+
addonId: null,
|
|
24880
|
+
access: "view"
|
|
24881
|
+
},
|
|
24882
|
+
"llmRuntime.stop": {
|
|
24883
|
+
capName: "llm-runtime",
|
|
24884
|
+
capScope: "system",
|
|
24885
|
+
addonId: null,
|
|
24886
|
+
access: "create"
|
|
24887
|
+
},
|
|
24077
24888
|
"localNetwork.getAllowedAddresses": {
|
|
24078
24889
|
capName: "local-network",
|
|
24079
24890
|
capScope: "system",
|
|
@@ -24704,6 +25515,12 @@ Object.freeze({
|
|
|
24704
25515
|
addonId: null,
|
|
24705
25516
|
access: "delete"
|
|
24706
25517
|
},
|
|
25518
|
+
"pipelineAnalytics.deleteTracks": {
|
|
25519
|
+
capName: "pipeline-analytics",
|
|
25520
|
+
capScope: "device",
|
|
25521
|
+
addonId: null,
|
|
25522
|
+
access: "delete"
|
|
25523
|
+
},
|
|
24707
25524
|
"pipelineAnalytics.getActiveTracks": {
|
|
24708
25525
|
capName: "pipeline-analytics",
|
|
24709
25526
|
capScope: "device",
|
|
@@ -24770,12 +25587,24 @@ Object.freeze({
|
|
|
24770
25587
|
addonId: null,
|
|
24771
25588
|
access: "create"
|
|
24772
25589
|
},
|
|
25590
|
+
"pipelineAnalytics.pruneTracksBefore": {
|
|
25591
|
+
capName: "pipeline-analytics",
|
|
25592
|
+
capScope: "device",
|
|
25593
|
+
addonId: null,
|
|
25594
|
+
access: "create"
|
|
25595
|
+
},
|
|
24773
25596
|
"pipelineAnalytics.searchObjectEvents": {
|
|
24774
25597
|
capName: "pipeline-analytics",
|
|
24775
25598
|
capScope: "device",
|
|
24776
25599
|
addonId: null,
|
|
24777
25600
|
access: "view"
|
|
24778
25601
|
},
|
|
25602
|
+
"pipelineAnalytics.wipeAllAnalytics": {
|
|
25603
|
+
capName: "pipeline-analytics",
|
|
25604
|
+
capScope: "device",
|
|
25605
|
+
addonId: null,
|
|
25606
|
+
access: "delete"
|
|
25607
|
+
},
|
|
24779
25608
|
"pipelineExecutor.cacheFrameInPool": {
|
|
24780
25609
|
capName: "pipeline-executor",
|
|
24781
25610
|
capScope: "system",
|
|
@@ -25280,18 +26109,42 @@ Object.freeze({
|
|
|
25280
26109
|
addonId: null,
|
|
25281
26110
|
access: "create"
|
|
25282
26111
|
},
|
|
26112
|
+
"plateGallery.assignPlate": {
|
|
26113
|
+
capName: "plate-gallery",
|
|
26114
|
+
capScope: "system",
|
|
26115
|
+
addonId: null,
|
|
26116
|
+
access: "create"
|
|
26117
|
+
},
|
|
26118
|
+
"plateGallery.assignPlates": {
|
|
26119
|
+
capName: "plate-gallery",
|
|
26120
|
+
capScope: "system",
|
|
26121
|
+
addonId: null,
|
|
26122
|
+
access: "create"
|
|
26123
|
+
},
|
|
25283
26124
|
"plateGallery.correctPlateText": {
|
|
25284
26125
|
capName: "plate-gallery",
|
|
25285
26126
|
capScope: "system",
|
|
25286
26127
|
addonId: null,
|
|
25287
26128
|
access: "create"
|
|
25288
26129
|
},
|
|
26130
|
+
"plateGallery.createVehicle": {
|
|
26131
|
+
capName: "plate-gallery",
|
|
26132
|
+
capScope: "system",
|
|
26133
|
+
addonId: null,
|
|
26134
|
+
access: "create"
|
|
26135
|
+
},
|
|
25289
26136
|
"plateGallery.deletePlate": {
|
|
25290
26137
|
capName: "plate-gallery",
|
|
25291
26138
|
capScope: "system",
|
|
25292
26139
|
addonId: null,
|
|
25293
26140
|
access: "delete"
|
|
25294
26141
|
},
|
|
26142
|
+
"plateGallery.deleteVehicle": {
|
|
26143
|
+
capName: "plate-gallery",
|
|
26144
|
+
capScope: "system",
|
|
26145
|
+
addonId: null,
|
|
26146
|
+
access: "delete"
|
|
26147
|
+
},
|
|
25295
26148
|
"plateGallery.getPlateByTrack": {
|
|
25296
26149
|
capName: "plate-gallery",
|
|
25297
26150
|
capScope: "system",
|
|
@@ -25310,6 +26163,30 @@ Object.freeze({
|
|
|
25310
26163
|
addonId: null,
|
|
25311
26164
|
access: "view"
|
|
25312
26165
|
},
|
|
26166
|
+
"plateGallery.listVehicles": {
|
|
26167
|
+
capName: "plate-gallery",
|
|
26168
|
+
capScope: "system",
|
|
26169
|
+
addonId: null,
|
|
26170
|
+
access: "view"
|
|
26171
|
+
},
|
|
26172
|
+
"plateGallery.listVehicleSamples": {
|
|
26173
|
+
capName: "plate-gallery",
|
|
26174
|
+
capScope: "system",
|
|
26175
|
+
addonId: null,
|
|
26176
|
+
access: "view"
|
|
26177
|
+
},
|
|
26178
|
+
"plateGallery.removeVehicleSample": {
|
|
26179
|
+
capName: "plate-gallery",
|
|
26180
|
+
capScope: "system",
|
|
26181
|
+
addonId: null,
|
|
26182
|
+
access: "delete"
|
|
26183
|
+
},
|
|
26184
|
+
"plateGallery.renameVehicle": {
|
|
26185
|
+
capName: "plate-gallery",
|
|
26186
|
+
capScope: "system",
|
|
26187
|
+
addonId: null,
|
|
26188
|
+
access: "create"
|
|
26189
|
+
},
|
|
25313
26190
|
"plateGallery.searchPlates": {
|
|
25314
26191
|
capName: "plate-gallery",
|
|
25315
26192
|
capScope: "system",
|
|
@@ -25322,6 +26199,18 @@ Object.freeze({
|
|
|
25322
26199
|
addonId: null,
|
|
25323
26200
|
access: "view"
|
|
25324
26201
|
},
|
|
26202
|
+
"plateGallery.unassignPlate": {
|
|
26203
|
+
capName: "plate-gallery",
|
|
26204
|
+
capScope: "system",
|
|
26205
|
+
addonId: null,
|
|
26206
|
+
access: "create"
|
|
26207
|
+
},
|
|
26208
|
+
"plateGallery.unassignPlates": {
|
|
26209
|
+
capName: "plate-gallery",
|
|
26210
|
+
capScope: "system",
|
|
26211
|
+
addonId: null,
|
|
26212
|
+
access: "create"
|
|
26213
|
+
},
|
|
25325
26214
|
"platformProbe.getCapabilities": {
|
|
25326
26215
|
capName: "platform-probe",
|
|
25327
26216
|
capScope: "system",
|
|
@@ -25514,6 +26403,48 @@ Object.freeze({
|
|
|
25514
26403
|
addonId: null,
|
|
25515
26404
|
access: "create"
|
|
25516
26405
|
},
|
|
26406
|
+
"sceneMonitor.captureReference": {
|
|
26407
|
+
capName: "scene-monitor",
|
|
26408
|
+
capScope: "device",
|
|
26409
|
+
addonId: null,
|
|
26410
|
+
access: "create"
|
|
26411
|
+
},
|
|
26412
|
+
"sceneMonitor.createScene": {
|
|
26413
|
+
capName: "scene-monitor",
|
|
26414
|
+
capScope: "device",
|
|
26415
|
+
addonId: null,
|
|
26416
|
+
access: "create"
|
|
26417
|
+
},
|
|
26418
|
+
"sceneMonitor.deleteReference": {
|
|
26419
|
+
capName: "scene-monitor",
|
|
26420
|
+
capScope: "device",
|
|
26421
|
+
addonId: null,
|
|
26422
|
+
access: "delete"
|
|
26423
|
+
},
|
|
26424
|
+
"sceneMonitor.deleteScene": {
|
|
26425
|
+
capName: "scene-monitor",
|
|
26426
|
+
capScope: "device",
|
|
26427
|
+
addonId: null,
|
|
26428
|
+
access: "delete"
|
|
26429
|
+
},
|
|
26430
|
+
"sceneMonitor.listScenes": {
|
|
26431
|
+
capName: "scene-monitor",
|
|
26432
|
+
capScope: "device",
|
|
26433
|
+
addonId: null,
|
|
26434
|
+
access: "view"
|
|
26435
|
+
},
|
|
26436
|
+
"sceneMonitor.recheckNow": {
|
|
26437
|
+
capName: "scene-monitor",
|
|
26438
|
+
capScope: "device",
|
|
26439
|
+
addonId: null,
|
|
26440
|
+
access: "create"
|
|
26441
|
+
},
|
|
26442
|
+
"sceneMonitor.updateScene": {
|
|
26443
|
+
capName: "scene-monitor",
|
|
26444
|
+
capScope: "device",
|
|
26445
|
+
addonId: null,
|
|
26446
|
+
access: "create"
|
|
26447
|
+
},
|
|
25517
26448
|
"scriptRunner.run": {
|
|
25518
26449
|
capName: "script-runner",
|
|
25519
26450
|
capScope: "device",
|
|
@@ -26598,6 +27529,7 @@ Object.freeze({
|
|
|
26598
27529
|
Object.freeze({
|
|
26599
27530
|
"broker": "broker",
|
|
26600
27531
|
"device-export": "device-export",
|
|
27532
|
+
"llm": "ai",
|
|
26601
27533
|
"mesh-network": "mesh",
|
|
26602
27534
|
"mqtt-broker": "broker",
|
|
26603
27535
|
"network-access": "ingress",
|