strray-ai 1.0.22 → 1.0.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strray-ai",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "⚡ StringRay ⚡: Bulletproof AI orchestration with systematic error prevention. Zero dead ends. Ship clean, tested, optimized code — every time.",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin/index.js",
@@ -481,6 +481,72 @@ function configureStrRayPlugin() {
481
481
  console.log("ℹ️ Test files not found (this is normal for some installations)");
482
482
  }
483
483
 
484
+ // Update paths in .opencode directory files
485
+ console.log("Checking .opencode directory files for path updates...");
486
+ const opencodeDir = path.join(process.cwd(), ".opencode");
487
+ if (fs.existsSync(opencodeDir)) {
488
+ console.log(".opencode directory found, updating paths...");
489
+ let opencodeFilesUpdated = 0;
490
+
491
+ function processOpencodeFile(filePath) {
492
+ try {
493
+ let content = fs.readFileSync(filePath, "utf-8");
494
+ let updated = false;
495
+
496
+ // Convert relative dist/ paths to node_modules/strray-ai/dist/ paths
497
+ if (content.includes('../dist/') || content.includes('./dist/') || content.includes('dist/')) {
498
+ // Convert '../dist/' paths
499
+ content = content.replace(/'\.\.\/dist\//g, "'./node_modules/strray-ai/dist/");
500
+ content = content.replace(/"\.\.\/dist\//g, '"./node_modules/strray-ai/dist/');
501
+ content = content.replace(/`\.\.\/dist\//g, "`./node_modules/strray-ai/dist/");
502
+
503
+ // Convert './dist/' paths
504
+ content = content.replace(/'\.\/dist\//g, "'./node_modules/strray-ai/dist/");
505
+ content = content.replace(/"\.\/dist\//g, '"./node_modules/strray-ai/dist/');
506
+ content = content.replace(/`\.\.\/dist\//g, "`./node_modules/strray-ai/dist/");
507
+
508
+ // Convert 'dist/' paths (relative to project root)
509
+ content = content.replace(/'dist\//g, "'./node_modules/strray-ai/dist/");
510
+ content = content.replace(/"dist\//g, '"./node_modules/strray-ai/dist/');
511
+ content = content.replace(/`dist\//g, "`./node_modules/strray-ai/dist/");
512
+
513
+ updated = true;
514
+ }
515
+
516
+ if (updated) {
517
+ fs.writeFileSync(filePath, content);
518
+ opencodeFilesUpdated++;
519
+ console.log(`✅ Updated .opencode file: ${path.relative(process.cwd(), filePath)}`);
520
+ }
521
+ } catch (error) {
522
+ console.warn(`Warning: Could not update .opencode file ${filePath}:`, error.message);
523
+ }
524
+ }
525
+
526
+ function processOpencodeDirectory(dirPath) {
527
+ const items = fs.readdirSync(dirPath);
528
+ for (const item of items) {
529
+ const fullPath = path.join(dirPath, item);
530
+ const stat = fs.statSync(fullPath);
531
+ if (stat.isDirectory()) {
532
+ processOpencodeDirectory(fullPath);
533
+ } else if (item.endsWith('.js') || item.endsWith('.ts') || item.endsWith('.json') || item.endsWith('.md') || item.endsWith('.sh')) {
534
+ processOpencodeFile(fullPath);
535
+ }
536
+ }
537
+ }
538
+
539
+ processOpencodeDirectory(opencodeDir);
540
+
541
+ if (opencodeFilesUpdated > 0) {
542
+ console.log(`✅ Updated ${opencodeFilesUpdated} .opencode files with consumer paths`);
543
+ } else {
544
+ console.log("ℹ️ No .opencode file path updates needed");
545
+ }
546
+ } else {
547
+ console.log("ℹ️ .opencode directory not found");
548
+ }
549
+
484
550
  // Consumer scripts already have correct relative paths - no conversion needed
485
551
 
486
552
  // All configuration paths are now updated for consumer usage