@ghl-ai/aw 0.1.37-beta.32 → 0.1.37-beta.34

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.
Files changed (2) hide show
  1. package/commands/memory.mjs +23 -10
  2. package/package.json +1 -1
@@ -41,15 +41,22 @@ async function memoryStore(args) {
41
41
  s.stop('Memory stored');
42
42
 
43
43
  const data = result?.result ?? result;
44
+ const curation = data.curation || {};
45
+ const cls = data.classification || {};
46
+ const mem = data.memory || {};
47
+ const action = curation.action || 'STORED';
44
48
  const lines = [
45
- data.action ? `${chalk.dim('action:')} ${chalk.cyan(data.action)}` : null,
46
- data.memory_id ? `${chalk.dim('id:')} ${data.memory_id}` : null,
47
- data.classification ? `${chalk.dim('class:')} ${data.classification}` : null,
48
- data.layer ? `${chalk.dim('layer:')} ${data.layer}` : null,
49
+ `${chalk.dim('action:')} ${chalk.cyan(action)}`,
50
+ curation.reason ? `${chalk.dim('reason:')} ${curation.reason}` : null,
51
+ mem.id ? `${chalk.dim('id:')} ${mem.id}` : null,
52
+ cls.layer ? `${chalk.dim('layer:')} ${chalk.cyan(cls.layer)}` : null,
53
+ cls.overlay?.length ? `${chalk.dim('overlay:')} ${cls.overlay.join(', ')}` : null,
54
+ cls.angle?.length ? `${chalk.dim('angle:')} ${cls.angle.join(', ')}` : null,
55
+ cls.classification_confidence != null ? `${chalk.dim('conf:')} ${cls.classification_confidence}` : null,
49
56
  ].filter(Boolean).join('\n');
50
57
 
51
- if (lines) fmt.note(lines, 'Result');
52
- fmt.outro('Memory stored');
58
+ fmt.note(lines, 'Result');
59
+ fmt.outro(`Memory ${action.toLowerCase()}d`);
53
60
  } catch (err) {
54
61
  s.stop(chalk.red('Failed'));
55
62
  fmt.cancel(`Store failed: ${err.message}`);
@@ -80,7 +87,7 @@ async function memorySearch(args) {
80
87
  const result = await callMemoryTool('memory_search', params);
81
88
  s.stop('Search complete');
82
89
 
83
- const memories = result?.memories ?? result?.results ?? [];
90
+ const memories = Array.isArray(result) ? result : (result?.memories ?? result?.results ?? []);
84
91
  if (memories.length === 0) {
85
92
  fmt.logInfo('No memories found.');
86
93
  fmt.outro('Search complete');
@@ -88,10 +95,16 @@ async function memorySearch(args) {
88
95
  }
89
96
 
90
97
  for (const mem of memories) {
98
+ const score = mem.rrf_score ?? mem.score;
99
+ const overlays = Array.isArray(mem.overlay) ? mem.overlay.join(',') : null;
100
+ const angles = Array.isArray(mem.angle) ? mem.angle.join(',') : null;
91
101
  const meta = [
92
102
  mem.layer ? chalk.cyan(mem.layer) : null,
93
- mem.score != null ? chalk.dim(`score:${mem.score}`) : null,
94
- mem.id ? chalk.dim(mem.id) : null,
103
+ overlays ? chalk.magenta(overlays) : null,
104
+ angles ? chalk.yellow(angles) : null,
105
+ score != null ? chalk.dim(`score:${Number(score).toFixed(4)}`) : null,
106
+ mem.type ? chalk.dim(mem.type) : null,
107
+ mem.id ? chalk.dim(mem.id.slice(0, 8)) : null,
95
108
  ].filter(Boolean).join(chalk.dim(' | '));
96
109
 
97
110
  const header = meta || 'Memory';
@@ -160,7 +173,7 @@ async function memoryStats(args) {
160
173
  const result = await callMemoryTool('memory_search', { query: '*', limit: 200, ...params });
161
174
  s.stop('Stats loaded');
162
175
 
163
- const memories = result?.memories ?? result?.results ?? [];
176
+ const memories = Array.isArray(result) ? result : (result?.memories ?? result?.results ?? []);
164
177
  const total = memories.length;
165
178
 
166
179
  // Aggregate by layer, overlay, angle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.37-beta.32",
3
+ "version": "0.1.37-beta.34",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",