edge-ai-client-ts 1.0.0 → 1.0.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.
package/dist/cli/index.js CHANGED
@@ -14,12 +14,18 @@
14
14
  * daemon (WS connect, session manager, buffer queue, heartbeat).
15
15
  */
16
16
  import { Command } from 'commander';
17
+ import { createRequire } from 'node:module';
17
18
  import { runDaemon } from './run.js';
18
19
  import { enroll } from './enroll.js';
19
20
  import { whoami } from './whoami.js';
20
21
  import { status } from './status.js';
21
22
  import { listDevices } from './devices.js';
22
23
  import { listMessages } from './messages.js';
24
+ // Load the version from package.json so `ec-ts --version` stays in lockstep
25
+ // with the published tarball (no manual bump required). `createRequire` is
26
+ // the canonical way to load JSON from an ESM module across Node 20+.
27
+ const require = createRequire(import.meta.url);
28
+ const { version: CLI_VERSION } = require('../../package.json');
23
29
  /**
24
30
  * Parse argv and dispatch to the appropriate subcommand.
25
31
  * Returns the process exit code. When no subcommand is given, defaults to `run`.
@@ -33,7 +39,7 @@ export async function dispatch(argv) {
33
39
  program
34
40
  .name('ec-ts')
35
41
  .description('Edge-client TypeScript (Model 1) — Edge AI Agent fleet daemon')
36
- .version('7.0.0');
42
+ .version(CLI_VERSION);
37
43
  program
38
44
  .command('run')
39
45
  .description('Start the edge-client daemon (default if no subcommand)')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-ai-client-ts",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "TypeScript edge-client for the Edge AI Agent fleet — pure-npm reimplementation of the Rust `ec` binary with byte-compatible wire protocol.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -76,4 +76,4 @@
76
76
  "typescript": "^5.5.4",
77
77
  "vitest": "^2.1.1"
78
78
  }
79
- }
79
+ }