genesis-ai-cli 14.4.0 → 14.4.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/src/cli/agentic.js +34 -15
- package/package.json +1 -1
package/dist/src/cli/agentic.js
CHANGED
|
@@ -194,18 +194,18 @@ const AGENTIC_TOOLS = [
|
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
name: 'Memory',
|
|
197
|
-
description: 'Store or retrieve information from long-term memory.',
|
|
197
|
+
description: 'Store or retrieve information from long-term memory. Actions: store (save/remember), search (retrieve/recall/get), list (stats).',
|
|
198
198
|
parameters: {
|
|
199
199
|
type: 'object',
|
|
200
200
|
properties: {
|
|
201
201
|
action: {
|
|
202
202
|
type: 'string',
|
|
203
|
-
description: 'Action to
|
|
204
|
-
enum: ['store', 'search', 'list'],
|
|
203
|
+
description: 'Action: "store" to save, "search" to retrieve/recall, "list" for stats. Aliases: retrieve/recall/get → search, save/remember → store',
|
|
204
|
+
enum: ['store', 'search', 'list', 'retrieve', 'recall', 'get', 'save', 'remember'],
|
|
205
205
|
},
|
|
206
|
-
content: { type: 'string', description: 'Content to store (for store
|
|
207
|
-
query: { type: 'string', description: 'Query to search
|
|
208
|
-
tags: { type: 'string', description: 'Comma-separated tags' },
|
|
206
|
+
content: { type: 'string', description: 'Content to store (for store) or query text (for search)' },
|
|
207
|
+
query: { type: 'string', description: 'Query to search for in memories' },
|
|
208
|
+
tags: { type: 'string', description: 'Comma-separated tags for categorization' },
|
|
209
209
|
},
|
|
210
210
|
required: ['action'],
|
|
211
211
|
},
|
|
@@ -242,14 +242,20 @@ function simpleGlob(pattern, cwd) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function matchesPattern(filePath, pat) {
|
|
245
|
-
// Convert glob to regex
|
|
245
|
+
// Convert glob to regex - order matters!
|
|
246
246
|
const regexPat = pat
|
|
247
|
+
.replace(/\./g, '\\.') // Escape dots FIRST (before other replacements)
|
|
247
248
|
.replace(/\*\*/g, '<<<DOUBLESTAR>>>')
|
|
248
249
|
.replace(/\*/g, '[^/]*')
|
|
249
250
|
.replace(/<<<DOUBLESTAR>>>/g, '.*')
|
|
250
|
-
.replace(/\?/g, '.')
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
.replace(/\?/g, '.');
|
|
252
|
+
try {
|
|
253
|
+
return new RegExp(`^${regexPat}$`).test(filePath);
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
// Fallback to simple includes for malformed patterns
|
|
257
|
+
return filePath.includes(pat.replace(/\*/g, ''));
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
walk(cwd);
|
|
255
261
|
return results.sort();
|
|
@@ -479,7 +485,18 @@ class AgenticToolExecutor {
|
|
|
479
485
|
// Memory operations
|
|
480
486
|
async handleMemory(args) {
|
|
481
487
|
const memory = this.memory;
|
|
482
|
-
|
|
488
|
+
// Normalize action - support common aliases
|
|
489
|
+
const normalizedAction = (() => {
|
|
490
|
+
const action = args.action?.toLowerCase() || '';
|
|
491
|
+
if (['store', 'save', 'remember', 'add', 'write'].includes(action))
|
|
492
|
+
return 'store';
|
|
493
|
+
if (['search', 'query', 'find', 'retrieve', 'recall', 'get', 'read', 'load', 'fetch'].includes(action))
|
|
494
|
+
return 'search';
|
|
495
|
+
if (['list', 'stats', 'status', 'info'].includes(action))
|
|
496
|
+
return 'list';
|
|
497
|
+
return action;
|
|
498
|
+
})();
|
|
499
|
+
switch (normalizedAction) {
|
|
483
500
|
case 'store':
|
|
484
501
|
if (!args.content)
|
|
485
502
|
return 'Missing content to store';
|
|
@@ -490,11 +507,13 @@ class AgenticToolExecutor {
|
|
|
490
507
|
});
|
|
491
508
|
return 'Stored in memory';
|
|
492
509
|
case 'search':
|
|
493
|
-
|
|
510
|
+
// If no query but has content, use content as query
|
|
511
|
+
const searchQuery = args.query || args.content;
|
|
512
|
+
if (!searchQuery)
|
|
494
513
|
return 'Missing search query';
|
|
495
|
-
const results = await memory.recall(
|
|
514
|
+
const results = await memory.recall(searchQuery, { limit: 5 });
|
|
496
515
|
if (!results || results.length === 0) {
|
|
497
|
-
return 'No memories found';
|
|
516
|
+
return 'No memories found matching query';
|
|
498
517
|
}
|
|
499
518
|
return results.map((r, i) => {
|
|
500
519
|
const text = typeof r === 'string' ? r : (r.content || r.text || JSON.stringify(r));
|
|
@@ -504,7 +523,7 @@ class AgenticToolExecutor {
|
|
|
504
523
|
const stats = memory.getStats();
|
|
505
524
|
return `Memory stats: ${JSON.stringify(stats, null, 2)}`;
|
|
506
525
|
default:
|
|
507
|
-
return `Unknown memory action: ${args.action}`;
|
|
526
|
+
return `Unknown memory action: ${args.action}. Valid actions: store, search, list (or aliases: save, retrieve, recall, get, etc.)`;
|
|
508
527
|
}
|
|
509
528
|
}
|
|
510
529
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesis-ai-cli",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.1",
|
|
4
4
|
"description": "Fully Autonomous AI System with RSI (Recursive Self-Improvement) - Self-funding, Self-deploying, Production Memory, A2A Protocol & Governance",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|