@camstack/types 1.2.401 → 1.2.403

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/auth/credential-scope.d.ts +23 -3
  4. package/dist/auth/viewer-access.d.ts +112 -0
  5. package/dist/capabilities/capability-definition.d.ts +14 -0
  6. package/dist/capabilities/face-gallery.cap.d.ts +3 -0
  7. package/dist/capabilities/index.d.ts +2 -2
  8. package/dist/capabilities/pipeline-analytics.cap.d.ts +79 -0
  9. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +28 -0
  10. package/dist/capabilities/plate-gallery.cap.d.ts +3 -0
  11. package/dist/capabilities/platform-probe.cap.d.ts +74 -0
  12. package/dist/capabilities/scene-monitor.cap.d.ts +3 -0
  13. package/dist/capabilities/user-management.cap.d.ts +108 -18
  14. package/dist/client.js +15 -0
  15. package/dist/client.mjs +15 -0
  16. package/dist/clips/clip-event-labels.d.ts +96 -0
  17. package/dist/device/cap-vocabulary/entries/actuators.d.ts +5 -0
  18. package/dist/device/cap-vocabulary/entries/appliances.d.ts +5 -0
  19. package/dist/device/cap-vocabulary/entries/camera.d.ts +5 -0
  20. package/dist/device/cap-vocabulary/entries/sensors.d.ts +5 -0
  21. package/dist/device/cap-vocabulary/entries/system.d.ts +8 -0
  22. package/dist/device/cap-vocabulary/index.d.ts +9 -0
  23. package/dist/device/cap-vocabulary/l10n.d.ts +7 -0
  24. package/dist/device/cap-vocabulary/resolve.d.ts +100 -0
  25. package/dist/device/cap-vocabulary/templates.d.ts +11 -0
  26. package/dist/device/cap-vocabulary/types.d.ts +398 -0
  27. package/dist/device/cap-vocabulary/vocabulary.d.ts +5 -0
  28. package/dist/device/device-do-actions.d.ts +8 -2
  29. package/dist/generated/addon-api.d.ts +52 -0
  30. package/dist/generated/method-access-map.d.ts +4 -1
  31. package/dist/generated/system-proxy.d.ts +1 -1
  32. package/dist/index.d.ts +6 -2
  33. package/dist/index.js +7384 -1893
  34. package/dist/index.mjs +7355 -1894
  35. package/dist/interfaces/api-responses.d.ts +1 -1
  36. package/dist/interfaces/auth.d.ts +2 -2
  37. package/dist/interfaces/birth-decision-ledger.d.ts +17 -0
  38. package/dist/pipeline/load-balancing/effective-shares.d.ts +6 -0
  39. package/dist/schemas/auth-records.d.ts +77 -13
  40. package/dist/schemas/device-selector.d.ts +23 -4
  41. package/dist/{sleep-CUp20JkO.mjs → sleep-6AqUnQIT.mjs} +1 -0
  42. package/dist/{sleep-DVovpDRU.js → sleep-Ch67uumJ.js} +1 -0
  43. package/dist/types/detection.d.ts +9 -0
  44. package/package.json +1 -1
@@ -6,7 +6,17 @@ declare const UserSummarySchema: z.ZodObject<{
6
6
  isAdmin: z.ZodDefault<z.ZodBoolean>;
7
7
  allowedProviders: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
8
8
  allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
9
- scopes: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
9
+ scopes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
10
+ type: z.ZodLiteral<"viewer">;
11
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
12
+ block: z.ZodArray<z.ZodNumber>;
13
+ features: z.ZodArray<z.ZodEnum<{
14
+ "face-assignment": "face-assignment";
15
+ "plate-assignment": "plate-assignment";
16
+ retrain: "retrain";
17
+ scenes: "scenes";
18
+ }>>;
19
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
10
20
  type: z.ZodLiteral<"category">;
11
21
  target: z.ZodEnum<{
12
22
  device: "device";
@@ -53,7 +63,7 @@ declare const UserSummarySchema: z.ZodObject<{
53
63
  view: "view";
54
64
  }>>;
55
65
  includeLinked: z.ZodOptional<z.ZodBoolean>;
56
- }, z.core.$strip>], "type">>>>;
66
+ }, z.core.$strip>], "type">>]>>>;
57
67
  totpEnabled: z.ZodDefault<z.ZodBoolean>;
58
68
  createdAt: z.ZodNumber;
59
69
  updatedAt: z.ZodNumber;
