@camstack/types 1.0.5 → 1.0.7

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 (56) hide show
  1. package/dist/addon/base-addon.d.ts +2 -2
  2. package/dist/addon.d.ts +34 -0
  3. package/dist/addon.js +22 -0
  4. package/dist/addon.mjs +3 -0
  5. package/dist/cap-call-context.d.ts +37 -0
  6. package/dist/capabilities/addons.cap.d.ts +3 -3
  7. package/dist/capabilities/advanced-notifier.cap.d.ts +4 -4
  8. package/dist/capabilities/alerts.cap.d.ts +5 -5
  9. package/dist/capabilities/audio-codec.cap.d.ts +2 -2
  10. package/dist/capabilities/camera-streams.cap.d.ts +10 -10
  11. package/dist/capabilities/consumables.cap.d.ts +4 -4
  12. package/dist/capabilities/cover.cap.d.ts +4 -4
  13. package/dist/capabilities/decoder.cap.d.ts +1 -1
  14. package/dist/capabilities/local-network.cap.d.ts +6 -6
  15. package/dist/capabilities/log-destination.cap.d.ts +5 -5
  16. package/dist/capabilities/media-player.cap.d.ts +4 -4
  17. package/dist/capabilities/mesh-network.cap.d.ts +3 -3
  18. package/dist/capabilities/metrics-provider.cap.d.ts +33 -3
  19. package/dist/capabilities/network-access.cap.d.ts +7 -7
  20. package/dist/capabilities/oauth-integration.cap.d.ts +2 -2
  21. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +3 -3
  22. package/dist/capabilities/platform-probe.cap.d.ts +1 -1
  23. package/dist/capabilities/restreamer.cap.d.ts +2 -2
  24. package/dist/capabilities/schemas/streaming-shared.d.ts +7 -7
  25. package/dist/capabilities/sso-bridge.cap.d.ts +3 -3
  26. package/dist/capabilities/storage.cap.d.ts +1 -1
  27. package/dist/capabilities/stream-broker.cap.d.ts +27 -27
  28. package/dist/capabilities/stream-params.cap.d.ts +14 -14
  29. package/dist/capabilities/user-management.cap.d.ts +20 -20
  30. package/dist/capabilities/vacuum-control.cap.d.ts +13 -13
  31. package/dist/capabilities/valve.cap.d.ts +4 -4
  32. package/dist/capabilities/webrtc-session.cap.d.ts +12 -12
  33. package/dist/deps/binary-downloader.d.ts +1 -1
  34. package/dist/deps/ffmpeg-downloader.d.ts +1 -1
  35. package/dist/deps/python-downloader.d.ts +1 -1
  36. package/dist/device/base-device-provider.d.ts +4 -1
  37. package/dist/encode-profile.d.ts +2 -2
  38. package/dist/err-msg-COpsHMw2.js +18 -0
  39. package/dist/err-msg-IQTHeDzc.mjs +13 -0
  40. package/dist/generated/addon-api.d.ts +22 -12
  41. package/dist/generated/method-access-map.d.ts +1 -1
  42. package/dist/generated/system-proxy.d.ts +1 -1
  43. package/dist/health/wiring-health.d.ts +16 -16
  44. package/dist/index.d.ts +3 -0
  45. package/dist/index.js +1271 -4538
  46. package/dist/index.mjs +371 -3645
  47. package/dist/inference/runtime-capabilities.d.ts +54 -0
  48. package/dist/interfaces/addon.d.ts +2 -2
  49. package/dist/interfaces/metrics-provider.d.ts +3 -1
  50. package/dist/node.js +3 -3
  51. package/dist/node.mjs +1 -1
  52. package/dist/schemas/auth-records.d.ts +4 -4
  53. package/dist/sleep-B1dKJAMJ.mjs +3507 -0
  54. package/dist/sleep-p-5TJ_dy.js +3920 -0
  55. package/dist/storage/filesystem-storage-provider.d.ts +2 -1
  56. package/package.json +6 -1
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Hardware-driven inference runtime capabilities — SINGLE SOURCE OF TRUTH.
3
+ *
4
+ * Pure module: no I/O, no subprocess, no Python import.
5
+ * Consumed by both `platform-probe` (@camstack/system) and
6
+ * `detection-pipeline` (@camstack/addon-pipeline).
7
+ *
8
+ * Do NOT import from @camstack/system or @camstack/addon-pipeline.
9
+ */
10
+ import type { ModelFormat } from '../types/models.js';
11
+ import type { HardwareInfo, PlatformScore } from '../interfaces/platform.js';
12
+ export type RuntimeId = 'onnx' | 'openvino' | 'coreml';
13
+ export interface DeviceOption {
14
+ readonly value: string;
15
+ readonly label: string;
16
+ }
17
+ /**
18
+ * Returns the list of supported runtime IDs for given hardware.
19
+ * onnx is always included (universal floor); accelerators added when hw matches.
20
+ */
21
+ export declare function supportedRuntimes(hw: HardwareInfo | null): readonly RuntimeId[];
22
+ /**
23
+ * Returns the device options for a given runtime and hardware probe.
24
+ */
25
+ export declare function runtimeDevices(id: RuntimeId, hw: HardwareInfo | null): readonly DeviceOption[];
26
+ /**
27
+ * Returns the default device string for a given runtime.
28
+ * onnx → 'cpu', openvino → 'auto', coreml → 'all'
29
+ */
30
+ export declare function defaultDeviceFor(id: RuntimeId): string;
31
+ /**
32
+ * Returns the model format required for a given runtime.
33
+ * Delegates to `formatForRuntime` from runtime-mapping.ts.
34
+ */
35
+ export declare function modelFormatForRuntime(id: RuntimeId): ModelFormat;
36
+ interface ScoreRuntimesResult {
37
+ readonly scores: readonly PlatformScore[];
38
+ readonly best: PlatformScore;
39
+ }
40
+ /**
41
+ * Scores all applicable inference backends for the given hardware.
42
+ *
43
+ * Rules (hardware-driven only — no Python import probes):
44
+ * - coreml: score 95, darwin+arm64
45
+ * - cuda: score 85, nvidia gpu
46
+ * - openvino: score 90 if intel-npu present, else 80 if intel gpu
47
+ * - cpu: score 50 (universal floor, always included)
48
+ *
49
+ * All hardware-matched entries are `available: true`.
50
+ * Scores are sorted descending; `best` is the first available entry
51
+ * (or last entry as fallback).
52
+ */
53
+ export declare function scoreRuntimes(hw: HardwareInfo): ScoreRuntimesResult;
54
+ export {};
@@ -706,8 +706,8 @@ export interface ICamstackAddon {
706
706
  * consumed by override-mode UIs (benchmark) so cascade-aware
707
707
  * addons can re-derive dependent options without touching the
708
708
  * persisted store. */
709
- getGlobalSettings?(overlay?: Record<string, unknown>, cap?: string): Promise<ConfigUISchemaWithValues>;
710
- updateGlobalSettings?(patch: Record<string, unknown>): Promise<void>;
709
+ getGlobalSettings?(overlay?: Record<string, unknown>, cap?: string, nodeId?: string): Promise<ConfigUISchemaWithValues | null>;
710
+ updateGlobalSettings?(patch: Record<string, unknown>, nodeId?: string): Promise<void>;
711
711
  /** Level 2 — per-device settings (schema + values). Appears in
712
712
  * Device Overrides. */
713
713
  getDeviceSettings?(deviceId: number): Promise<ConfigUISchemaWithValues>;
@@ -1,5 +1,5 @@
1
1
  import type { z } from 'zod';
2
- import type { CpuBreakdownSchema, MemoryInfoSchema, DiskIoSnapshotSchema, NetworkIoSnapshotSchema, MetricsGpuInfoSchema, ProcessResourceInfoSchema, PressureInfoSchema, SystemResourceSnapshotSchema, DiskSpaceInfoSchema, PidResourceStatsSchema, AddonInstanceSchema, NodeProcessSchema, KillProcessInputSchema, KillProcessResultSchema } from '../capabilities/metrics-provider.cap.js';
2
+ import type { CpuBreakdownSchema, MemoryInfoSchema, DiskIoSnapshotSchema, NetworkIoSnapshotSchema, MetricsGpuInfoSchema, ProcessResourceInfoSchema, PressureInfoSchema, SystemResourceSnapshotSchema, DiskSpaceInfoSchema, PidResourceStatsSchema, AddonInstanceSchema, NodeProcessSchema, KillProcessInputSchema, KillProcessResultSchema, DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema } from '../capabilities/metrics-provider.cap.js';
3
3
  export type CpuBreakdown = z.infer<typeof CpuBreakdownSchema>;
4
4
  export type MemoryInfo = z.infer<typeof MemoryInfoSchema>;
5
5
  export type DiskIoSnapshot = z.infer<typeof DiskIoSnapshotSchema>;
@@ -14,3 +14,5 @@ export type AddonInstance = z.infer<typeof AddonInstanceSchema>;
14
14
  export type NodeProcess = z.infer<typeof NodeProcessSchema>;
15
15
  export type KillProcessInput = z.infer<typeof KillProcessInputSchema>;
16
16
  export type KillProcessResult = z.infer<typeof KillProcessResultSchema>;
17
+ export type DumpHeapSnapshotInput = z.infer<typeof DumpHeapSnapshotInputSchema>;
18
+ export type DumpHeapSnapshotResult = z.infer<typeof DumpHeapSnapshotResultSchema>;
package/dist/node.js CHANGED
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_index = require("./index.js");
24
+ const require_err_msg = require("./err-msg-COpsHMw2.js");
25
25
  let node_fs = require("node:fs");
26
26
  node_fs = __toESM(node_fs);
27
27
  let node_path = require("node:path");
@@ -372,7 +372,7 @@ async function installPythonPackages(pythonPath, packages, logger) {
372
372
  });
