If this codebase is production, handles money, or touches sensitive data: treat this audit loop as a high-risk operation. Run with least privilege, avoid exporting long-lived credentials in your shell, and keep the agent in read-only mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This file will be replaced. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const os = require('os'); | |
| const { execSync } = require('child_process'); | |
| const mo = await mediaManager.createMediaObjectFromUrl('https://user-images.githubusercontent.com/73924/230690188-7a25983a-0630-44e9-9e2d-b4ac150f1524.jpg'); | |
| const image = await mediaManager.convertMediaObject<Image & MediaObject>(mo, 'x-scrypted/x-scrypted-image'); | |
| const detectors = [ | |
| '@scrypted/openvino', | |
| // Uncomment other detectors if available | |
| // '@scrypted/coreml', | |
| // '@scrypted/onnx', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExtensionToggler extends ScryptedDeviceBase implements Settings, OnOff { | |
| async getSettings(): Promise<Setting[]> { | |
| return [ | |
| { | |
| key: 'devices', | |
| type: 'device', | |
| title: 'Devices', | |
| description: 'The devices on which the extension will be toggled.', | |
| multiple: true, | |
| value: this.getJSON('devices'), |