spawn-skill 1.3.2 → 1.3.4

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/cli.js +24 -20
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -474,7 +474,8 @@ class SpawnAgent:
474
474
  }
475
475
 
476
476
  function getMoltbotBridge(token, agentName, moltbotAgent = '') {
477
- const agentFlag = moltbotAgent ? `, '--agent', '${moltbotAgent}'` : '';
477
+ // moltbot agent command doesn't need --agent flag, just --message and --thinking
478
+ const agentFlag = '';
478
479
  return `/**
479
480
  * Spawn.wtf → Moltbot Bridge
480
481
  * Routes messages from Spawn iOS app to your Moltbot backend
@@ -586,25 +587,37 @@ async function askMoltbot(message) {
586
587
  });
587
588
  }
588
589
 
589
- let response = '';
590
- let error = '';
590
+ let stdout = '';
591
+ let stderr = '';
591
592
 
592
- proc.stdout.on('data', (data) => response += data.toString());
593
- proc.stderr.on('data', (data) => error += data.toString());
593
+ proc.stdout.on('data', (data) => {
594
+ stdout += data.toString();
595
+ console.log('stdout:', data.toString().substring(0, 100));
596
+ });
597
+ proc.stderr.on('data', (data) => {
598
+ stderr += data.toString();
599
+ console.log('stderr:', data.toString().substring(0, 100));
600
+ });
594
601
 
595
602
  proc.on('error', (err) => {
596
603
  console.error('✗ Failed to start Moltbot:', err.message);
597
- moltbotPath = null; // Reset so we try finding again
604
+ moltbotPath = null;
598
605
  reject(new Error('Moltbot not found. Install with: npm install -g moltbot@latest'));
599
606
  });
600
607
 
601
608
  proc.on('close', (code) => {
602
- if (code === 0) {
609
+ console.log('Exit code:', code);
610
+ console.log('Total stdout length:', stdout.length);
611
+ console.log('Total stderr length:', stderr.length);
612
+
613
+ // Try stdout first, fall back to stderr
614
+ const response = stdout.trim() || stderr.trim();
615
+
616
+ if (response) {
603
617
  console.log('✓ Moltbot responded');
604
- resolve(response.trim());
618
+ resolve(response);
605
619
  } else {
606
- console.error(' Moltbot error:', error);
607
- reject(new Error(error || \`Exit code \${code}\`));
620
+ reject(new Error('No response from Moltbot'));
608
621
  }
609
622
  });
610
623
  });
@@ -779,17 +792,8 @@ async function main() {
779
792
  language = language || answers.language;
780
793
  const useMoltbot = answers.useMoltbot || false;
781
794
 
782
- // If using Moltbot, ask for the agent name
795
+ // Moltbot doesn't need an agent name - it uses --message and --thinking flags
783
796
  let moltbotAgent = '';
784
- if (useMoltbot) {
785
- const moltbotAnswers = await inquirer.prompt([{
786
- type: 'input',
787
- name: 'moltbotAgent',
788
- message: 'Moltbot/Clawdbot agent name (from your config):',
789
- default: ''
790
- }]);
791
- moltbotAgent = moltbotAnswers.moltbotAgent;
792
- }
793
797
 
794
798
  console.log('');
795
799
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spawn-skill",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Connect your AI agent to Spawn.wtf",
5
5
  "bin": {
6
6
  "spawn-skill": "./bin/cli.js"