truememory-mirror 1.0.6 → 1.0.8

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/bin/mirror.js +44 -38
  2. package/package.json +1 -1
package/bin/mirror.js CHANGED
@@ -99,31 +99,46 @@ function clearLine() {
99
99
  if (!_jsonMode) process.stderr.write('\r\x1b[K');
100
100
  }
101
101
 
102
- const STATUS_PHRASES = [
103
- 'scanning cognitive patterns',
104
- 'mapping decision architecture',
105
- 'extracting reasoning signatures',
106
- 'profiling communication style',
107
- 'analyzing delegation patterns',
108
- 'detecting stress responses',
109
- 'triangulating identity vectors',
110
- 'calibrating behavioral model',
111
- 'isolating personality markers',
112
- 'decoding problem-solving heuristics',
113
- 'tracing collaboration fingerprint',
114
- 'measuring risk tolerance curves',
115
- 'building predictive scaffolding',
116
- 'consolidating trait matrix',
117
- 'running scenario simulations',
118
- 'resolving cognitive tensions',
119
- 'rendering identity surface',
120
- 'finalizing behavioral predictions',
102
+ const PROGRESS_PHRASES = [
103
+ [0, 'scanning cognitive patterns'],
104
+ [4, 'indexing conversation fragments'],
105
+ [8, 'parsing behavioral signals'],
106
+ [12, 'extracting reasoning signatures'],
107
+ [16, 'profiling communication style'],
108
+ [20, 'detecting stress responses'],
109
+ [25, 'measuring risk tolerance curves'],
110
+ [30, 'mapping decision architecture'],
111
+ [35, 'isolating personality markers'],
112
+ [40, 'tracing collaboration fingerprint'],
113
+ [45, 'decoding problem-solving heuristics'],
114
+ [50, 'analyzing delegation patterns'],
115
+ [55, 'triangulating identity vectors'],
116
+ [60, 'calibrating behavioral model'],
117
+ [65, 'resolving cognitive tensions'],
118
+ [70, 'consolidating trait matrix'],
119
+ [75, 'building predictive scaffolding'],
120
+ [80, 'running scenario simulations'],
121
+ [84, 'stress-testing edge cases'],
122
+ [88, 'computing confidence intervals'],
123
+ [91, 'rendering identity surface'],
124
+ [94, 'locking archetype match'],
125
+ [97, 'sealing behavioral predictions'],
126
+ [99, 'finalizing your mirror'],
121
127
  ];
122
128
 
123
- let _phraseIndex = 0;
129
+ function phraseForProgress(pct) {
130
+ let phrase = PROGRESS_PHRASES[0][1];
131
+ for (const [threshold, text] of PROGRESS_PHRASES) {
132
+ if (pct >= threshold) phrase = text;
133
+ else break;
134
+ }
135
+ return phrase;
136
+ }
124
137
 
125
- function nextPhrase() {
126
- return STATUS_PHRASES[_phraseIndex++ % STATUS_PHRASES.length];
138
+ let _scanPhraseIndex = 0;
139
+ function nextScanPhrase() {
140
+ const scanPhrases = PROGRESS_PHRASES.slice(0, 3);
141
+ return scanPhrases[_scanPhraseIndex++ % scanPhrases.length][1];
127
142
  }
128
143
 
129
144
  function progressBar(pct, width = 30) {
@@ -162,10 +177,10 @@ async function main() {
162
177
  // --- Scan & parse with rotating status ---
163
178
  const spinTimer = setInterval(() => {
164
179
  clearLine();
165
- write(` ${DIM}${nextPhrase()}...${R}`);
166
- }, 1800);
180
+ write(` ${DIM}${nextScanPhrase()}...${R}`);
181
+ }, 3750);
167
182
 
168
- write(` ${DIM}${nextPhrase()}...${R}`);
183
+ write(` ${DIM}${nextScanPhrase()}...${R}`);
169
184
  const sources = await scan(args.source);
170
185
 
171
186
  let claudeSessions = [];
@@ -227,23 +242,14 @@ async function main() {
227
242
  process.exit(1);
228
243
  }
229
244
 
230
- // --- Poll with rotating status ---
231
- let lastPhraseTick = 0;
232
- let currentPhrase = nextPhrase();
233
-
245
+ // --- Poll with progress-locked status ---
234
246
  try {
235
247
  await pollStatus(result.profile_id, args.apiUrl, (status) => {
236
- const pct = status.progress || 0;
237
- const bar = progressBar(pct);
238
- const now = Date.now();
239
-
240
- if (now - lastPhraseTick > 2500) {
241
- currentPhrase = nextPhrase();
242
- lastPhraseTick = now;
243
- }
248
+ const pct = Math.round((status.progress || 0) * 100);
249
+ const bar = progressBar(pct / 100);
244
250
 
245
251
  clearLine();
246
- write(` ${bar} ${WHITE}${Math.round(pct * 100)}%${R} ${DIM}${currentPhrase}...${R}`);
252
+ write(` ${bar} ${WHITE}${pct}%${R} ${DIM}${phraseForProgress(pct)}...${R}`);
247
253
  });
248
254
  } catch (err) {
249
255
  write(`\n\n ✗ extraction failed: ${err.message}\n\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truememory-mirror",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Behavioral prediction engine for how you think, decide, and react",
5
5
  "bin": {
6
6
  "truememory-mirror": "./bin/mirror.js"