@camstack/types 1.0.4 → 1.0.6

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 (59) hide show
  1. package/dist/addon.d.ts +34 -0
  2. package/dist/addon.js +22 -0
  3. package/dist/addon.mjs +3 -0
  4. package/dist/capabilities/addons.cap.d.ts +10 -10
  5. package/dist/capabilities/advanced-notifier.cap.d.ts +4 -4
  6. package/dist/capabilities/alerts.cap.d.ts +10 -10
  7. package/dist/capabilities/audio-codec.cap.d.ts +2 -2
  8. package/dist/capabilities/camera-streams.cap.d.ts +15 -15
  9. package/dist/capabilities/consumables.cap.d.ts +4 -4
  10. package/dist/capabilities/cover.cap.d.ts +4 -4
  11. package/dist/capabilities/decoder.cap.d.ts +1 -1
  12. package/dist/capabilities/index.d.ts +2 -1
  13. package/dist/capabilities/local-network.cap.d.ts +6 -6
  14. package/dist/capabilities/log-destination.cap.d.ts +5 -5
  15. package/dist/capabilities/media-player.cap.d.ts +4 -4
  16. package/dist/capabilities/mesh-network.cap.d.ts +3 -3
  17. package/dist/capabilities/metrics-provider.cap.d.ts +33 -3
  18. package/dist/capabilities/network-access.cap.d.ts +7 -7
  19. package/dist/capabilities/oauth-integration.cap.d.ts +2 -2
  20. package/dist/capabilities/pipeline-executor.cap.d.ts +48 -1
  21. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +524 -4
  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 +9 -9
  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 +28 -28
  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/enums/event-category.d.ts +12 -0
  39. package/dist/err-msg-COpsHMw2.js +18 -0
  40. package/dist/err-msg-IQTHeDzc.mjs +13 -0
  41. package/dist/generated/addon-api.d.ts +438 -12
  42. package/dist/generated/device-proxy.d.ts +1 -1
  43. package/dist/generated/method-access-map.d.ts +1 -1
  44. package/dist/generated/system-proxy.d.ts +3 -3
  45. package/dist/health/wiring-health.d.ts +16 -16
  46. package/dist/index.js +1435 -4646
  47. package/dist/index.mjs +485 -3711
  48. package/dist/interfaces/event-bus.d.ts +15 -0
  49. package/dist/interfaces/metrics-provider.d.ts +3 -1
  50. package/dist/interfaces/pipeline-executor-capability.d.ts +8 -0
  51. package/dist/lifecycle/job.d.ts +6 -6
  52. package/dist/node.js +3 -3
  53. package/dist/node.mjs +1 -1
  54. package/dist/schemas/auth-records.d.ts +4 -4
  55. package/dist/sleep-D7JeS58T.mjs +3507 -0
  56. package/dist/sleep-DnS0eJh_.js +3920 -0
  57. package/dist/storage/filesystem-storage-provider.d.ts +2 -1
  58. package/dist/types/agent-pipeline-settings.d.ts +7 -0
  59. package/package.json +6 -1
@@ -799,6 +799,21 @@ export interface EventCatalog {
799
799
  }>;
800
800
  readonly timestamp: number;
801
801
  };
802
+ /**
803
+ * Per-node detection-engine runtime-provisioning transition. Carries
804
+ * the `EngineProvisioningState` snapshot (runtimeId / device / phase +
805
+ * optional progress / error / nextRetryAt). `nodeId` rides on
806
+ * `event.source.nodeId`. Emitted by the detection-pipeline provider on
807
+ * every state change. Phase 2.
808
+ */
809
+ 'pipeline.engine-provisioning': {
810
+ readonly runtimeId: 'onnx' | 'openvino' | 'coreml' | null;
811
+ readonly device: string | null;
812
+ readonly state: 'idle' | 'installing' | 'verifying' | 'ready' | 'failed';
813
+ readonly progress?: number;
814
+ readonly error?: string;
815
+ readonly nextRetryAt?: number;
816
+ };
802
817
  /**
803
818
  * Cluster topology snapshot — same payload shape that
804
819
  * `nodes.topology` returns. Emitted by the hub on any agent /
@@ -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>;
@@ -6,6 +6,7 @@ import type { FrameResult, DetectorOutput } from '../types/detection.js';
6
6
  import type { ConfigUISchema } from './config-ui.js';
7
7
  import type { InferenceCapabilities } from './inference-capabilities.js';
8
8
  import type { IAddonResolver } from './pipeline-runner.js';
9
+ import type { EngineProvisioning } from '../capabilities/pipeline-executor.cap.js';
9
10
  /**
10
11
  * Step configuration for pipeline execution — no runtime/backend (comes
11
12
  * from engine). Phase 7 (settings redesign) removed the generic
@@ -72,6 +73,13 @@ export interface IPipelineExecutorProvider {
72
73
  getGlobalPipelineConfig(): Promise<PipelineConfig | null>;
73
74
  /** Get the currently selected engine (bootstrap default on the node). */
