@alwaysai/device-agent 0.0.4-1 → 0.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.
- package/lib/application-control/environment-variables.d.ts.map +1 -1
- package/lib/application-control/environment-variables.js +0 -1
- package/lib/application-control/environment-variables.js.map +1 -1
- package/lib/application-control/status.d.ts.map +1 -1
- package/lib/application-control/status.js +47 -35
- package/lib/application-control/status.js.map +1 -1
- package/lib/cloud-connection/device-agent-cloud-connection.d.ts +3 -2
- package/lib/cloud-connection/device-agent-cloud-connection.d.ts.map +1 -1
- package/lib/cloud-connection/device-agent-cloud-connection.js +35 -19
- package/lib/cloud-connection/device-agent-cloud-connection.js.map +1 -1
- package/lib/infrastructure/certificates-and-tokens.d.ts +2 -0
- package/lib/infrastructure/certificates-and-tokens.d.ts.map +1 -1
- package/lib/infrastructure/certificates-and-tokens.js +14 -3
- package/lib/infrastructure/certificates-and-tokens.js.map +1 -1
- package/lib/subcommands/app/app.d.ts +1 -1
- package/lib/subcommands/app/app.js +3 -3
- package/lib/subcommands/app/app.js.map +1 -1
- package/lib/subcommands/device/device.d.ts +6 -0
- package/lib/subcommands/device/device.d.ts.map +1 -0
- package/lib/subcommands/device/device.js +62 -0
- package/lib/subcommands/device/device.js.map +1 -0
- package/lib/subcommands/device/index.d.ts +2 -0
- package/lib/subcommands/device/index.d.ts.map +1 -0
- package/lib/subcommands/device/index.js +11 -0
- package/lib/subcommands/device/index.js.map +1 -0
- package/lib/subcommands/get-model-package.d.ts +5 -0
- package/lib/subcommands/get-model-package.d.ts.map +1 -0
- package/lib/subcommands/get-model-package.js +34 -0
- package/lib/subcommands/get-model-package.js.map +1 -0
- package/lib/subcommands/index.d.ts +8 -1
- package/lib/subcommands/index.d.ts.map +1 -1
- package/lib/subcommands/index.js +9 -3
- package/lib/subcommands/index.js.map +1 -1
- package/package.json +2 -2
- package/readme.md +48 -21
- package/src/application-control/environment-variables.ts +0 -1
- package/src/application-control/status.ts +53 -33
- package/src/cloud-connection/device-agent-cloud-connection.ts +47 -29
- package/src/infrastructure/certificates-and-tokens.ts +14 -3
- package/src/subcommands/app/app.ts +3 -3
- package/src/subcommands/device/device.ts +63 -0
- package/src/subcommands/device/index.ts +8 -0
- package/src/subcommands/get-model-package.ts +32 -0
- package/src/subcommands/index.ts +9 -3
- package/lib/subcommands/device-control.d.ts +0 -2
- package/lib/subcommands/device-control.d.ts.map +0 -1
- package/lib/subcommands/device-control.js +0 -19
- package/lib/subcommands/device-control.js.map +0 -1
- package/src/subcommands/device-control.ts +0 -16
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-control.d.ts","sourceRoot":"","sources":["../../src/subcommands/device-control.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,yKAY/B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDeviceInfoCliLeaf = void 0;
|
|
4
|
-
const alwayscli_1 = require("@alwaysai/alwayscli");
|
|
5
|
-
const device_control_1 = require("../device-control/device-control");
|
|
6
|
-
exports.getDeviceInfoCliLeaf = (0, alwayscli_1.CliLeaf)({
|
|
7
|
-
name: 'get-device-info',
|
|
8
|
-
description: 'Get device info',
|
|
9
|
-
namedInputs: {},
|
|
10
|
-
async action(_, opts) {
|
|
11
|
-
const deviceInfo = [
|
|
12
|
-
['CPU Utilization', `${String(await (0, device_control_1.getCpuUtil)())} %`],
|
|
13
|
-
['Disk Utilization', `${String(await (0, device_control_1.getDiskUtil)())} %`],
|
|
14
|
-
['Memory Utilization', `${String(await (0, device_control_1.getMemUtil)())} %`],
|
|
15
|
-
];
|
|
16
|
-
console.table(deviceInfo);
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=device-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-control.js","sourceRoot":"","sources":["../../src/subcommands/device-control.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAC9C,qEAAuF;AAE1E,QAAA,oBAAoB,GAAG,IAAA,mBAAO,EAAC;IAC1C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,EAAE;IACf,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI;QAClB,MAAM,UAAU,GAAG;YACjB,CAAC,iBAAiB,EAAE,GAAG,MAAM,CAAC,MAAM,IAAA,2BAAU,GAAE,CAAC,IAAI,CAAC;YACtD,CAAC,kBAAkB,EAAE,GAAG,MAAM,CAAC,MAAM,IAAA,4BAAW,GAAE,CAAC,IAAI,CAAC;YACxD,CAAC,oBAAoB,EAAE,GAAG,MAAM,CAAC,MAAM,IAAA,2BAAU,GAAE,CAAC,IAAI,CAAC;SAC1D,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CliLeaf } from '@alwaysai/alwayscli';
|
|
2
|
-
import { getCpuUtil, getDiskUtil, getMemUtil } from '../device-control/device-control';
|
|
3
|
-
|
|
4
|
-
export const getDeviceInfoCliLeaf = CliLeaf({
|
|
5
|
-
name: 'get-device-info',
|
|
6
|
-
description: 'Get device info',
|
|
7
|
-
namedInputs: {},
|
|
8
|
-
async action(_, opts) {
|
|
9
|
-
const deviceInfo = [
|
|
10
|
-
['CPU Utilization', `${String(await getCpuUtil())} %`],
|
|
11
|
-
['Disk Utilization', `${String(await getDiskUtil())} %`],
|
|
12
|
-
['Memory Utilization', `${String(await getMemUtil())} %`],
|
|
13
|
-
];
|
|
14
|
-
console.table(deviceInfo);
|
|
15
|
-
},
|
|
16
|
-
});
|