@@ -64,7 +74,17 @@ declare const CreateUserInputSchema: z.ZodObject<{
64
74
  isAdmin: z.ZodDefault<z.ZodBoolean>;
65
75
  allowedProviders: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
66
76
  allowedDevices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>>;
67
- scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
77
+ scopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
78
+ type: z.ZodLiteral<"viewer">;
79
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
80
+ block: z.ZodArray<z.ZodNumber>;
81
+ features: z.ZodArray<z.ZodEnum<{
82
+ "face-assignment": "face-assignment";
83
+ "plate-assignment": "plate-assignment";
84
+ retrain: "retrain";
85
+ scenes: "scenes";
86
+ }>>;
87
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
68
88
  type: z.ZodLiteral<"category">;
69
89
  target: z.ZodEnum<{
70
90
  device: "device";
@@ -111,14 +131,24 @@ declare const CreateUserInputSchema: z.ZodObject<{
111
131
  view: "view";
112
132
  }>>;
113
133
  includeLinked: z.ZodOptional<z.ZodBoolean>;
114
- }, z.core.$strip>], "type">>>>;
134
+ }, z.core.$strip>], "type">>]>>>;
115
135
  }, z.core.$strip>;
116
136
  declare const UpdateUserInputSchema: z.ZodObject<{
117
137
  id: z.ZodString;
118
138
  isAdmin: z.ZodOptional<z.ZodBoolean>;
119
139
  allowedProviders: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
120
140
  allowedDevices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>>;
121
- scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
141
+ scopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
142
+ type: z.ZodLiteral<"viewer">;
143
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
144
+ block: z.ZodArray<z.ZodNumber>;
145
+ features: z.ZodArray<z.ZodEnum<{
146
+ "face-assignment": "face-assignment";
147
+ "plate-assignment": "plate-assignment";
148
+ retrain: "retrain";
149
+ scenes: "scenes";
150
+ }>>;
151
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
122
152
  type: z.ZodLiteral<"category">;
123
153
  target: z.ZodEnum<{
124
154
  device: "device";
@@ -165,7 +195,7 @@ declare const UpdateUserInputSchema: z.ZodObject<{
165
195
  view: "view";
166
196
  }>>;
167
197
  includeLinked: z.ZodOptional<z.ZodBoolean>;
168
- }, z.core.$strip>], "type">>>>;
198
+ }, z.core.$strip>], "type">>]>>>;
169
199
  }, z.core.$strip>;
170
200
  declare const OauthSessionSummarySchema: z.ZodObject<{
171
201
  id: z.ZodString;
@@ -256,7 +286,17 @@ export declare const userManagementCapability: {
256
286
  isAdmin: z.ZodDefault<z.ZodBoolean>;
257
287
  allowedProviders: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
258
288
  allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
259
- scopes: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
289
+ scopes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
290
+ type: z.ZodLiteral<"viewer">;
291
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
292
+ block: z.ZodArray<z.ZodNumber>;
293
+ features: z.ZodArray<z.ZodEnum<{
294
+ "face-assignment": "face-assignment";
295
+ "plate-assignment": "plate-assignment";
296
+ retrain: "retrain";
297
+ scenes: "scenes";
298
+ }>>;
299
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
260
300
  type: z.ZodLiteral<"category">;
261
301
  target: z.ZodEnum<{
262
302
  device: "device";
@@ -303,7 +343,7 @@ export declare const userManagementCapability: {
303
343
  view: "view";
304
344
  }>>;
305
345
  includeLinked: z.ZodOptional<z.ZodBoolean>;
306
- }, z.core.$strip>], "type">>>>;
346
+ }, z.core.$strip>], "type">>]>>>;
307
347
  totpEnabled: z.ZodDefault<z.ZodBoolean>;
308
348
  createdAt: z.ZodNumber;
309
349
  updatedAt: z.ZodNumber;
@@ -314,7 +354,17 @@ export declare const userManagementCapability: {
314
354
  isAdmin: z.ZodDefault<z.ZodBoolean>;
315
355
  allowedProviders: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
316
356
  allowedDevices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>>;
317
- scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
357
+ scopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
358
+ type: z.ZodLiteral<"viewer">;
359
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
360
+ block: z.ZodArray<z.ZodNumber>;
361
+ features: z.ZodArray<z.ZodEnum<{
362
+ "face-assignment": "face-assignment";
363
+ "plate-assignment": "plate-assignment";
364
+ retrain: "retrain";
365
+ scenes: "scenes";
366
+ }>>;
367
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
318
368
  type: z.ZodLiteral<"category">;
319
369
  target: z.ZodEnum<{
320
370
  device: "device";
@@ -361,14 +411,24 @@ export declare const userManagementCapability: {
361
411
  view: "view";
362
412
  }>>;
363
413
  includeLinked: z.ZodOptional<z.ZodBoolean>;
364
- }, z.core.$strip>], "type">>>>;
414
+ }, z.core.$strip>], "type">>]>>>;
365
415
  }, z.core.$strip>, z.ZodObject<{
366
416
  id: z.ZodString;
367
417
  username: z.ZodString;
368
418
  isAdmin: z.ZodDefault<z.ZodBoolean>;
369
419
  allowedProviders: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
370
420
  allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
371
- scopes: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
421
+ scopes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
422
+ type: z.ZodLiteral<"viewer">;
423
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
424
+ block: z.ZodArray<z.ZodNumber>;
425
+ features: z.ZodArray<z.ZodEnum<{
426
+ "face-assignment": "face-assignment";
427
+ "plate-assignment": "plate-assignment";
428
+ retrain: "retrain";
429
+ scenes: "scenes";
430
+ }>>;
431
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
372
432
  type: z.ZodLiteral<"category">;
373
433
  target: z.ZodEnum<{
374
434
  device: "device";
@@ -415,7 +475,7 @@ export declare const userManagementCapability: {
415
475
  view: "view";
416
476
  }>>;
417
477
  includeLinked: z.ZodOptional<z.ZodBoolean>;
418
- }, z.core.$strip>], "type">>>>;
478
+ }, z.core.$strip>], "type">>]>>>;
419
479
  totpEnabled: z.ZodDefault<z.ZodBoolean>;
