@deimoscloud/coreai 0.1.4 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deimoscloud/coreai",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "A configurable, team-ready AI agent orchestration platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -61,7 +61,7 @@ function getCachePath(options: CacheCommandOptions): string {
61
61
  return options.cachePath;
62
62
  }
63
63
  const root = options.projectRoot ?? process.cwd();
64
- return join(root, CACHE_PATHS.base);
64
+ return join(root, CACHE_PATHS.ROOT);
65
65
  }
66
66
 
67
67
  /**
package/src/index.ts CHANGED
@@ -4,10 +4,30 @@
4
4
  * This is the main library export for programmatic usage.
5
5
  */
6
6
 
7
- import { createRequire } from 'module';
8
- const require = createRequire(import.meta.url);
9
- const packageJson = require('../package.json');
7
+ import { readFileSync } from 'fs';
8
+ import { dirname, join } from 'path';
9
+ import { fileURLToPath } from 'url';
10
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());
11
31
  export const VERSION: string = packageJson.version;
12
32
 
13
33
  // Configuration