agentdb 1.1.0 → 1.1.2
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/agentdb-cli.js +14 -3
- package/package.json +1 -1
package/dist/cli/agentdb-cli.js
CHANGED
|
@@ -18,6 +18,11 @@ import { SkillLibrary } from '../controllers/SkillLibrary.js';
|
|
|
18
18
|
import { EmbeddingService } from '../controllers/EmbeddingService.js';
|
|
19
19
|
import * as fs from 'fs';
|
|
20
20
|
import * as path from 'path';
|
|
21
|
+
import { fileURLToPath } from 'url';
|
|
22
|
+
|
|
23
|
+
// ESM equivalent of __dirname
|
|
24
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
25
|
+
const __dirname = path.dirname(__filename);
|
|
21
26
|
// Color codes for terminal output
|
|
22
27
|
const colors = {
|
|
23
28
|
reset: '\x1b[0m',
|
|
@@ -710,9 +715,15 @@ ${colors.bright}EXAMPLES:${colors.reset}
|
|
|
710
715
|
agentdb db stats
|
|
711
716
|
`);
|
|
712
717
|
}
|
|
713
|
-
// ESM entry point
|
|
714
|
-
if (import.meta.url
|
|
715
|
-
|
|
718
|
+
// ESM entry point - run when executed directly
|
|
719
|
+
if (import.meta.url.startsWith('file:')) {
|
|
720
|
+
const modulePath = import.meta.url.slice(7); // Remove 'file://'
|
|
721
|
+
const scriptPath = process.argv[1];
|
|
722
|
+
|
|
723
|
+
// Run if this file is being executed (handles both direct execution and npx/global bin)
|
|
724
|
+
if (modulePath.includes('agentdb-cli.js') || scriptPath?.includes('agentdb')) {
|
|
725
|
+
main().catch(console.error);
|
|
726
|
+
}
|
|
716
727
|
}
|
|
717
728
|
export { AgentDBCLI };
|
|
718
729
|
//# sourceMappingURL=agentdb-cli.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentdb",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "AgentDB - Frontier Memory Features: Causal reasoning, reflexion memory, skill library, explainable recall, and automated learning for AI agents. 150x faster vector search with HNSW indexing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|