@formant/formant-cli 0.3.0 → 0.3.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.
@@ -5,6 +5,9 @@ export default class DevicesStreams extends BaseCommand<typeof DevicesStreams> {
5
5
  };
6
6
  static description: string;
7
7
  static examples: string[];
8
+ static flags: {
9
+ days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
8
11
  static summary: string;
9
12
  run(): Promise<{
10
13
  streams: unknown[];
@@ -1,56 +1,100 @@
1
- import { Args } from '@oclif/core';
1
+ import { Args, Flags } from '@oclif/core';
2
2
  import { BaseCommand } from '../../base-command.js';
3
3
  import { formatTable } from '../../lib/formatters.js';
4
4
  export default class DevicesStreams extends BaseCommand {
5
5
  static args = {
6
6
  id: Args.string({ description: 'Device ID (UUID)', required: true }),
7
7
  };
8
- static description = `List telemetry streams configured on a device.
8
+ static description = `List telemetry streams for a device.
9
9
 
10
- Shows a clean view of stream definitions parsed from the device configuration,
11
- including stream names, types, topics, and quality settings.`;
10
+ Shows streams parsed from the device configuration as well as any streams
11
+ discovered from actual ingested data (even if not explicitly configured).
12
+ Unconfigured streams are marked with a SOURCE of "data" in the output.`;
12
13
  static examples = [
13
14
  '<%= config.bin %> devices streams <device-id>',
14
15
  '<%= config.bin %> devices streams <device-id> --json',
16
+ '<%= config.bin %> devices streams <device-id> --days 30',
15
17
  ];
18
+ static flags = {
19
+ days: Flags.integer({
20
+ default: 14,
21
+ description: 'How many days back to look for unconfigured streams in ingested data',
22
+ }),
23
+ };
16
24
  static summary = 'List device streams';
17
25
  async run() {
18
- // Fetch device and its configuration
19
- const device = await this.api('admin', `devices/${this.args.id}`, {
26
+ const deviceId = this.args.id;
27
+ // ── 1. Fetch config-based streams ────────────────────────────────────────
28
+ const device = await this.api('admin', `devices/${deviceId}`, {
20
29
  method: 'GET',
21
30
  });
22
31
  const configVersion = device.desiredConfigurationVersion;
23
- if (!configVersion) {
24
- this.error('Device has no configuration version set');
32
+ let configuredStreamNames = new Set();
33
+ let configStreams = [];
34
+ if (configVersion) {
35
+ const config = await this.api('admin', `devices/${deviceId}/configurations/${configVersion}`, { method: 'GET' });
36
+ const doc = config.document;
37
+ const telemetry = doc?.telemetry;
38
+ configStreams = telemetry?.streams || [];
39
+ configuredStreamNames = new Set(configStreams.map((s) => s.name).filter(Boolean));
40
+ }
41
+ // ── 2. Discover streams from actual ingested data ─────────────────────────
42
+ const since = new Date();
43
+ since.setDate(since.getDate() - this.flags.days);
44
+ let metadataItems = [];
45
+ try {
46
+ const metaResult = await this.api('query', 'metadata', {
47
+ body: {
48
+ deviceIds: [deviceId],
49
+ start: since.toISOString(),
50
+ },
51
+ });
52
+ metadataItems = metaResult?.items ?? [];
53
+ }
54
+ catch {
55
+ // metadata endpoint failure is non-fatal; we still return config streams
56
+ }
57
+ // ── 3. Build merged stream list ───────────────────────────────────────────
58
+ // Configured streams come first, annotated with source="config"
59
+ const rows = configStreams.map((s) => {
60
+ const conf = s.configuration;
61
+ return {
62
+ name: s.name,
63
+ quality: s.quality || '—',
64
+ source: 'config',
65
+ topic: conf?.topic || '—',
66
+ type: conf?.type || '—',
67
+ };
68
+ });
69
+ // Append streams seen in data but absent from config
70
+ for (const item of metadataItems) {
71
+ if (!configuredStreamNames.has(item.name)) {
72
+ rows.push({
73
+ name: item.name,
74
+ quality: '—',
75
+ source: 'data',
76
+ topic: '—',
77
+ type: item.type || '—',
78
+ });
79
+ }
25
80
  }
26
- const config = await this.api('admin', `devices/${this.args.id}/configurations/${configVersion}`, { method: 'GET' });
27
- // Parse streams from config
28
- const doc = config.document;
29
- const telemetry = doc?.telemetry;
30
- const streams = telemetry?.streams || [];
31
81
  if (!this.jsonEnabled()) {
32
82
  const columns = [
33
83
  { key: 'name', label: 'NAME', width: 30 },
34
84
  { key: 'type', label: 'TYPE', width: 20 },
35
- { key: 'topic', label: 'TOPIC', width: 40 },
36
- { key: 'quality', label: 'QUALITY', width: 12 },
85
+ { key: 'topic', label: 'TOPIC', width: 36 },
86
+ { key: 'quality', label: 'QUALITY', width: 10 },
87
+ { key: 'source', label: 'SOURCE', width: 8 },
37
88
  ];
38
- // Format streams for display
39
- const rows = streams.map((s) => {
40
- const conf = s.configuration;
41
- return {
42
- name: s.name,
43
- type: conf?.type || '—',
44
- topic: conf?.topic || '—',
45
- quality: s.quality || '—',
46
- };
47
- });
89
+ const configured = rows.filter((r) => r.source === 'config').length;
90
+ const discovered = rows.filter((r) => r.source === 'data').length;
48
91
  this.log(`\nDevice Streams (${this.env}):\n`);
49
- this.log(` Device: ${device.name} (${this.args.id})\n`);
92
+ this.log(` Device: ${device.name} (${deviceId})`);
93
+ this.log(` Configured: ${configured} | Discovered from data (last ${this.flags.days}d): ${discovered}\n`);
50
94
  this.log(formatTable(rows, columns));
51
95
  this.log('');
52
96
  }
53
- return { streams };
97
+ return { streams: rows };
54
98
  }
55
99
  }
56
100
  //# sourceMappingURL=streams.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"streams.js","sourceRoot":"","sources":["../../../src/commands/devices/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA;AAEhE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAkC;IAC5E,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KACnE,CAAA;IAED,MAAM,CAAU,WAAW,GAAG;;;6DAG6B,CAAA;IAE3D,MAAM,CAAU,QAAQ,GAAG;QACzB,+CAA+C;QAC/C,sDAAsD;KACvD,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,qBAAqB,CAAA;IAExC,KAAK,CAAC,G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ams': import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
7
8
  device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
8
9
  stream: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  };
@@ -8,7 +8,8 @@ Returns the most recent value for specified streams without needing to specify
8
8
  a time range. Useful for checking current sensor readings.
9
9
 
10
10
  Use --all-streams with a single device to automatically discover and query all
11
- configured streams from the device configuration.`;
11
+ streams — both from the device configuration and from actual ingested data
12
+ (unconfigured streams included).`;
12
13
  static examples = [
13
14
  '<%= config.bin %> query latest-values --device <id> --stream battery_level',
14
15
  '<%= config.bin %> query latest-values --device <id> --stream temperature --stream humidity',
@@ -17,7 +18,11 @@ configured streams from the device configuration.`;
17
18
  ];
18
19
  static flags = {
19
20
  'all-streams': Flags.boolean({
20
- description: 'Query all configured streams for the device (requires single --device)',
21
+ description: 'Query all streams for the device — from config and from ingested data (requires single --device)',
22
+ }),
23
+ days: Flags.integer({
24
+ default: 14,
25
+ description: 'How many days back to look for unconfigured streams when using --all-streams',
21
26
  }),
22
27
  device: Flags.string({
23
28
  char: 'd',
@@ -34,32 +39,53 @@ configured streams from the device configuration.`;
34
39
  static summary = 'Get latest stream values';
35
40
  async run() {
36
41
  let streamNames = this.flags.stream ?? [];
37
- // If --all-streams, discover streams from device config
42
+ // If --all-streams, discover streams from both config and ingested data
38
43
  if (this.flags['all-streams']) {
39
44
  if (this.flags.device.length !== 1) {
40
45
  this.error('--all-streams requires exactly one --device');
41
46
  }
42
47
  const deviceId = this.flags.device[0];
43
- // Fetch device to get config version
48
+ const discovered = new Set();
49
+ // ── Config-based discovery ──────────────────────────────────────────────
44
50
  const device = await this.api('admin', `devices/${deviceId}`, {
45
51
  method: 'GET',
46
52
  });
47
53
  const configVersion = device.desiredConfigurationVersion;
48
- if (!configVersion) {
49
- this.error('Device has no configuration version set');
54
+ if (configVersion) {
55
+ const config = await this.api('admin', `devices/${deviceId}/configurations/${configVersion}`, { method: 'GET' });
56
+ const doc = config.document;
57
+ const telemetry = doc?.telemetry;
58
+ const configStreams = telemetry?.streams || [];
59
+ for (const s of configStreams) {
60
+ const name = s.name;
61
+ if (name)
62
+ discovered.add(name);
63
+ }
64
+ }
65
+ // ── Data-based discovery (metadata endpoint) ───────────────────────────
66
+ const since = new Date();
67
+ since.setDate(since.getDate() - this.flags.days);
68
+ try {
69
+ const metaResult = await this.api('query', 'metadata', {
70
+ body: {
71
+ deviceIds: [deviceId],
72
+ start: since.toISOString(),
73
+ },
74
+ });
75
+ for (const item of metaResult?.items ?? []) {
76
+ if (item.name)
77
+ discovered.add(item.name);
78
+ }
79
+ }
80
+ catch {
81
+ // metadata endpoint failure is non-fatal
50
82
  }
51
- // Fetch config
52
- const config = await this.api('admin', `devices/${deviceId}/configurations/${configVersion}`, { method: 'GET' });
53
- // Parse stream names from config
54
- const doc = config.document;
55
- const telemetry = doc?.telemetry;
56
- const streams = telemetry?.streams || [];
57
- streamNames = streams.map((s) => s.name).filter(Boolean);
83
+ streamNames = [...discovered];
58
84
  if (streamNames.length === 0) {
59
- this.error('No streams configured on this device');
85
+ this.error('No streams found for this device (neither configured nor in ingested data)');
60
86
  }
61
87
  if (!this.jsonEnabled()) {
62
- this.log(`\nDiscovered ${streamNames.length} streams from device config.\n`);
88
+ this.log(`\nDiscovered ${streamNames.length} streams (config + data, last ${this.flags.days}d).\n`);
63
89
  }
64
90
  }
65
91
  if (streamNames.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"latest-values.js","sourceRoot":"","sources":["../../../src/commands/query/latest-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA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