edge-impulse-linux 1.25.4 → 1.26.1

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 (66) hide show
  1. package/README.md +17 -3
  2. package/build/cli/linux/runner-downloader.js +24 -1
  3. package/build/cli/linux/runner-downloader.js.map +1 -1
  4. package/build/cli/linux/runner-utils.d.ts +5 -0
  5. package/build/cli/linux/runner-utils.js +6 -1
  6. package/build/cli/linux/runner-utils.js.map +1 -1
  7. package/build/cli/linux/runner.js +254 -73
  8. package/build/cli/linux/runner.js.map +1 -1
  9. package/build/cli-common/model-monitor.d.ts +13 -0
  10. package/build/cli-common/model-monitor.js +68 -8
  11. package/build/cli-common/model-monitor.js.map +1 -1
  12. package/build/cli-common/remote-mgmt-service.d.ts +1 -0
  13. package/build/cli-common/remote-mgmt-service.js +31 -16
  14. package/build/cli-common/remote-mgmt-service.js.map +1 -1
  15. package/build/library/classifier/audio-classifier.d.ts +12 -3
  16. package/build/library/classifier/audio-classifier.js +49 -39
  17. package/build/library/classifier/audio-classifier.js.map +1 -1
  18. package/build/library/classifier/libcwrapper.d.ts +7 -1
  19. package/build/library/classifier/libcwrapper.js +10 -2
  20. package/build/library/classifier/libcwrapper.js.map +1 -1
  21. package/build/library/classifier/linux-impulse-runner.d.ts +28 -0
  22. package/build/library/classifier/linux-impulse-runner.js +253 -55
  23. package/build/library/classifier/linux-impulse-runner.js.map +1 -1
  24. package/build/library/sensors/gstreamer.js +38 -5
  25. package/build/library/sensors/gstreamer.js.map +1 -1
  26. package/build/library/sensors/recorder.js +61 -23
  27. package/build/library/sensors/recorder.js.map +1 -1
  28. package/build/sdk/studio/sdk/model/device.d.ts +9 -0
  29. package/build/sdk/studio/sdk/model/device.js.map +1 -1
  30. package/build/sdk/studio/sdk/model/deviceDeploymentEvent.d.ts +9 -0
  31. package/build/sdk/studio/sdk/model/deviceDeploymentEvent.js.map +1 -1
  32. package/build/sdk/studio/sdk/model/deviceWorkload.d.ts +12 -0
  33. package/build/sdk/studio/sdk/model/deviceWorkload.js +4 -0
  34. package/build/sdk/studio/sdk/model/deviceWorkload.js.map +1 -0
  35. package/build/sdk/studio/sdk/model/deviceWorkloadModel.d.ts +13 -0
  36. package/build/sdk/studio/sdk/model/deviceWorkloadModel.js +4 -0
  37. package/build/sdk/studio/sdk/model/deviceWorkloadModel.js.map +1 -0
  38. package/build/sdk/studio/sdk/model/impulseType.d.ts +4 -2
  39. package/build/sdk/studio/sdk/model/impulseType.js +1 -1
  40. package/build/sdk/studio/sdk/model/impulseType.js.map +1 -1
  41. package/build/sdk/studio/sdk/model/inferenceHistoryAggregate.d.ts +8 -0
  42. package/build/sdk/studio/sdk/model/learnBlock.d.ts +2 -1
  43. package/build/sdk/studio/sdk/model/learnBlockType.d.ts +2 -3
  44. package/build/sdk/studio/sdk/model/learnBlockType.js +1 -1
  45. package/build/sdk/studio/sdk/model/learnBlockType.js.map +1 -1
  46. package/build/sdk/studio/sdk/model/models.d.ts +2 -0
  47. package/build/sdk/studio/sdk/model/models.js +2 -0
  48. package/build/sdk/studio/sdk/model/models.js.map +1 -1
  49. package/build/sdk/studio/sdk/model/monitoringEventContext.d.ts +8 -0
  50. package/build/sdk/studio/sdk/model/monitoringEventEvaluationConfig.d.ts +4 -2
  51. package/build/sdk/studio/sdk/model/monitoringEventEvaluationConfig.js +1 -1
  52. package/build/sdk/studio/sdk/model/monitoringEventEvaluationConfig.js.map +1 -1
  53. package/build/sdk/studio/sdk/model/organizationTransferLearningOperatesOn.d.ts +1 -1
  54. package/build/sdk/studio/sdk/model/organizationTransferLearningOperatesOn.js +1 -1
  55. package/build/sdk/studio/sdk/model/organizationTransferLearningOperatesOn.js.map +1 -1
  56. package/package.json +4 -1
  57. package/test/agent-bundle-lifecycle.test.ts +445 -0
  58. package/test/agent-client.test.ts +246 -16
  59. package/test/agent-command-processor.test.ts +194 -0
  60. package/test/agent-runner-configuration.test.ts +110 -0
  61. package/test/agent-runner-integration.test.ts +330 -0
  62. package/test/model-monitor.test.ts +121 -0
  63. package/test/monitoring-policy-protocol.test.ts +62 -0
  64. package/test/utils/agent-runner-fixtures.ts +132 -0
  65. package/test/agent-runner-metadata.test.ts +0 -31
  66. package/test/sensor-selection.test.ts +0 -26