373
373
  logger.info("Python packages installed successfully");
374
374
  } catch (err) {
375
- logger.error("Failed to install Python packages", { meta: { error: require_index.errMsg$1(err) } });
375
+ logger.error("Failed to install Python packages", { meta: { error: require_err_msg.errMsg(err) } });
376
376
  throw err;
377
377
  }
378
378
  }
@@ -422,7 +422,7 @@ async function installPythonRequirements(pythonPath, requirementsFile, logger) {
422
422
  } catch (err) {
423
423
  logger.error("Failed to install Python requirements", { meta: {
424
424
  requirementsFile,
425
- error: require_index.errMsg$1(err)
425
+ error: require_err_msg.errMsg(err)
426
426
  } });
427
427
  throw err;
428
428
  }
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { errMsg } from "./index.mjs";
1
+ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { chmodSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import * as path from "node:path";
@@ -33,15 +33,15 @@ export declare const MethodAccessSchema: z.ZodEnum<{
33
33
  }>;
34
34
  export type MethodAccess = z.infer<typeof MethodAccessSchema>;
35
35
  export declare const CapScopeSchema: z.ZodEnum<{
36
- device: "device";
37
36
  system: "system";
37
+ device: "device";
38
38
  }>;
39
39
  export type CapScope = z.infer<typeof CapScopeSchema>;
40
40
  export declare const TokenScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
41
  type: z.ZodLiteral<"category">;
42
42
  target: z.ZodEnum<{
43
- device: "device";
44
43
  system: "system";
44
+ device: "device";
45
45
  }>;
46
46
  access: z.ZodArray<z.ZodEnum<{
47
47
  view: "view";
@@ -84,8 +84,8 @@ export declare const UserRecordSchema: z.ZodObject<{
84
84
  scopes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
85
85
  type: z.ZodLiteral<"category">;
86
86
  target: z.ZodEnum<{
87
- device: "device";
88
87
  system: "system";
88
+ device: "device";
89
89
  }>;
90
90
  access: z.ZodArray<z.ZodEnum<{
91
91
  view: "view";
@@ -142,8 +142,8 @@ export declare const ScopedTokenSchema: z.ZodObject<{
142
142
  scopes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
143
143
  type: z.ZodLiteral<"category">;
144
144
  target: z.ZodEnum<{
145
- device: "device";
146
145
  system: "system";
146
+ device: "device";
147
147
  }>;
148
148
  access: z.ZodArray<z.ZodEnum<{
149
149
  view: "view";