natureco-cli 2.13.13 → 2.13.15

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": "natureco-cli",
3
- "version": "2.13.13",
3
+ "version": "2.13.15",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -211,7 +211,7 @@ body::before{
211
211
  <div class="header-bot-name" id="header-bot-name">Nature Bot</div>
212
212
  <div class="header-bot-model" id="header-bot-model">NatureCo</div>
213
213
  </div>
214
- <div class="version-badge" id="version-badge">v2.13.13</div>
214
+ <div class="version-badge" id="version-badge">v2.13.15</div>
215
215
  </div>
216
216
  <div class="messages" id="messages"></div>
217
217
  <div class="input-area">
@@ -341,7 +341,7 @@ function dashboard(action) {
341
341
  apiKey: cfg.apiKey,
342
342
  defaultBot: cfg.defaultBot,
343
343
  defaultBotId: cfg.defaultBotId,
344
- version: 'v2.13.13',
344
+ version: 'v2.13.15',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
package/src/utils/api.js CHANGED
@@ -529,6 +529,16 @@ async function sendMessageAnthropic(providerConfig, messages, tools) {
529
529
  * Send message with tool support (universal)
530
530
  */
531
531
  async function sendMessageToProvider(apiKey, message, conversationId = null, systemPrompt = null) {
532
+ // DEBUG: Write system prompt to file for inspection
533
+ try {
534
+ const debugPath = path.join(os.homedir(), '.natureco', 'debug-system-prompt.txt');
535
+ fs.writeFileSync(debugPath, systemPrompt || 'EMPTY');
536
+ console.log('[DEBUG] System prompt written to ~/.natureco/debug-system-prompt.txt');
537
+ console.log('[DEBUG] System prompt length:', (systemPrompt || '').length, 'chars');
538
+ } catch (err) {
539
+ // Silently fail if can't write debug file
540
+ }
541
+
532
542
  const providerConfig = getProviderConfig();
533
543
 
534
544
  if (!providerConfig) {
@@ -782,14 +792,24 @@ TOOL SELECTION GUIDE:
782
792
  });
783
793
 
784
794
  if (skills.length > 0) {
785
- skillsPrompt = `\n\nAVAILABLE SKILLS:`;
795
+ // Extract skill names and short descriptions (not full SKILL.md content)
796
+ const skillsInfo = skills.map(skill => {
797
+ const skillMd = path.join(skillsDir, skill, 'SKILL.md');
798
+ if (!fs.existsSync(skillMd)) return skill;
799
+
800
+ try {
801
+ const content = fs.readFileSync(skillMd, 'utf8');
802
+ // Extract description from SKILL.md (first 80 chars)
803
+ const descMatch = content.match(/description:\s*(.+)/i);
804
+ const desc = descMatch ? descMatch[1].slice(0, 80) : '';
805
+ return desc ? `${skill}: ${desc}` : skill;
806
+ } catch (err) {
807
+ return skill;
808
+ }
809
+ }).slice(0, 10).join('\n'); // Show max 10 skills
786
810
 
787
- // Show only first 10 skills, summarize the rest
788
- if (skills.length > 10) {
789
- skillsPrompt += `\nInstalled skills (${skills.length} total): ${skills.slice(0, 10).join(', ')} and ${skills.length - 10} more.`;
790
- } else {
791
- skillsPrompt += `\nInstalled skills: ${skills.join(', ')}`;
792
- }
811
+ const moreSkills = skills.length > 10 ? ` (${skills.length - 10} more)` : '';
812
+ skillsPrompt = `\n\nInstalled skills (${skills.length})${moreSkills}:\n${skillsInfo}\nUse /skills for details.`;
793
813
 
794
814
  systemPrompt += skillsPrompt;
795
815
  }