@@ -1,31 +0,0 @@
1
- /**
2
- * Verifies that agent registration uses stable workload API metadata before and after the runner
3
- * has loaded a model, including safe handling of inferencing engines newer than this CLI.
4
- */
5
- import assert from 'node:assert';
6
- import { ModelInformation, RunnerHelloInferencingEngine } from '../library/classifier/linux-impulse-runner';
7
- import { agentEngineName, agentRunnerMode } from '../cli/linux/agent-runner-metadata';
8
-
9
- describe('agent runner metadata', () => {
10
- // Ensures the initial registration identifies an explicitly configured mode before model loading.
11
- it('reports modes from explicit configuration before a model is loaded', () => {
12
- assert.strictEqual(agentRunnerMode(1337, undefined, undefined, undefined), 'http');
13
- assert.strictEqual(agentRunnerMode(undefined, '/dev/video0', undefined, undefined), 'camera');
14
- assert.strictEqual(agentRunnerMode(undefined, undefined, 'default', undefined), 'microphone');
15
- assert.strictEqual(agentRunnerMode(undefined, undefined, undefined, undefined), undefined);
16
- });
17
-
18
- // Falls back to `.eim` metadata when startup arguments could not identify the streaming sensor.
19
- it('reports the mode from a loaded model when no input was selected explicitly', () => {
20
- const model = <ModelInformation>{ modelParameters: { sensorType: 'camera' } };
21
- assert.strictEqual(agentRunnerMode(undefined, undefined, undefined, model), 'camera');
22
- });
23
-
24
- // Keeps workload metadata stable across enum names and prevents a newer engine from crashing startup.
25
- it('uses stable engine names and accepts future engine values', () => {
26
- assert.strictEqual(agentEngineName(RunnerHelloInferencingEngine.Tflite), 'tflite');
27
- assert.strictEqual(agentEngineName(RunnerHelloInferencingEngine.TfliteFull), 'tflite');
28
- assert.strictEqual(agentEngineName(RunnerHelloInferencingEngine.TensorRT), 'tensorrt');
29
- assert.strictEqual(agentEngineName(18), 'unknown');
30
- });
31
- });
@@ -1,26 +0,0 @@
1
- /**
2
- * Verifies the non-interactive device selection used by agent-managed containers, without requiring
3
- * camera or microphone hardware during the unit test.
4
- */
5
- import assert from 'node:assert';
6
- import { selectNonInteractiveDevice } from '../library/sensors/sensors-helper';
7
-
8
- describe('non-interactive sensor selection', () => {
9
- it('uses an explicitly selected device', () => {
10
- assert.strictEqual(selectNonInteractiveDevice(
11
- [ 'camera-1', 'camera-2' ], 'camera-2', '--camera', 'EI_CAMERA'), 'camera-2');
12
- });
13
-
14
- it('automatically uses the only available device', () => {
15
- assert.strictEqual(selectNonInteractiveDevice(
16
- [ 'microphone-1' ], undefined, '--microphone', 'EI_MICROPHONE'), 'microphone-1');
17
- });
18
-
19
- it('rejects an ambiguous selection instead of prompting', () => {
20
- assert.throws(
21
- () => selectNonInteractiveDevice(
22
- [ 'camera-1', 'camera-2' ], undefined, '--camera', 'EI_CAMERA'),
23
- /set --camera or EI_CAMERA/
24
- );
25
- });
26
- });