420
480
  createdAt: z.ZodNumber;
421
481
  updatedAt: z.ZodNumber;
@@ -425,7 +485,17 @@ export declare const userManagementCapability: {
425
485
  isAdmin: z.ZodOptional<z.ZodBoolean>;
426
486
  allowedProviders: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
427
487
  allowedDevices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>>;
428
- scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
488
+ scopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
489
+ type: z.ZodLiteral<"viewer">;
490
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
491
+ block: z.ZodArray<z.ZodNumber>;
492
+ features: z.ZodArray<z.ZodEnum<{
493
+ "face-assignment": "face-assignment";
494
+ "plate-assignment": "plate-assignment";
495
+ retrain: "retrain";
496
+ scenes: "scenes";
497
+ }>>;
498
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
429
499
  type: z.ZodLiteral<"category">;
430
500
  target: z.ZodEnum<{
431
501
  device: "device";
@@ -472,7 +542,7 @@ export declare const userManagementCapability: {
472
542
  view: "view";
473
543
  }>>;
474
544
  includeLinked: z.ZodOptional<z.ZodBoolean>;
475
- }, z.core.$strip>], "type">>>>;
545
+ }, z.core.$strip>], "type">>]>>>;
476
546
  }, z.core.$strip>, z.ZodObject<{
477
547
  success: z.ZodLiteral<true>;
478
548
  }, z.core.$strip>, "mutation">;
@@ -489,7 +559,17 @@ export declare const userManagementCapability: {
489
559
  }, z.core.$strip>, "mutation">;
490
560
  readonly setUserScopes: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
491
561
  userId: z.ZodString;
492
- scopes: z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
562
+ scopes: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
563
+ type: z.ZodLiteral<"viewer">;
564
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
565
+ block: z.ZodArray<z.ZodNumber>;
566
+ features: z.ZodArray<z.ZodEnum<{
567
+ "face-assignment": "face-assignment";
568
+ "plate-assignment": "plate-assignment";
569
+ retrain: "retrain";
570
+ scenes: "scenes";
571
+ }>>;
572
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
493
573
  type: z.ZodLiteral<"category">;
494
574
  target: z.ZodEnum<{
495
575
  device: "device";
@@ -536,7 +616,7 @@ export declare const userManagementCapability: {
536
616
  view: "view";
537
617
  }>>;
538
618
  includeLinked: z.ZodOptional<z.ZodBoolean>;
539
- }, z.core.$strip>], "type">>>;
619
+ }, z.core.$strip>], "type">>]>>;
540
620
  }, z.core.$strip>, z.ZodObject<{
541
621
  success: z.ZodLiteral<true>;
542
622
  }, z.core.$strip>, "mutation">;
@@ -549,7 +629,17 @@ export declare const userManagementCapability: {
549
629
  isAdmin: z.ZodDefault<z.ZodBoolean>;
550
630
  allowedProviders: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>;
551
631
  allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodLiteral<"*">]>>;
552
- scopes: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
632
+ scopes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
633
+ type: z.ZodLiteral<"viewer">;
634
+ allow: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodNumber>]>;
635
+ block: z.ZodArray<z.ZodNumber>;
636
+ features: z.ZodArray<z.ZodEnum<{
637
+ "face-assignment": "face-assignment";
638
+ "plate-assignment": "plate-assignment";
639
+ retrain: "retrain";
640
+ scenes: "scenes";
641
+ }>>;
642
+ }, z.core.$strip>, z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
553
643
  type: z.ZodLiteral<"category">;
554
644
  target: z.ZodEnum<{
555
645
  device: "device";
@@ -596,7 +686,7 @@ export declare const userManagementCapability: {
596
686
  view: "view";
597
687
  }>>;
598
688
  includeLinked: z.ZodOptional<z.ZodBoolean>;
599
- }, z.core.$strip>], "type">>>>;
689
+ }, z.core.$strip>], "type">>]>>>;
600
690
  totpEnabled: z.ZodDefault<z.ZodBoolean>;
