openkbs 0.0.40 → 0.0.42

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/package.json +1 -1
  2. package/src/actions.js +8 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openkbs",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "OpenKBS - Command Line Interface",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/actions.js CHANGED
@@ -594,10 +594,8 @@ async function updateKnowledgeAction() {
594
594
  // Download updated knowledge files from S3
595
595
  await downloadKnowledgeFromS3(knowledgeDir);
596
596
 
597
- // Download CLAUDE.md file from S3 (optional, don't fail if it doesn't work)
598
- downloadClaudeMdFromS3(claudeMdPath, s3Client, bucket).catch(() => {
599
- // Silently ignore any errors with CLAUDE.md download
600
- });
597
+ // Download CLAUDE.md file from S3
598
+ await downloadClaudeMdFromS3(claudeMdPath);
601
599
 
602
600
  console.green('Knowledge base updated successfully!');
603
601
 
@@ -657,7 +655,10 @@ async function downloadKnowledgeFromS3(targetDir) {
657
655
  }
658
656
  }
659
657
 
660
- async function downloadClaudeMdFromS3(claudeMdPath, s3Client, bucket) {
658
+ async function downloadClaudeMdFromS3(claudeMdPath) {
659
+ const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3");
660
+ const s3Client = new S3Client({ region: 'us-east-1' });
661
+ const bucket = 'openkbs-downloads';
661
662
  const claudeMdKey = 'templates/CLAUDE.md';
662
663
 
663
664
  try {
@@ -676,8 +677,8 @@ async function downloadClaudeMdFromS3(claudeMdPath, s3Client, bucket) {
676
677
  if (error.name === 'NoSuchKey') {
677
678
  console.yellow('CLAUDE.md not found in remote repository, skipping...');
678
679
  } else {
679
- console.red('Error downloading CLAUDE.md from S3:', error.message || error.toString() || 'Unknown error');
680
- // Don't throw the error, just log it and continue
680
+ console.red('Error downloading CLAUDE.md:', error.message);
681
+ throw error;
681
682
  }
682
683
  }
683
684
  }