@camstack/types 1.1.0 → 1.1.2
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/alerts.cap.d.ts +5 -5
- package/dist/capabilities/custom-model-registry.cap.d.ts +209 -0
- package/dist/capabilities/index.d.ts +10 -1
- package/dist/capabilities/model-convert.cap.d.ts +218 -0
- package/dist/capabilities/model-distributor.cap.d.ts +230 -0
- package/dist/capabilities/storage.cap.d.ts +1 -1
- package/dist/enums/event-category.d.ts +7 -1
- package/dist/generated/addon-api.d.ts +582 -6
- package/dist/generated/capability-router-map.d.ts +13 -4
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/index.js +268 -1
- package/dist/index.mjs +253 -2
- package/dist/interfaces/capability.d.ts +1 -0
- package/dist/interfaces/event-bus.d.ts +13 -0
- package/dist/{sleep-B1dKJAMJ.mjs → sleep-BV7rLc6Y.mjs} +6 -0
- package/dist/{sleep-p-5TJ_dy.js → sleep-DQ586nj1.js} +6 -0
- package/dist/types/detection.d.ts +6 -0
- package/dist/types/labels.d.ts +9 -7
- package/dist/types/models.d.ts +348 -55
- package/dist/types/pipeline-step.d.ts +2 -0
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ export { consumablesCapability } from '../capabilities/consumables.cap.js';
|
|
|
35
35
|
export { contactCapability } from '../capabilities/contact.cap.js';
|
|
36
36
|
export { controlCapability } from '../capabilities/control.cap.js';
|
|
37
37
|
export { coverCapability } from '../capabilities/cover.cap.js';
|
|
38
|
+
export { customModelRegistryCapability } from '../capabilities/custom-model-registry.cap.js';
|
|
38
39
|
export { decoderCapability } from '../capabilities/decoder.cap.js';
|
|
39
40
|
export { detectionPipelineCapability } from '../capabilities/detection-pipeline.cap.js';
|
|
40
41
|
export { deviceAdoptionCapability } from '../capabilities/device-adoption.cap.js';
|
|
@@ -68,6 +69,8 @@ export { logDestinationCapability } from '../capabilities/log-destination.cap.js
|
|
|
68
69
|
export { mediaPlayerCapability } from '../capabilities/media-player.cap.js';
|
|
69
70
|
export { meshNetworkCapability } from '../capabilities/mesh-network.cap.js';
|
|
70
71
|
export { metricsProviderCapability } from '../capabilities/metrics-provider.cap.js';
|
|
72
|
+
export { modelConvertCapability } from '../capabilities/model-convert.cap.js';
|
|
73
|
+
export { modelDistributorCapability } from '../capabilities/model-distributor.cap.js';
|
|
71
74
|
export { motionCapability } from '../capabilities/motion.cap.js';
|
|
72
75
|
export { motionDetectionCapability } from '../capabilities/motion-detection.cap.js';
|
|
73
76
|
export { motionTriggerCapability } from '../capabilities/motion-trigger.cap.js';
|
|
@@ -169,6 +172,7 @@ export declare const CAPABILITY_NAMES: {
|
|
|
169
172
|
readonly contact: "contact";
|
|
170
173
|
readonly control: "control";
|
|
171
174
|
readonly cover: "cover";
|
|
175
|
+
readonly customModelRegistry: "custom-model-registry";
|
|
172
176
|
readonly decoder: "decoder";
|
|
173
177
|
readonly detectionPipeline: "detection-pipeline";
|
|
174
178
|
readonly deviceAdoption: "device-adoption";
|
|
@@ -202,6 +206,8 @@ export declare const CAPABILITY_NAMES: {
|
|
|
202
206
|
readonly mediaPlayer: "media-player";
|
|
203
207
|
readonly meshNetwork: "mesh-network";
|
|
204
208
|
readonly metricsProvider: "metrics-provider";
|
|
209
|
+
readonly modelConvert: "model-convert";
|
|
210
|
+
readonly modelDistributor: "model-distributor";
|
|
205
211
|
readonly motion: "motion";
|
|
206
212
|
readonly motionDetection: "motion-detection";
|
|
207
213
|
readonly motionTrigger: "motion-trigger";
|
|
@@ -316,6 +322,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
316
322
|
readonly contact: TRouter;
|
|
317
323
|
readonly control: TRouter;
|
|
318
324
|
readonly cover: TRouter;
|
|
325
|
+
readonly customModelRegistry: TRouter;
|
|
319
326
|
readonly decoder: TRouter;
|
|
320
327
|
readonly detectionPipeline: TRouter;
|
|
321
328
|
readonly deviceAdoption: TRouter;
|
|
@@ -349,6 +356,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
349
356
|
readonly mediaPlayer: TRouter;
|
|
350
357
|
readonly meshNetwork: TRouter;
|
|
351
358
|
readonly metricsProvider: TRouter;
|
|
359
|
+
readonly modelConvert: TRouter;
|
|
360
|
+
readonly modelDistributor: TRouter;
|
|
352
361
|
readonly motion: TRouter;
|
|
353
362
|
readonly motionDetection: TRouter;
|
|
354
363
|
readonly motionTrigger: TRouter;
|
|
@@ -413,12 +422,12 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
413
422
|
readonly zoneRules: TRouter;
|
|
414
423
|
readonly zones: TRouter;
|
|
415
424
|
}
|
|
416
|
-
/** Capability names whose mode is `singleton` (
|
|
417
|
-
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "advanced-notifier", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "integrations", "intercom", "lawn-mower-control", "local-network", "lock-control", "media-player", "metrics-provider", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notifier", "numeric-sensor", "osd", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "script-runner", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "streaming-engine", "switch", "system", "tamper", "temperature-sensor", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
425
|
+
/** Capability names whose mode is `singleton` (113 caps). */
|
|
426
|
+
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "advanced-notifier", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "integrations", "intercom", "lawn-mower-control", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notifier", "numeric-sensor", "osd", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "script-runner", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "streaming-engine", "switch", "system", "tamper", "temperature-sensor", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
418
427
|
/** Union of singleton capability names (literal string union). */
|
|
419
428
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
420
|
-
/** Capability names whose mode is `collection` (
|
|
421
|
-
export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "device-export", "device-provider", "embedding-encoder", "log-destination", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "restreamer", "smtp-provider", "snapshot-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys", "webrtc"];
|
|
429
|
+
/** Capability names whose mode is `collection` (23 caps). */
|
|
430
|
+
export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "custom-model-registry", "device-export", "device-provider", "embedding-encoder", "log-destination", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "restreamer", "smtp-provider", "snapshot-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys", "webrtc"];
|
|
422
431
|
/** Union of collection capability names (literal string union). */
|
|
423
432
|
export type CollectionCapabilityName = typeof COLLECTION_CAPABILITY_NAMES[number];
|
|
424
433
|
/** Capability mode lookup at runtime — mirrors the `.cap.ts` definitions. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 706 method paths across 110 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-DQ586nj1.js");
|
|
3
3
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region src/health/wiring-health.ts
|
|
@@ -54,6 +54,15 @@ var wiringHealthSnapshotSchema = zod.z.object({
|
|
|
54
54
|
})
|
|
55
55
|
});
|
|
56
56
|
//#endregion
|
|
57
|
+
//#region src/types/labels.ts
|
|
58
|
+
var LabelDefinitionSchema = zod.z.object({
|
|
59
|
+
id: zod.z.string(),
|
|
60
|
+
name: zod.z.string(),
|
|
61
|
+
category: zod.z.string().optional(),
|
|
62
|
+
description: zod.z.string().optional(),
|
|
63
|
+
icon: zod.z.string().optional()
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
57
66
|
//#region src/types/models.ts
|
|
58
67
|
var MODEL_FORMATS = [
|
|
59
68
|
"onnx",
|
|
@@ -62,6 +71,121 @@ var MODEL_FORMATS = [
|
|
|
62
71
|
"tflite",
|
|
63
72
|
"pt"
|
|
64
73
|
];
|
|
74
|
+
/**
|
|
75
|
+
* Multi-file format payload.
|
|
76
|
+
*
|
|
77
|
+
* - Directory formats (`isDirectory: true`, e.g. `.mlpackage`): files
|
|
78
|
+
* relative to the directory root — the downloader fetches each from
|
|
79
|
+
* `{url}/{file}` into `{modelDir}/{file}`. If omitted, it probes the
|
|
80
|
+
* HuggingFace API (slower).
|
|
81
|
+
* - Single-file formats (no `isDirectory`, e.g. OpenVINO IR): sibling
|
|
82
|
+
* files fetched from the SAME remote directory as `url` and stored flat
|
|
83
|
+
* alongside the main file — e.g. `['camstack-yolov9t.bin']` for the IR
|
|
84
|
+
* weights next to `camstack-yolov9t.xml`.
|
|
85
|
+
*/
|
|
86
|
+
var ModelFormatEntrySchema = zod.z.object({
|
|
87
|
+
url: zod.z.string(),
|
|
88
|
+
sizeMB: zod.z.number(),
|
|
89
|
+
/** Whether this format is a directory bundle (e.g., .mlpackage) rather than a single file */
|
|
90
|
+
isDirectory: zod.z.boolean().optional(),
|
|
91
|
+
/** Multi-file payload (directory members or sibling files). */
|
|
92
|
+
files: zod.z.array(zod.z.string()).readonly().optional(),
|
|
93
|
+
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
94
|
+
runtimes: zod.z.array(zod.z.enum(["node", "python"])).readonly().optional()
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
98
|
+
* The downloader fetches from `url` and saves to `{modelsDir}/{filename}`.
|
|
99
|
+
*/
|
|
100
|
+
var ModelExtraFileSchema = zod.z.object({
|
|
101
|
+
url: zod.z.string(),
|
|
102
|
+
filename: zod.z.string(),
|
|
103
|
+
sizeMB: zod.z.number()
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Per-format payload map. Modelled as an explicit object (one optional key
|
|
107
|
+
* per `ModelFormat`) rather than `z.record(enum, …)` — zod v4's enum-keyed
|
|
108
|
+
* record requires every key, but a catalog entry only ships a subset of
|
|
109
|
+
* formats.
|
|
110
|
+
*/
|
|
111
|
+
var ModelFormatsSchema = zod.z.object({
|
|
112
|
+
onnx: ModelFormatEntrySchema.optional(),
|
|
113
|
+
coreml: ModelFormatEntrySchema.optional(),
|
|
114
|
+
openvino: ModelFormatEntrySchema.optional(),
|
|
115
|
+
tflite: ModelFormatEntrySchema.optional(),
|
|
116
|
+
pt: ModelFormatEntrySchema.optional()
|
|
117
|
+
});
|
|
118
|
+
var ModelCatalogEntrySchema = zod.z.object({
|
|
119
|
+
id: zod.z.string(),
|
|
120
|
+
name: zod.z.string(),
|
|
121
|
+
description: zod.z.string(),
|
|
122
|
+
formats: ModelFormatsSchema,
|
|
123
|
+
inputSize: zod.z.object({
|
|
124
|
+
width: zod.z.number(),
|
|
125
|
+
height: zod.z.number()
|
|
126
|
+
}),
|
|
127
|
+
labels: zod.z.array(LabelDefinitionSchema).readonly(),
|
|
128
|
+
inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
|
|
129
|
+
inputNormalization: zod.z.enum([
|
|
130
|
+
"zero-one",
|
|
131
|
+
"imagenet",
|
|
132
|
+
"none"
|
|
133
|
+
]).optional(),
|
|
134
|
+
preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
|
|
135
|
+
/**
|
|
136
|
+
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
137
|
+
* onto the canonical template) before this step runs, instead of a plain
|
|
138
|
+
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
139
|
+
* their embeddings are only discriminative on an aligned input. The face
|
|
140
|
+
* detector that produced the parent detail must emit 5 landmarks.
|
|
141
|
+
*/
|
|
142
|
+
faceAlignment: zod.z.boolean().optional(),
|
|
143
|
+
/**
|
|
144
|
+
* Auxiliary files required at runtime (labels JSON, charset dict, etc.).
|
|
145
|
+
* Downloaded into the same modelsDir alongside the model file.
|
|
146
|
+
*/
|
|
147
|
+
extraFiles: zod.z.array(ModelExtraFileSchema).readonly().optional()
|
|
148
|
+
});
|
|
149
|
+
var ConvertTargetSchema = zod.z.discriminatedUnion("format", [zod.z.object({
|
|
150
|
+
format: zod.z.literal("openvino"),
|
|
151
|
+
precisions: zod.z.array(zod.z.enum(["fp16", "int8"])).min(1).readonly()
|
|
152
|
+
}), zod.z.object({ format: zod.z.literal("coreml") })]);
|
|
153
|
+
var ModelConvertMetadataSchema = zod.z.object({
|
|
154
|
+
id: zod.z.string().regex(/^[a-zA-Z0-9._-]+$/),
|
|
155
|
+
name: zod.z.string(),
|
|
156
|
+
labels: zod.z.array(LabelDefinitionSchema).readonly(),
|
|
157
|
+
inputSize: zod.z.object({
|
|
158
|
+
width: zod.z.number(),
|
|
159
|
+
height: zod.z.number()
|
|
160
|
+
}),
|
|
161
|
+
inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
|
|
162
|
+
inputNormalization: zod.z.enum([
|
|
163
|
+
"zero-one",
|
|
164
|
+
"imagenet",
|
|
165
|
+
"none"
|
|
166
|
+
]).optional(),
|
|
167
|
+
preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
|
|
168
|
+
outputFormat: zod.z.enum([
|
|
169
|
+
"yolo",
|
|
170
|
+
"ssd",
|
|
171
|
+
"embedding",
|
|
172
|
+
"classification",
|
|
173
|
+
"ocr",
|
|
174
|
+
"segmentation"
|
|
175
|
+
]),
|
|
176
|
+
faceAlignment: zod.z.boolean().optional()
|
|
177
|
+
});
|
|
178
|
+
var ConvertArtifactSchema = zod.z.object({
|
|
179
|
+
format: zod.z.enum(MODEL_FORMATS),
|
|
180
|
+
precision: zod.z.enum(["fp16", "int8"]).optional(),
|
|
181
|
+
sizeMB: zod.z.number(),
|
|
182
|
+
validated: zod.z.boolean(),
|
|
183
|
+
files: zod.z.array(zod.z.string()).readonly()
|
|
184
|
+
});
|
|
185
|
+
var ConvertResultSchema = zod.z.object({
|
|
186
|
+
entry: ModelCatalogEntrySchema,
|
|
187
|
+
artifacts: zod.z.array(ConvertArtifactSchema).readonly()
|
|
188
|
+
});
|
|
65
189
|
//#endregion
|
|
66
190
|
//#region src/interfaces/addon.ts
|
|
67
191
|
var DEFAULT_ADDON_PLACEMENT = "hub-only";
|
|
@@ -13075,6 +13199,91 @@ var addonWidgetsCapability = {
|
|
|
13075
13199
|
methods: { listWidgets: require_sleep.method(zod.z.void(), zod.z.array(EnrichedWidgetMetadataSchema).readonly()) }
|
|
13076
13200
|
};
|
|
13077
13201
|
//#endregion
|
|
13202
|
+
//#region src/capabilities/custom-model-registry.cap.ts
|
|
13203
|
+
/**
|
|
13204
|
+
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13205
|
+
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
13206
|
+
* contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
|
|
13207
|
+
* them across providers (`concatCollection`).
|
|
13208
|
+
*
|
|
13209
|
+
* The detection-pipeline is *aware* of this cap: when at least one provider
|
|
13210
|
+
* exists it unions these descriptors into the per-step model picker and the
|
|
13211
|
+
* runtime model-resolution path, alongside the static catalog. When no
|
|
13212
|
+
* provider exists the consumer no-ops entirely (identical to the catalog-only
|
|
13213
|
+
* behaviour).
|
|
13214
|
+
*
|
|
13215
|
+
* A descriptor carries a full `ModelCatalogEntry` directly — the same shape
|
|
13216
|
+
* the static catalog uses — so the existing download/resolution code consumes
|
|
13217
|
+
* it unchanged. `stepId` is the detection step the model targets
|
|
13218
|
+
* (e.g. `'object-detection'`).
|
|
13219
|
+
*/
|
|
13220
|
+
var CustomModelDescriptorSchema = zod.z.object({
|
|
13221
|
+
stepId: zod.z.string(),
|
|
13222
|
+
entry: ModelCatalogEntrySchema
|
|
13223
|
+
});
|
|
13224
|
+
var customModelRegistryCapability = {
|
|
13225
|
+
name: "custom-model-registry",
|
|
13226
|
+
scope: "system",
|
|
13227
|
+
mode: "collection",
|
|
13228
|
+
internal: true,
|
|
13229
|
+
methods: { listModels: require_sleep.method(zod.z.void(), zod.z.array(CustomModelDescriptorSchema).readonly()) }
|
|
13230
|
+
};
|
|
13231
|
+
//#endregion
|
|
13232
|
+
//#region src/capabilities/model-distributor.cap.ts
|
|
13233
|
+
/**
|
|
13234
|
+
* `model-distributor` — singleton, hub-resident. Pushes a model FORMAT that is
|
|
13235
|
+
* already present on the hub's `/data/models` to a target agent node's
|
|
13236
|
+
* `/data/models`, sha256-verified, reusing the agent-pull machinery
|
|
13237
|
+
* (DeployStageRegistry + the one-time-token bundle route + the agent's
|
|
13238
|
+
* `fetchBundleFromHub`). Its provider is built in `server/backend` because it
|
|
13239
|
+
* needs the Moleculer broker + the deploy-stage registry, which a forked addon
|
|
13240
|
+
* can't reach. `addon-model-studio` drives it via `ctx.api` and owns the
|
|
13241
|
+
* per-node availability map.
|
|
13242
|
+
*/
|
|
13243
|
+
var ModelDistributeInputSchema = zod.z.object({
|
|
13244
|
+
nodeId: zod.z.string(),
|
|
13245
|
+
modelId: zod.z.string(),
|
|
13246
|
+
format: zod.z.enum(MODEL_FORMATS),
|
|
13247
|
+
entry: ModelCatalogEntrySchema
|
|
13248
|
+
});
|
|
13249
|
+
var ModelDistributeResultSchema = zod.z.object({
|
|
13250
|
+
ok: zod.z.boolean(),
|
|
13251
|
+
/** sha256 of the staged tarball (empty for a hub-local no-op). */
|
|
13252
|
+
sha256: zod.z.string(),
|
|
13253
|
+
bytes: zod.z.number(),
|
|
13254
|
+
/** The target node's modelsDir the artifact landed in. */
|
|
13255
|
+
path: zod.z.string()
|
|
13256
|
+
});
|
|
13257
|
+
var modelDistributorCapability = {
|
|
13258
|
+
name: "model-distributor",
|
|
13259
|
+
scope: "system",
|
|
13260
|
+
mode: "singleton",
|
|
13261
|
+
internal: true,
|
|
13262
|
+
methods: { distributeModel: require_sleep.method(ModelDistributeInputSchema, ModelDistributeResultSchema, {
|
|
13263
|
+
kind: "mutation",
|
|
13264
|
+
auth: "admin"
|
|
13265
|
+
}) }
|
|
13266
|
+
};
|
|
13267
|
+
//#endregion
|
|
13268
|
+
//#region src/capabilities/model-convert.cap.ts
|
|
13269
|
+
var ModelConvertInputSchema = zod.z.object({
|
|
13270
|
+
sourceUrl: zod.z.string(),
|
|
13271
|
+
metadata: ModelConvertMetadataSchema,
|
|
13272
|
+
targets: zod.z.array(ConvertTargetSchema).min(1).readonly(),
|
|
13273
|
+
calibrationRef: zod.z.string().optional(),
|
|
13274
|
+
sessionId: zod.z.string().optional()
|
|
13275
|
+
});
|
|
13276
|
+
var modelConvertCapability = {
|
|
13277
|
+
name: "model-convert",
|
|
13278
|
+
scope: "system",
|
|
13279
|
+
mode: "singleton",
|
|
13280
|
+
internal: true,
|
|
13281
|
+
methods: { convert: require_sleep.method(ModelConvertInputSchema, ConvertResultSchema, {
|
|
13282
|
+
kind: "mutation",
|
|
13283
|
+
auth: "admin"
|
|
13284
|
+
}) }
|
|
13285
|
+
};
|
|
13286
|
+
//#endregion
|
|
13078
13287
|
//#region src/capabilities/addon-routes.cap.ts
|
|
13079
13288
|
var AddonHttpRouteSchema = zod.z.object({
|
|
13080
13289
|
method: zod.z.enum([
|
|
@@ -19575,6 +19784,7 @@ var CAPABILITY_NAMES = {
|
|
|
19575
19784
|
contact: "contact",
|
|
19576
19785
|
control: "control",
|
|
19577
19786
|
cover: "cover",
|
|
19787
|
+
customModelRegistry: "custom-model-registry",
|
|
19578
19788
|
decoder: "decoder",
|
|
19579
19789
|
detectionPipeline: "detection-pipeline",
|
|
19580
19790
|
deviceAdoption: "device-adoption",
|
|
@@ -19608,6 +19818,8 @@ var CAPABILITY_NAMES = {
|
|
|
19608
19818
|
mediaPlayer: "media-player",
|
|
19609
19819
|
meshNetwork: "mesh-network",
|
|
19610
19820
|
metricsProvider: "metrics-provider",
|
|
19821
|
+
modelConvert: "model-convert",
|
|
19822
|
+
modelDistributor: "model-distributor",
|
|
19611
19823
|
motion: "motion",
|
|
19612
19824
|
motionDetection: "motion-detection",
|
|
19613
19825
|
motionTrigger: "motion-trigger",
|
|
@@ -19822,6 +20034,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
19822
20034
|
key: "cover",
|
|
19823
20035
|
name: "cover"
|
|
19824
20036
|
},
|
|
20037
|
+
{
|
|
20038
|
+
key: "customModelRegistry",
|
|
20039
|
+
name: "custom-model-registry"
|
|
20040
|
+
},
|
|
19825
20041
|
{
|
|
19826
20042
|
key: "decoder",
|
|
19827
20043
|
name: "decoder"
|
|
@@ -19954,6 +20170,14 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
19954
20170
|
key: "metricsProvider",
|
|
19955
20171
|
name: "metrics-provider"
|
|
19956
20172
|
},
|
|
20173
|
+
{
|
|
20174
|
+
key: "modelConvert",
|
|
20175
|
+
name: "model-convert"
|
|
20176
|
+
},
|
|
20177
|
+
{
|
|
20178
|
+
key: "modelDistributor",
|
|
20179
|
+
name: "model-distributor"
|
|
20180
|
+
},
|
|
19957
20181
|
{
|
|
19958
20182
|
key: "motion",
|
|
19959
20183
|
name: "motion"
|
|
@@ -20254,6 +20478,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
20254
20478
|
contactCapability,
|
|
20255
20479
|
controlCapability,
|
|
20256
20480
|
coverCapability,
|
|
20481
|
+
customModelRegistryCapability,
|
|
20257
20482
|
decoderCapability,
|
|
20258
20483
|
detectionPipelineCapability,
|
|
20259
20484
|
deviceAdoptionCapability,
|
|
@@ -20287,6 +20512,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
20287
20512
|
mediaPlayerCapability,
|
|
20288
20513
|
meshNetworkCapability,
|
|
20289
20514
|
metricsProviderCapability,
|
|
20515
|
+
modelConvertCapability,
|
|
20516
|
+
modelDistributorCapability,
|
|
20290
20517
|
motionCapability,
|
|
20291
20518
|
motionDetectionCapability,
|
|
20292
20519
|
motionTriggerCapability,
|
|
@@ -21249,6 +21476,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21249
21476
|
addonId: null,
|
|
21250
21477
|
access: "create"
|
|
21251
21478
|
},
|
|
21479
|
+
"customModelRegistry.listModels": {
|
|
21480
|
+
capName: "custom-model-registry",
|
|
21481
|
+
capScope: "system",
|
|
21482
|
+
addonId: null,
|
|
21483
|
+
access: "view"
|
|
21484
|
+
},
|
|
21252
21485
|
"decoder.createSession": {
|
|
21253
21486
|
capName: "decoder",
|
|
21254
21487
|
capScope: "system",
|
|
@@ -22473,6 +22706,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22473
22706
|
addonId: null,
|
|
22474
22707
|
access: "view"
|
|
22475
22708
|
},
|
|
22709
|
+
"modelConvert.convert": {
|
|
22710
|
+
capName: "model-convert",
|
|
22711
|
+
capScope: "system",
|
|
22712
|
+
addonId: null,
|
|
22713
|
+
access: "create"
|
|
22714
|
+
},
|
|
22715
|
+
"modelDistributor.distributeModel": {
|
|
22716
|
+
capName: "model-distributor",
|
|
22717
|
+
capScope: "system",
|
|
22718
|
+
addonId: null,
|
|
22719
|
+
access: "create"
|
|
22720
|
+
},
|
|
22476
22721
|
"motion.isDetected": {
|
|
22477
22722
|
capName: "motion",
|
|
22478
22723
|
capScope: "device",
|
|
@@ -24678,6 +24923,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
24678
24923
|
"consumables",
|
|
24679
24924
|
"control",
|
|
24680
24925
|
"cover",
|
|
24926
|
+
"custom-model-registry",
|
|
24681
24927
|
"decoder",
|
|
24682
24928
|
"device-adoption",
|
|
24683
24929
|
"device-discovery",
|
|
@@ -24701,6 +24947,8 @@ var KNOWN_CAP_NAMES = [
|
|
|
24701
24947
|
"media-player",
|
|
24702
24948
|
"mesh-network",
|
|
24703
24949
|
"metrics-provider",
|
|
24950
|
+
"model-convert",
|
|
24951
|
+
"model-distributor",
|
|
24704
24952
|
"motion",
|
|
24705
24953
|
"motion-detection",
|
|
24706
24954
|
"motion-trigger",
|
|
@@ -24826,6 +25074,7 @@ var SYSTEM_CAP_NAMES = [
|
|
|
24826
25074
|
"auth-provider",
|
|
24827
25075
|
"backup",
|
|
24828
25076
|
"broker",
|
|
25077
|
+
"custom-model-registry",
|
|
24829
25078
|
"decoder",
|
|
24830
25079
|
"device-adoption",
|
|
24831
25080
|
"device-export",
|
|
@@ -24840,6 +25089,8 @@ var SYSTEM_CAP_NAMES = [
|
|
|
24840
25089
|
"log-destination",
|
|
24841
25090
|
"mesh-network",
|
|
24842
25091
|
"metrics-provider",
|
|
25092
|
+
"model-convert",
|
|
25093
|
+
"model-distributor",
|
|
24843
25094
|
"mqtt-broker",
|
|
24844
25095
|
"network-access",
|
|
24845
25096
|
"network-quality",
|
|
@@ -25567,6 +25818,9 @@ exports.ConsumablesStatusSchema = ConsumablesStatusSchema;
|
|
|
25567
25818
|
exports.ContactStatusSchema = ContactStatusSchema;
|
|
25568
25819
|
exports.ControlKindSchema = ControlKindSchema;
|
|
25569
25820
|
exports.ControlStatusSchema = ControlStatusSchema;
|
|
25821
|
+
exports.ConvertArtifactSchema = ConvertArtifactSchema;
|
|
25822
|
+
exports.ConvertResultSchema = ConvertResultSchema;
|
|
25823
|
+
exports.ConvertTargetSchema = ConvertTargetSchema;
|
|
25570
25824
|
exports.CoverStateSchema = CoverStateSchema;
|
|
25571
25825
|
exports.CoverStatusSchema = CoverStatusSchema;
|
|
25572
25826
|
exports.CreateApiKeyInputSchema = CreateApiKeyInputSchema;
|
|
@@ -25576,6 +25830,7 @@ exports.CreateScopedTokenInputSchema = CreateScopedTokenInputSchema;
|
|
|
25576
25830
|
exports.CreateScopedTokenResultSchema = CreateScopedTokenResultSchema;
|
|
25577
25831
|
exports.CreateUserInputSchema = CreateUserInputSchema;
|
|
25578
25832
|
exports.CustomActionInputSchema = CustomActionInputSchema;
|
|
25833
|
+
exports.CustomModelDescriptorSchema = CustomModelDescriptorSchema;
|
|
25579
25834
|
exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
|
|
25580
25835
|
exports.DEFAULT_ADDON_PLACEMENT = DEFAULT_ADDON_PLACEMENT;
|
|
25581
25836
|
exports.DEFAULT_AUDIO_ANALYZER_CONFIG = DEFAULT_AUDIO_ANALYZER_CONFIG;
|
|
@@ -25658,6 +25913,7 @@ exports.IntegrationWithStateSchema = IntegrationWithStateSchema;
|
|
|
25658
25913
|
exports.IntercomAbilitySchema = IntercomAbilitySchema;
|
|
25659
25914
|
exports.IntercomStatusSchema = IntercomStatusSchema;
|
|
25660
25915
|
exports.KNOWN_CAP_NAMES = KNOWN_CAP_NAMES;
|
|
25916
|
+
exports.LabelDefinitionSchema = LabelDefinitionSchema;
|
|
25661
25917
|
exports.LawnMowerActivitySchema = LawnMowerActivitySchema;
|
|
25662
25918
|
exports.LawnMowerControlStatusSchema = LawnMowerControlStatusSchema;
|
|
25663
25919
|
exports.LocateSegmentResultSchema = LocateSegmentResultSchema;
|
|
@@ -25686,6 +25942,14 @@ exports.MediaPlayerStatusSchema = MediaPlayerStatusSchema;
|
|
|
25686
25942
|
exports.MeshPeerSchema = MeshPeerSchema;
|
|
25687
25943
|
exports.MeshStatusSchema = MeshStatusSchema;
|
|
25688
25944
|
exports.MethodAccessSchema = MethodAccessSchema;
|
|
25945
|
+
exports.ModelCatalogEntrySchema = ModelCatalogEntrySchema;
|
|
25946
|
+
exports.ModelConvertInputSchema = ModelConvertInputSchema;
|
|
25947
|
+
exports.ModelConvertMetadataSchema = ModelConvertMetadataSchema;
|
|
25948
|
+
exports.ModelDistributeInputSchema = ModelDistributeInputSchema;
|
|
25949
|
+
exports.ModelDistributeResultSchema = ModelDistributeResultSchema;
|
|
25950
|
+
exports.ModelExtraFileSchema = ModelExtraFileSchema;
|
|
25951
|
+
exports.ModelFormatEntrySchema = ModelFormatEntrySchema;
|
|
25952
|
+
exports.ModelFormatsSchema = ModelFormatsSchema;
|
|
25689
25953
|
exports.MotionAnalysisResultSchema = MotionAnalysisResultSchema;
|
|
25690
25954
|
exports.MotionEventSchema = MotionEventSchema;
|
|
25691
25955
|
exports.MotionOnMotionChangedDataSchema = MotionOnMotionChangedDataSchema;
|
|
@@ -25959,6 +26223,7 @@ exports.createRuntimeStateBridge = createRuntimeStateBridge;
|
|
|
25959
26223
|
exports.createSliceHandle = require_sleep.createSliceHandle;
|
|
25960
26224
|
exports.createSystemProxy = createSystemProxy;
|
|
25961
26225
|
exports.customAction = customAction;
|
|
26226
|
+
exports.customModelRegistryCapability = customModelRegistryCapability;
|
|
25962
26227
|
exports.decoderCapability = decoderCapability;
|
|
25963
26228
|
exports.defaultDeviceFor = defaultDeviceFor;
|
|
25964
26229
|
exports.defineCustomActions = defineCustomActions;
|
|
@@ -26032,6 +26297,8 @@ exports.meshNetworkCapability = meshNetworkCapability;
|
|
|
26032
26297
|
exports.method = require_sleep.method;
|
|
26033
26298
|
exports.metricsProviderCapability = metricsProviderCapability;
|
|
26034
26299
|
exports.migrateConfigToBands = migrateConfigToBands;
|
|
26300
|
+
exports.modelConvertCapability = modelConvertCapability;
|
|
26301
|
+
exports.modelDistributorCapability = modelDistributorCapability;
|
|
26035
26302
|
exports.modelFormatForRuntime = modelFormatForRuntime;
|
|
26036
26303
|
exports.motionCapability = motionCapability;
|
|
26037
26304
|
exports.motionDetectionCapability = motionDetectionCapability;
|