601
691
  createdAt: z.ZodNumber;
602
692
  updatedAt: z.ZodNumber;
package/dist/client.js CHANGED
@@ -997,6 +997,7 @@ function method(input, output, options) {
997
997
  kind: options?.kind ?? "query",
998
998
  ...options?.auth !== void 0 ? { auth: options.auth } : {},
999
999
  ...options?.access !== void 0 ? { access: options.access } : {},
1000
+ ...options?.role !== void 0 ? { role: options.role } : {},
1000
1001
  ...options?.caller !== void 0 ? { caller: options.caller } : {},
1001
1002
  timeoutMs: options?.timeoutMs
1002
1003
  };
@@ -25317,6 +25318,13 @@ var TopologyNodeSchema = zod.z.object({
25317
25318
  cpuModel: zod.z.string().nullable(),
25318
25319
  cpuCores: zod.z.number(),
25319
25320
  memoryMB: zod.z.number(),
25321
+ /**
25322
+ * The inference RUNTIMES installed on the node (`pythonRuntimes`: onnx,
25323
+ * openvino, edgetpu …) — not its devices. An installed runtime says nothing
25324
+ * about whether its hardware is there (a Coral delegate stays installed
25325
+ * after the stick leaves, D919); the live device set is
25326
+ * `pipelineOrchestrator.getNodeInferenceDevices`.
25327
+ */
25320
25328
  engines: zod.z.array(zod.z.string()).readonly(),
25321
25329
  isHub: zod.z.boolean(),
25322
25330
  isOnline: zod.z.boolean(),
@@ -25798,21 +25806,27 @@ method(zod.z.object({
25798
25806
  path: ["profiles"]
25799
25807
  });
25800
25808
  }), ExportRecordSchema, {
25809
+ role: "viewer",
25801
25810
  kind: "mutation",
25802
25811
  auth: "protected"
25803
25812
  }), method(zod.z.object({ deviceId: zod.z.number().optional() }), zod.z.array(ExportRecordSchema), {
25813
+ role: "viewer",
25804
25814
  kind: "query",
25805
25815
  auth: "protected"
25806
25816
  }), method(zod.z.object({ exportId: zod.z.string() }), ExportRecordSchema, {
25817
+ role: "viewer",
25807
25818
  kind: "query",
25808
25819
  auth: "protected"
25809
25820
  }), method(zod.z.object({ exportId: zod.z.string() }), ExportRecordSchema, {
25821
+ role: "viewer",
25810
25822
  kind: "mutation",
25811
25823
  auth: "protected"
25812
25824
  }), method(zod.z.object({ exportId: zod.z.string() }), ExportRecordSchema, {
25825
+ role: "viewer",
25813
25826
  kind: "mutation",
25814
25827
  auth: "protected"
25815
25828
  }), method(zod.z.object({ exportId: zod.z.string() }), ExportDownloadSchema, {
25829
+ role: "viewer",
25816
25830
  kind: "query",
25817
25831
  auth: "protected"
25818
25832
  }), method(zod.z.object({ exportId: zod.z.string() }), ExportBytesSchema, {
@@ -28169,6 +28183,7 @@ function createSystemProxy(api) {
28169
28183
  setAgentReachableHost: (input) => dispatch("pipelineOrchestrator", "setAgentReachableHost", "mutation", input),
28170
28184
  setAgentInferenceDevices: (input) => dispatch("pipelineOrchestrator", "setAgentInferenceDevices", "mutation", input),
28171
28185
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
28186
+ forgetInferenceDevice: (input) => dispatch("pipelineOrchestrator", "forgetInferenceDevice", "mutation", input),
28172
28187
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
28173
28188
  planAutoTune: (input) => dispatch("pipelineOrchestrator", "planAutoTune", "query", input),
28174
28189
  applyAutoTune: (input) => dispatch("pipelineOrchestrator", "applyAutoTune", "mutation", input),
package/dist/client.mjs CHANGED
@@ -996,6 +996,7 @@ function method(input, output, options) {
996
996
  kind: options?.kind ?? "query",
997
997
  ...options?.auth !== void 0 ? { auth: options.auth } : {},
998
998
  ...options?.access !== void 0 ? { access: options.access } : {},
999
+ ...options?.role !== void 0 ? { role: options.role } : {},
999
1000
  ...options?.caller !== void 0 ? { caller: options.caller } : {},
1000
1001
  timeoutMs: options?.timeoutMs
1001
1002
  };
@@ -25316,6 +25317,13 @@ var TopologyNodeSchema = z.object({
25316
25317
  cpuModel: z.string().nullable(),
25317
25318
  cpuCores: z.number(),
25318
25319
  memoryMB: z.number(),
25320
+ /**
25321
+ * The inference RUNTIMES installed on the node (`pythonRuntimes`: onnx,
25322
+ * openvino, edgetpu …) — not its devices. An installed runtime says nothing
25323
+ * about whether its hardware is there (a Coral delegate stays installed
25324
+ * after the stick leaves, D919); the live device set is
25325
+ * `pipelineOrchestrator.getNodeInferenceDevices`.
25326
+ */
25319
25327
  engines: z.array(z.string()).readonly(),
25320
25328
  isHub: z.boolean(),
25321
25329
  isOnline: z.boolean(),
@@ -25797,21 +25805,27 @@ method(z.object({
25797
25805
  path: ["profiles"]
25798
25806
  });
25799
25807
  }), ExportRecordSchema, {
25808
+ role: "viewer",
25800
25809
  kind: "mutation",
25801
25810
  auth: "protected"
25802
25811
  }), method(z.object({ deviceId: z.number().optional() }), z.array(ExportRecordSchema), {
25812
+ role: "viewer",
25803
25813
  kind: "query",
25804
25814
  auth: "protected"
25805
25815
  }), method(z.object({ exportId: z.string() }), ExportRecordSchema, {
25816
+ role: "viewer",
25806
25817
  kind: "query",
25807
25818
  auth: "protected"
25808
25819
  }), method(z.object({ exportId: z.string() }), ExportRecordSchema, {
25820
+ role: "viewer",
25809
25821
  kind: "mutation",
25810
25822
  auth: "protected"
25811
25823
  }), method(z.object({ exportId: z.string() }), ExportRecordSchema, {
25824
+ role: "viewer",
25812
25825
  kind: "mutation",
25813
25826
  auth: "protected"
25814
25827
  }), method(z.object({ exportId: z.string() }), ExportDownloadSchema, {
25828
+ role: "viewer",
25815
25829
  kind: "query",
25816
25830
  auth: "protected"
25817
25831
  }), method(z.object({ exportId: z.string() }), ExportBytesSchema, {
@@ -28168,6 +28182,7 @@ function createSystemProxy(api) {
28168
28182
  setAgentReachableHost: (input) => dispatch("pipelineOrchestrator", "setAgentReachableHost", "mutation", input),
28169
28183
  setAgentInferenceDevices: (input) => dispatch("pipelineOrchestrator", "setAgentInferenceDevices", "mutation", input),
28170
28184
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
28185
+ forgetInferenceDevice: (input) => dispatch("pipelineOrchestrator", "forgetInferenceDevice", "mutation", input),
28171
28186
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
28172
28187
  planAutoTune: (input) => dispatch("pipelineOrchestrator", "planAutoTune", "query", input),
28173
28188
  applyAutoTune: (input) => dispatch("pipelineOrchestrator", "applyAutoTune", "mutation", input),
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Which of OUR object detections a clip window holds — the ONE overlap rule
3
+ * and the ONE label ranking, for every clip source (D923).
4
+ *
5
+ * The recorder's visits (`videoclip-visits.ts`) were the only clips labelled
6
+ * by CamStack's detections; a clip the CAMERA recorded (Hikvision, Reolink,
7
+ * Amcrest onboard storage) carried only what its firmware said, so a person
8
+ * our pipeline saw inside a native clip never showed on it. The rule that
9
+ * attaches an event to a window lives here so the visits and the native rows
10
+ * cannot attach by two slightly different rules.
11
+ *
12
+ * Pure, except {@link withClipEventLabels}, which only composes a provider's
13
+ * own `listClips` with a fetch the provider's addon supplies (`ctx.api` —
14
+ * addons never import each other). It runs in the PROVIDER, never in the cap
15
+ * mount: a mount routes, it does not compose addon output with other state.
16
+ */
17
+ import { type Clip, type IVideoclipsProvider } from '../capabilities/videoclips.cap.js';
18
+ import type { IScopedLogger } from '../interfaces/logging.js';
19
+ /** A time window a clip covers. */
20
+ export interface ClipEventWindow {
21
+ readonly startMs: number;
22
+ readonly endMs: number;
23
+ }
24
+ /** The pad an event is widened by before it is tested against a window. */
25
+ export interface ClipEventPad {
26
+ readonly preMs: number;
27
+ readonly postMs: number;
28
+ }
29
+ /** The two fields of an object event the join reads. */
30
+ export interface ClipObjectEvent {
31
+ readonly timestamp: number;
32
+ readonly className?: string;
33
+ }
34
+ /**
35
+ * Does an event at `timestamp` belong to `window`? Inside it, or its padded
36
+ * window (`timestamp − preMs … timestamp + postMs`) crosses it.
37
+ */
38
+ export declare function eventOverlapsClipWindow(timestamp: number, window: ClipEventWindow, pad: ClipEventPad): boolean;
39
+ /**
40
+ * The distinct object classes among `events`, most frequent first, capped at
41
+ * {@link MAX_CLIP_LABELS}. Empty when nothing classified is there — the caller
42
+ * then omits the field rather than carrying an empty array.
43
+ */
44
+ export declare function dominantClipLabels(events: readonly ClipObjectEvent[]): string[];
45
+ /** Our labels for one window: the overlapping events, ranked. */
46
+ export declare function clipLabelsForWindow(window: ClipEventWindow, events: readonly ClipObjectEvent[], pad: ClipEventPad): string[];
47
+ /**
48
+ * A row's labels once ours are joined: the source's own first (it named its
49
+ * own clip, and `nativeTypes` keeps its unmapped words), then ours that it did
50
+ * not already say, capped at {@link MAX_CLIP_LABELS}.
51
+ */
52
+ export declare function mergeClipLabels(own: readonly string[] | undefined, ours: readonly string[]): string[];
53
+ /** Backstop on the event read behind one listing; hitting it is logged. */
54
+ export declare const CLIP_LABEL_EVENT_FETCH_LIMIT = 5000;
55
+ /** What a provider's addon supplies for the join. */
56
+ export interface ClipEventLabelDeps {
57
+ readonly pad: ClipEventPad;
58
+ /** Our object events for the device in `[since, until]` — `ctx.api`. */
59
+ fetchObjectEvents(input: {
60
+ readonly deviceId: number;
61
+ readonly since: number;
62
+ readonly until: number;
63
+ readonly limit: number;
64
+ }): Promise<readonly ClipObjectEvent[]>;
65
+ readonly logger: Pick<IScopedLogger, 'info' | 'warn'>;
66
+ }
67
+ /**
68
+ * Join our object events onto a listing. A read that FAILS changes nothing
69
+ * (D49): the rows go out as the source listed them, and the line says so.
70
+ */
71
+ export declare function annotateClipsWithEventLabels(deviceId: number, clips: readonly Clip[], deps: ClipEventLabelDeps): Promise<readonly Clip[]>;
72
+ /** The one read the join needs, as an addon's `ctx.api` serves it. */
73
+ export interface ClipObjectEventsApi {
74
+ readonly pipelineAnalytics: {
75
+ readonly getObjectEvents: {
76
+ query(input: {
77
+ readonly deviceId: number;
78
+ readonly since: number;
79
+ readonly until: number;
80
+ readonly limit: number;
81
+ readonly projection: 'slim';
82
+ }): Promise<readonly ClipObjectEvent[]>;
83
+ };
84
+ };
85
+ }
86
+ /**
87
+ * The join's deps from an addon's own `ctx.api` and logger, with the
88
+ * canonical event pad the recorder's visits use (`EVENT_PAD_MS`) — one place,
89
+ * so every native provider asks the same question.
90
+ */
91
+ export declare function clipEventLabelDepsFromApi(api: ClipObjectEventsApi, logger: Pick<IScopedLogger, 'info' | 'warn'>): ClipEventLabelDeps;
92
+ /**
93
+ * The provider, with our detections joined onto every listing it answers.
94
+ * Every other method is the provider's own.
95
+ */
96
+ export declare function withClipEventLabels(provider: IVideoclipsProvider, deps: ClipEventLabelDeps): IVideoclipsProvider;
@@ -0,0 +1,5 @@
1
+ import type { CapVocabularySlice } from '../types.js';
2
+ type ActuatorCap = 'switch' | 'brightness' | 'color' | 'cover' | 'valve' | 'lock-control' | 'climate-control' | 'fan-control' | 'humidifier' | 'water-heater' | 'heating-valve' | 'alarm-panel' | 'button' | 'control' | 'motion-trigger';
3
+ /** The actuator family of the vocabulary. */
4
+ export declare const ACTUATOR_CAP_VOCABULARY: CapVocabularySlice<ActuatorCap>;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { CapVocabularySlice } from '../types.js';
2
+ type ApplianceCap = 'vacuum-control' | 'lawn-mower-control' | 'dishwasher' | 'pet-feeder' | 'media-player' | 'consumables' | 'navigation' | 'script-runner' | 'automation-control' | 'notifier' | 'update';
3
+ /** The appliance family of the vocabulary. */
4
+ export declare const APPLIANCE_CAP_VOCABULARY: CapVocabularySlice<ApplianceCap>;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { CapVocabularySlice } from '../types.js';
2
+ type CameraCap = 'accessories' | 'audio-analysis' | 'audio-metrics' | 'camera-credentials' | 'camera-grid-layout' | 'camera-pipeline-config' | 'camera-streams' | 'day-night' | 'detection-pipeline' | 'device-admin-link' | 'device-discovery' | 'device-extension' | 'device-ops' | 'feature-probe' | 'image' | 'image-settings' | 'intercom' | 'motion-detection' | 'motion-zones' | 'native-object-detection' | 'osd' | 'pipeline-analytics' | 'privacy-mask' | 'ptz' | 'ptz-autotrack' | 'reboot' | 'recording' | 'recording-onboard' | 'recording-signal' | 'scene-monitor' | 'snapshot' | 'stream-catalog' | 'stream-params' | 'stream-signals' | 'videoclips' | 'webrtc-session' | 'zone-analytics' | 'zone-rules' | 'zones';
3
+ /** The camera and platform family of the vocabulary. */
4
+ export declare const CAMERA_CAP_VOCABULARY: CapVocabularySlice<CameraCap>;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { CapVocabularySlice } from '../types.js';
2
+ type SensorCap = 'air-quality-sensor' | 'ambient-light-sensor' | 'binary' | 'carbon-monoxide' | 'connectivity' | 'contact' | 'enum-sensor' | 'flood' | 'gas' | 'humidity-sensor' | 'motion' | 'numeric-sensor' | 'power-meter' | 'presence' | 'pressure-sensor' | 'smoke' | 'tamper' | 'temperature-sensor' | 'vibration' | 'weather' | 'battery' | 'network-link' | 'device-status' | 'doorbell' | 'event-emitter';
3
+ /** The sensor family of the vocabulary. */
4
+ export declare const SENSOR_CAP_VOCABULARY: CapVocabularySlice<SensorCap>;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * System-scoped caps. None is part of a DEVICE's vocabulary: they are the
3
+ * cluster's own machinery, administered from their own pages. Each still has
4
+ * an entry, so a new cap is a decision rather than an omission.
5
+ */
6
+ import type { CapVocabularySlice, SystemVocabCapName } from '../types.js';
7
+ /** Every system-scoped cap, with why it is not a device's vocabulary. */
8
+ export declare const SYSTEM_CAP_VOCABULARY: CapVocabularySlice<SystemVocabCapName>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The cap vocabulary (D920) — what every capability lets an operator DO to a
3
+ * device and WATCH it for, in one cap-keyed map outside the caps.
4
+ */
5
+ export type { ResolvedBooleanTrigger, ResolvedEnumTrigger, ResolvedEnumValue, ResolvedEventTrigger, ResolvedNumericTrigger, ResolvedValueTrigger, ResolvedVocabAction, ResolvedVocabTrigger, VocabBindingsInput, } from './resolve.js';
6
+ export { actionsForDevice, renderVocabPhrase, triggersForDevice, } from './resolve.js';
7
+ export { VOCAB_TEMPLATES } from './templates.js';
8
+ export type { ActionArgKey, ActionArgs, BooleanOffer, CapEventName, CapMethodName, CapStatusField, CapVocabularyEntry, CapVocabularyMap, CapVocabularySlice, DeviceCapVocabulary, DeviceVocabCapName, DynamicOffer, EnumOffer, EnumStateValue, L10n, LooseCapVocabularyEntry, LooseDynamicOffer, LooseVocabAction, LooseVocabOffer, LooseVocabOpenArg, LooseVocabStateTrigger, NumberOffer, SystemCapVocabulary, SystemVocabCapName, TextOffer, VocabAction, VocabCapName, VocabChoice, VocabEventTrigger, VocabIcon, VocabLocale, VocabOffer, VocabOpenArg, VocabStateTrigger, } from './types.js';
9
+ export { CAP_VOCABULARY, CAP_VOCABULARY_BY_NAME } from './vocabulary.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The one way the vocabulary writes a human string: English and Italian side
3
+ * by side, so neither language can be forgotten in a diff.
4
+ */
5
+ import type { L10n } from './types.js';
6
+ /** A string in English and Italian. */
7
+ export declare function t(en: string, it: string): L10n;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Resolve a DEVICE's vocabulary from the cap map (D920): the actions it can be
3
+ * made to do and the triggers it can be watched for, phrased, with the
4
+ * device-type / role wording applied.
5
+ *
6
+ * Walks the device's bindings (D12) and reads only the cap NAME of each entry
7
+ * — never the binding kind (D13): a wrapped cap and a native one speak the
8
+ * same words. System caps and caps the map does not know contribute nothing.
9
+ * The order is the map's order, so a picker draws the same device the same way.
10
+ */
11
+ import type { CapabilityMethodAccess } from '../../capabilities/capability-definition.js';
12
+ import type { EventCategory } from '../../enums/event-category.js';
13
+ import type { DeviceBinding, DeviceBindingEntry } from '../device-binding.js';
14
+ import type { L10n, LooseDynamicOffer, LooseVocabOpenArg, VocabIcon, VocabLocale } from './types.js';
15
+ /** A device's caps, however the caller holds them. */
16
+ export type VocabBindingsInput = DeviceBinding | readonly DeviceBindingEntry[] | readonly string[];
17
+ /** One action a device can be made to do — the wire is `{ cap, method, args }`. */
18
+ export interface ResolvedVocabAction {
19
+ readonly id: string;
20
+ readonly cap: string;
21
+ readonly method: string;
22
+ readonly label: L10n;
23
+ readonly phrase: L10n;
24
+ readonly icon: VocabIcon;
25
+ /** Baked args — sent as they are. */
26
+ readonly args: Readonly<Record<string, unknown>>;
27
+ /** Args the operator fills, each with how to offer its values. */
28
+ readonly openArgs: readonly LooseVocabOpenArg[];
29
+ /** The method's access tier (METHOD_ACCESS_MAP). */
30
+ readonly access: CapabilityMethodAccess;
31
+ }
32
+ interface ResolvedTriggerBase {
33
+ readonly id: string;
34
+ readonly cap: string;
35
+ readonly label: L10n;
36
+ readonly icon: VocabIcon;
37
+ }
38
+ /** A true/false field. `…For` phrases carry `{minutes}`. */
39
+ export interface ResolvedBooleanTrigger extends ResolvedTriggerBase {
40
+ readonly kind: 'boolean';
41
+ readonly field: string;
42
+ readonly whenTrue: L10n;
43
+ readonly whenFalse: L10n;
44
+ readonly whenTrueFor: L10n;
45
+ readonly whenFalseFor: L10n;
46
+ }
47
+ /** A number: phrases carry `{threshold}` / `{delta}`. */
48
+ export interface ResolvedNumericTrigger extends ResolvedTriggerBase {
49
+ readonly kind: 'numeric';
50
+ readonly field: string;
51
+ readonly unit: string | null;
52
+ /** Status field holding the device's own unit, when it states one. */
53
+ readonly unitField: string | null;
54
+ readonly above: L10n;
55
+ readonly below: L10n;
56
+ readonly changesBy: L10n;
57
+ }
58
+ /** One value of an enum trigger, phrased. */
59
+ export interface ResolvedEnumValue {
60
+ readonly value: string;
61
+ readonly label: L10n;
62
+ readonly phrase: L10n;
63
+ readonly phraseFor: L10n;
64
+ }
65
+ /** A closed set of states. */
66
+ export interface ResolvedEnumTrigger extends ResolvedTriggerBase {
67
+ readonly kind: 'enum';
68
+ readonly field: string;
69
+ readonly values: readonly ResolvedEnumValue[];
70
+ }
71
+ /** A free value: phrases carry `{value}`. */
72
+ export interface ResolvedValueTrigger extends ResolvedTriggerBase {
73
+ readonly kind: 'value';
74
+ readonly field: string;
75
+ readonly phrase: L10n;
76
+ readonly phraseFor: L10n;
77
+ readonly offer: LooseDynamicOffer | null;
78
+ }
79
+ /** A bus event the device emits. */
80
+ export interface ResolvedEventTrigger extends ResolvedTriggerBase {
81
+ readonly kind: 'event';
82
+ readonly category: EventCategory;
83
+ readonly phrase: L10n;
84
+ }
85
+ /** Anything a device can be watched for. */
86
+ export type ResolvedVocabTrigger = ResolvedBooleanTrigger | ResolvedNumericTrigger | ResolvedEnumTrigger | ResolvedValueTrigger | ResolvedEventTrigger;
87
+ /** Fill `{name}` placeholders from `values`; an unknown one stays visible. */
88
+ export declare function renderVocabPhrase(phrase: L10n, locale: VocabLocale, values: Readonly<Record<string, string>>): string;
89
+ /**
90
+ * The actions a device can be made to do, phrased for its type and role.
91
+ * An action whose method is no longer routable (absent from
92
+ * METHOD_ACCESS_MAP, or a read) is dropped.
93
+ */
94
+ export declare function actionsForDevice(bindings: VocabBindingsInput, deviceType?: string, role?: string | null): readonly ResolvedVocabAction[];
95
+ /**
96
+ * The triggers a device can be watched for — its state fields, then the bus
97
+ * events it emits — phrased for its type and role.
98
+ */
99
+ export declare function triggersForDevice(bindings: VocabBindingsInput, deviceType?: string, role?: string | null): readonly ResolvedVocabTrigger[];
100
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { L10n } from './types.js';
2
+ /** Placeholders: `{quantity}` (with its article), `{device}`, `{threshold}`, `{delta}`. */
3
+ export declare const NUMERIC_ABOVE: L10n;
4
+ export declare const NUMERIC_BELOW: L10n;
5
+ export declare const NUMERIC_CHANGES_BY: L10n;
6
+ /** Placeholders: `{device}`, `{value}` (the value's label). */
7
+ export declare const BECOMES: L10n;
8
+ /** Placeholders: `{trigger}` (a whole trigger phrase), `{minutes}`. */
9
+ export declare const HELD_FOR: L10n;
10
+ /** Every frame, for the completeness test. */
11
+ export declare const VOCAB_TEMPLATES: Readonly<Record<string, L10n>>;