@almyty/agents 1.2.0 → 1.4.0

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The CLI's own version, read from its package.json at startup.
3
+ *
4
+ * It used to be a hardcoded string, which drifted: `--version`
5
+ * answered 0.1.0 while the published package was 1.2.0, so a bug
6
+ * report never identified the build it came from. Both `dist/index.js`
7
+ * and `src/index.ts` sit one directory below the package root, so the
8
+ * same relative path resolves for the built bin and for `tsx src/index.ts`.
9
+ */
10
+ import { readFileSync } from 'node:fs';
11
+ export function readVersion(fallback = '0.0.0') {
12
+ try {
13
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
14
+ return typeof pkg.version === 'string' && pkg.version.length > 0
15
+ ? pkg.version
16
+ : fallback;
17
+ }
18
+ catch {
19
+ return fallback;
20
+ }
21
+ }
22
+ export const VERSION = readVersion();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@almyty/agents",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "description": "Run and manage almyty agents from your terminal \u2014 list, invoke workflow or autonomous runs, stream steps, and inspect run history.",
7
+ "description": "Run and manage almyty agents from your terminal — list, invoke workflow or autonomous runs, stream steps, and inspect run history.",
8
8
  "type": "module",
9
9
  "main": "dist/index.js",
10
10
  "bin": {