@deimoscloud/coreai 0.1.3 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deimoscloud/coreai",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A configurable, team-ready AI agent orchestration platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -4,7 +4,31 @@
4
4
  * This is the main library export for programmatic usage.
5
5
  */
6
6
 
7
- export const VERSION = '0.1.0';
7
+ import { readFileSync } from 'fs';
8
+ import { dirname, join } from 'path';
9
+ import { fileURLToPath } from 'url';
10
+
11
+ // Find package.json by walking up from the current module
12
+ function findPackageJson(): string {
13
+ let dir = dirname(fileURLToPath(import.meta.url));
14
+ while (dir !== dirname(dir)) {
15
+ const pkgPath = join(dir, 'package.json');
16
+ try {
17
+ const content = readFileSync(pkgPath, 'utf-8');
18
+ const pkg = JSON.parse(content);
19
+ if (pkg.name === '@deimoscloud/coreai') {
20
+ return content;
21
+ }
22
+ } catch {
23
+ // Continue searching
24
+ }
25
+ dir = dirname(dir);
26
+ }
27
+ return '{"version": "unknown"}';
28
+ }
29
+
30
+ const packageJson = JSON.parse(findPackageJson());
31
+ export const VERSION: string = packageJson.version;
8
32
 
9
33
  // Configuration
10
34
  export {