spawn-skill 1.2.0 → 1.2.1

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 +13 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -513,14 +513,23 @@ async function askMoltbot(message) {
513
513
  return new Promise((resolve, reject) => {
514
514
  console.log('📨 Forwarding to Moltbot:', message);
515
515
  updateStatus('thinking', 'Asking Moltbot...');
516
-
517
- const moltbot = spawn('moltbot', ['agent', '--message', message, '--thinking', 'high']);
516
+
517
+ // Use shell: true to inherit PATH and find globally installed moltbot
518
+ const moltbot = spawn('moltbot', ['agent', '--message', message, '--thinking', 'high'], {
519
+ shell: true,
520
+ env: { ...process.env }
521
+ });
518
522
  let response = '';
519
523
  let error = '';
520
-
524
+
521
525
  moltbot.stdout.on('data', (data) => response += data.toString());
522
526
  moltbot.stderr.on('data', (data) => error += data.toString());
523
-
527
+
528
+ moltbot.on('error', (err) => {
529
+ console.error('✗ Failed to start Moltbot:', err.message);
530
+ reject(new Error('Moltbot not found. Install with: npm install -g moltbot@latest'));
531
+ });
532
+
524
533
  moltbot.on('close', (code) => {
525
534
  if (code === 0) {
526
535
  console.log('✓ Moltbot responded');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spawn-skill",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Connect your AI agent to Spawn.wtf",
5
5
  "bin": {
6
6
  "spawn-skill": "./bin/cli.js"