@iamoberlin/chorus 1.2.2 → 1.2.3

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/index.ts +62 -3
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  import * as prayers from "./src/prayers/prayers.js";
39
39
  import * as prayerStore from "./src/prayers/store.js";
40
40
 
41
- const VERSION = "1.2.2"; // Fix vision command CLI args
41
+ const VERSION = "1.2.3"; // Vision now outputs collected insights + RSI summary
42
42
 
43
43
  const plugin = {
44
44
  id: "chorus",
@@ -334,11 +334,11 @@ const plugin = {
334
334
  try {
335
335
  const json = JSON.parse(result.stdout);
336
336
  const text = json.result?.payloads?.[0]?.text || '';
337
- contextStore.set(choirId, text.slice(0, 500));
337
+ contextStore.set(`${choirId}:d${day}`, text.slice(0, 500));
338
338
  successfulRuns++;
339
339
  console.log(` ✓`);
340
340
  } catch {
341
- contextStore.set(choirId, `[${choir.name} completed]`);
341
+ contextStore.set(`${choirId}:d${day}`, `[${choir.name} completed]`);
342
342
  successfulRuns++;
343
343
  console.log(` ✓`);
344
344
  }
@@ -364,6 +364,65 @@ const plugin = {
364
364
  console.log(` Choir runs: ${successfulRuns}/${totalRuns}`);
365
365
  console.log(` Duration: ${elapsed}s`);
366
366
  console.log("");
367
+
368
+ // Output collected insights
369
+ if (contextStore.size > 0 && !options?.dryRun) {
370
+ console.log("📜 COLLECTED INSIGHTS");
371
+ console.log("═".repeat(55));
372
+
373
+ // Group by choir across days
374
+ const choirInsights: Map<string, string[]> = new Map();
375
+ for (const [key, value] of contextStore) {
376
+ const [choirId] = key.split(':');
377
+ if (!choirInsights.has(choirId)) {
378
+ choirInsights.set(choirId, []);
379
+ }
380
+ choirInsights.get(choirId)!.push(value);
381
+ }
382
+
383
+ // Output key choirs with full text
384
+ const keyChoirs = ['virtues', 'powers', 'seraphim'];
385
+ for (const choirId of keyChoirs) {
386
+ const choir = CHOIRS[choirId];
387
+ if (!choir) continue;
388
+
389
+ const insights = [];
390
+ for (const [key, value] of contextStore) {
391
+ if (key.startsWith(choirId) || key.includes(`:${choirId}:`)) {
392
+ insights.push(value);
393
+ }
394
+ }
395
+
396
+ if (insights.length > 0) {
397
+ console.log("");
398
+ console.log(`${choir.emoji} ${choir.name.toUpperCase()}`);
399
+ console.log("─".repeat(40));
400
+ insights.forEach((insight, i) => {
401
+ if (days > 1) console.log(`Day ${i + 1}:`);
402
+ console.log(insight);
403
+ console.log("");
404
+ });
405
+ }
406
+ }
407
+
408
+ // RSI Summary (from Virtues)
409
+ const virtuesInsights = [];
410
+ for (const [key, value] of contextStore) {
411
+ if (key.includes('virtues')) {
412
+ virtuesInsights.push(value);
413
+ }
414
+ }
415
+
416
+ if (virtuesInsights.length > 0) {
417
+ console.log("");
418
+ console.log("🔄 RSI SUMMARY (Self-Improvement)");
419
+ console.log("═".repeat(55));
420
+ virtuesInsights.forEach((v, i) => {
421
+ console.log(`Day ${i + 1}: ${v.slice(0, 200)}${v.length > 200 ? '...' : ''}`);
422
+ });
423
+ console.log("");
424
+ }
425
+ }
367
426
  });
368
427
 
369
428
  // Metrics command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamoberlin/chorus",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "CHORUS: Hierarchy Of Recursive Unified Self-improvement — with Prayer Requests social network",
5
5
  "author": "Oberlin <iam@oberlin.ai>",
6
6
  "license": "MIT",