74
75
  getSelectedEngine(): Promise<PipelineEngineChoice>;
76
+ /**
77
+ * Per-node detection-engine provisioning snapshot (idle / installing /
78
+ * verifying / ready / failed). Read by the cap and the inference gate.
79
+ * The cap routes `{ nodeId }` for provider resolution only — each node
80
+ * returns its own local machine state, so the provider takes no args.
81
+ */
82
+ getEngineProvisioning(): EngineProvisioning;
75
83
  getOrchestratorConfigSchema(): Promise<ConfigUISchema>;
76
84
  /** Get full inference capabilities (addon models, runtimes, etc.) */
77
85
  getCapabilities(forceRefresh?: boolean): Promise<InferenceCapabilities>;
@@ -7,6 +7,7 @@ export declare const jobKindSchema: z.ZodEnum<{
7
7
  }>;
8
8
  export type JobKind = z.infer<typeof jobKindSchema>;
9
9
  export declare const taskPhaseSchema: z.ZodEnum<{
10
+ failed: "failed";
10
11
  queued: "queued";
11
12
  fetching: "fetching";
12
13
  staged: "staged";
@@ -15,7 +16,6 @@ export declare const taskPhaseSchema: z.ZodEnum<{
15
16
  restarting: "restarting";
16
17
  applied: "applied";
17
18
  done: "done";
18
- failed: "failed";
19
19
  skipped: "skipped";
20
20
  }>;
21
21
  export type TaskPhase = z.infer<typeof taskPhaseSchema>;
@@ -29,6 +29,7 @@ export declare const taskLogEntrySchema: z.ZodObject<{
29
29
  nodeId: z.ZodString;
30
30
  packageName: z.ZodString;
31
31
  phase: z.ZodEnum<{
32
+ failed: "failed";
32
33
  queued: "queued";
33
34
  fetching: "fetching";
34
35
  staged: "staged";
@@ -37,7 +38,6 @@ export declare const taskLogEntrySchema: z.ZodObject<{
37
38
  restarting: "restarting";
38
39
  applied: "applied";
39
40
  done: "done";
40
- failed: "failed";
41
41
  skipped: "skipped";
42
42
  }>;
43
43
  message: z.ZodString;
@@ -54,6 +54,7 @@ export declare const lifecycleTaskSchema: z.ZodObject<{
54
54
  framework: "framework";
55
55
  }>;
56
56
  phase: z.ZodEnum<{
57
+ failed: "failed";
57
58
  queued: "queued";
58
59
  fetching: "fetching";
59
60
  staged: "staged";
@@ -62,7 +63,6 @@ export declare const lifecycleTaskSchema: z.ZodObject<{
62
63
  restarting: "restarting";
63
64
  applied: "applied";
64
65
  done: "done";
65
- failed: "failed";
66
66
  skipped: "skipped";
67
67
  }>;
68
68
  stagedPath: z.ZodNullable<z.ZodString>;
@@ -72,6 +72,7 @@ export declare const lifecycleTaskSchema: z.ZodObject<{
72
72
  nodeId: z.ZodString;
73
73
  packageName: z.ZodString;
74
74
  phase: z.ZodEnum<{
75
+ failed: "failed";
75
76
  queued: "queued";
76
77
  fetching: "fetching";
77
78
  staged: "staged";
@@ -80,7 +81,6 @@ export declare const lifecycleTaskSchema: z.ZodObject<{
80
81
  restarting: "restarting";
81
82
  applied: "applied";
82
83
  done: "done";
83
- failed: "failed";
84
84
  skipped: "skipped";
85
85
  }>;
86
86
  message: z.ZodString;
@@ -130,6 +130,7 @@ export declare const lifecycleJobSchema: z.ZodObject<{
130
130
  framework: "framework";
131
131
  }>;
132
132
  phase: z.ZodEnum<{
133
+ failed: "failed";
133
134
  queued: "queued";
134
135
  fetching: "fetching";
135
136
  staged: "staged";
@@ -138,7 +139,6 @@ export declare const lifecycleJobSchema: z.ZodObject<{
138
139
  restarting: "restarting";
139
140
  applied: "applied";
140
141
  done: "done";
141
- failed: "failed";
142
142
  skipped: "skipped";
143
143
  }>;
144
144
  stagedPath: z.ZodNullable<z.ZodString>;
@@ -148,6 +148,7 @@ export declare const lifecycleJobSchema: z.ZodObject<{
148
148
  nodeId: z.ZodString;
149
149
  packageName: z.ZodString;
150
150
  phase: z.ZodEnum<{
151
+ failed: "failed";
151
152
  queued: "queued";
152
153
  fetching: "fetching";
153
154
  staged: "staged";
@@ -156,7 +157,6 @@ export declare const lifecycleJobSchema: z.ZodObject<{
156
157
  restarting: "restarting";
157
158
  applied: "applied";
158
159
  done: "done";
159
- failed: "failed";
160
160
  skipped: "skipped";
161
161
  }>;
162
162
  message: z.ZodString;
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";