@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.
@@ -0,0 +1,230 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ /**
4
+ * `model-distributor` — singleton, hub-resident. Pushes a model FORMAT that is
5
+ * already present on the hub's `/data/models` to a target agent node's
6
+ * `/data/models`, sha256-verified, reusing the agent-pull machinery
7
+ * (DeployStageRegistry + the one-time-token bundle route + the agent's
8
+ * `fetchBundleFromHub`). Its provider is built in `server/backend` because it
9
+ * needs the Moleculer broker + the deploy-stage registry, which a forked addon
10
+ * can't reach. `addon-model-studio` drives it via `ctx.api` and owns the
11
+ * per-node availability map.
12
+ */
13
+ export declare const ModelDistributeInputSchema: z.ZodObject<{
14
+ nodeId: z.ZodString;
15
+ modelId: z.ZodString;
16
+ format: z.ZodEnum<{
17
+ onnx: "onnx";
18
+ coreml: "coreml";
19
+ openvino: "openvino";
20
+ tflite: "tflite";
21
+ pt: "pt";
22
+ }>;
23
+ entry: z.ZodObject<{
24
+ id: z.ZodString;
25
+ name: z.ZodString;
26
+ description: z.ZodString;
27
+ formats: z.ZodObject<{
28
+ onnx: z.ZodOptional<z.ZodObject<{
29
+ url: z.ZodString;
30
+ sizeMB: z.ZodNumber;
31
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
32
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
33
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
34
+ node: "node";
35
+ python: "python";
36
+ }>>>>;
37
+ }, z.core.$strip>>;
38
+ coreml: z.ZodOptional<z.ZodObject<{
39
+ url: z.ZodString;
40
+ sizeMB: z.ZodNumber;
41
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
42
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
43
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
44
+ node: "node";
45
+ python: "python";
46
+ }>>>>;
47
+ }, z.core.$strip>>;
48
+ openvino: z.ZodOptional<z.ZodObject<{
49
+ url: z.ZodString;
50
+ sizeMB: z.ZodNumber;
51
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
52
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
53
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
54
+ node: "node";
55
+ python: "python";
56
+ }>>>>;
57
+ }, z.core.$strip>>;
58
+ tflite: z.ZodOptional<z.ZodObject<{
59
+ url: z.ZodString;
60
+ sizeMB: z.ZodNumber;
61
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
62
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
63
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
64
+ node: "node";
65
+ python: "python";
66
+ }>>>>;
67
+ }, z.core.$strip>>;
68
+ pt: z.ZodOptional<z.ZodObject<{
69
+ url: z.ZodString;
70
+ sizeMB: z.ZodNumber;
71
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
72
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
73
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
74
+ node: "node";
75
+ python: "python";
76
+ }>>>>;
77
+ }, z.core.$strip>>;
78
+ }, z.core.$strip>;
79
+ inputSize: z.ZodObject<{
80
+ width: z.ZodNumber;
81
+ height: z.ZodNumber;
82
+ }, z.core.$strip>;
83
+ labels: z.ZodReadonly<z.ZodArray<z.ZodObject<{
84
+ id: z.ZodString;
85
+ name: z.ZodString;
86
+ category: z.ZodOptional<z.ZodString>;
87
+ description: z.ZodOptional<z.ZodString>;
88
+ icon: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>>>;
90
+ inputLayout: z.ZodOptional<z.ZodEnum<{
91
+ nchw: "nchw";
92
+ nhwc: "nhwc";
93
+ }>>;
94
+ inputNormalization: z.ZodOptional<z.ZodEnum<{
95
+ "zero-one": "zero-one";
96
+ imagenet: "imagenet";
97
+ none: "none";
98
+ }>>;
99
+ preprocessMode: z.ZodOptional<z.ZodEnum<{
100
+ letterbox: "letterbox";
101
+ resize: "resize";
102
+ }>>;
103
+ faceAlignment: z.ZodOptional<z.ZodBoolean>;
104
+ extraFiles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
105
+ url: z.ZodString;
106
+ filename: z.ZodString;
107
+ sizeMB: z.ZodNumber;
108
+ }, z.core.$strip>>>>;
109
+ }, z.core.$strip>;
110
+ }, z.core.$strip>;
111
+ export declare const ModelDistributeResultSchema: z.ZodObject<{
112
+ ok: z.ZodBoolean;
113
+ sha256: z.ZodString;
114
+ bytes: z.ZodNumber;
115
+ path: z.ZodString;
116
+ }, z.core.$strip>;
117
+ export declare const modelDistributorCapability: {
118
+ readonly name: "model-distributor";
119
+ readonly scope: "system";
120
+ readonly mode: "singleton";
121
+ readonly internal: true;
122
+ readonly methods: {
123
+ readonly distributeModel: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
124
+ nodeId: z.ZodString;
125
+ modelId: z.ZodString;
126
+ format: z.ZodEnum<{
127
+ onnx: "onnx";
128
+ coreml: "coreml";
129
+ openvino: "openvino";
130
+ tflite: "tflite";
131
+ pt: "pt";
132
+ }>;
133
+ entry: z.ZodObject<{
134
+ id: z.ZodString;
135
+ name: z.ZodString;
136
+ description: z.ZodString;
137
+ formats: z.ZodObject<{
138
+ onnx: z.ZodOptional<z.ZodObject<{
139
+ url: z.ZodString;
140
+ sizeMB: z.ZodNumber;
141
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
142
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
143
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
144
+ node: "node";
145
+ python: "python";
146
+ }>>>>;
147
+ }, z.core.$strip>>;
148
+ coreml: z.ZodOptional<z.ZodObject<{
149
+ url: z.ZodString;
150
+ sizeMB: z.ZodNumber;
151
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
152
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
153
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
154
+ node: "node";
155
+ python: "python";
156
+ }>>>>;
157
+ }, z.core.$strip>>;
158
+ openvino: z.ZodOptional<z.ZodObject<{
159
+ url: z.ZodString;
160
+ sizeMB: z.ZodNumber;
161
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
162
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
163
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
164
+ node: "node";
165
+ python: "python";
166
+ }>>>>;
167
+ }, z.core.$strip>>;
168
+ tflite: z.ZodOptional<z.ZodObject<{
169
+ url: z.ZodString;
170
+ sizeMB: z.ZodNumber;
171
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
172
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
173
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
174
+ node: "node";
175
+ python: "python";
176
+ }>>>>;
177
+ }, z.core.$strip>>;
178
+ pt: z.ZodOptional<z.ZodObject<{
179
+ url: z.ZodString;
180
+ sizeMB: z.ZodNumber;
181
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
182
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
183
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
184
+ node: "node";
185
+ python: "python";
186
+ }>>>>;
187
+ }, z.core.$strip>>;
188
+ }, z.core.$strip>;
189
+ inputSize: z.ZodObject<{
190
+ width: z.ZodNumber;
191
+ height: z.ZodNumber;
192
+ }, z.core.$strip>;
193
+ labels: z.ZodReadonly<z.ZodArray<z.ZodObject<{
194
+ id: z.ZodString;
195
+ name: z.ZodString;
196
+ category: z.ZodOptional<z.ZodString>;
197
+ description: z.ZodOptional<z.ZodString>;
198
+ icon: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strip>>>;
200
+ inputLayout: z.ZodOptional<z.ZodEnum<{
201
+ nchw: "nchw";
202
+ nhwc: "nhwc";
203
+ }>>;
204
+ inputNormalization: z.ZodOptional<z.ZodEnum<{
205
+ "zero-one": "zero-one";
206
+ imagenet: "imagenet";
207
+ none: "none";
208
+ }>>;
209
+ preprocessMode: z.ZodOptional<z.ZodEnum<{
210
+ letterbox: "letterbox";
211
+ resize: "resize";
212
+ }>>;
213
+ faceAlignment: z.ZodOptional<z.ZodBoolean>;
214
+ extraFiles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
215
+ url: z.ZodString;
216
+ filename: z.ZodString;
217
+ sizeMB: z.ZodNumber;
218
+ }, z.core.$strip>>>>;
219
+ }, z.core.$strip>;
220
+ }, z.core.$strip>, z.ZodObject<{
221
+ ok: z.ZodBoolean;
222
+ sha256: z.ZodString;
223
+ bytes: z.ZodNumber;
224
+ path: z.ZodString;
225
+ }, z.core.$strip>, "mutation">;
226
+ };
227
+ };
228
+ export type IModelDistributorProvider = InferProvider<typeof modelDistributorCapability>;
229
+ export type ModelDistributeInput = z.infer<typeof ModelDistributeInputSchema>;
230
+ export type ModelDistributeResult = z.infer<typeof ModelDistributeResultSchema>;
@@ -124,8 +124,8 @@ export declare const storageCapability: {
124
124
  defaultsTo: z.ZodOptional<z.ZodString>;
125
125
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
126
126
  readonly upsertLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
127
- type: z.ZodString;
128
127
  id: z.ZodString;
128
+ type: z.ZodString;
129
129
  displayName: z.ZodString;
130
130
  providerId: z.ZodString;
131
131
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -475,5 +475,11 @@ export declare enum EventCategory {
475
475
  * A container's child set changed (children added/removed/reordered).
476
476
  * Payload: `{ deviceId, childDeviceIds, hiddenChildIds }`.
477
477
  */
478
- AccessoriesChanged = "accessories.onAccessoriesChanged"
478
+ AccessoriesChanged = "accessories.onAccessoriesChanged",
479
+ /**
480
+ * Progress update from a running model conversion job.
481
+ * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
482
+ * Emitted by `addon-model-studio` on the converting node.
483
+ */
484
+ ModelConvertProgress = "model-convert.progress"
479
485
  }