skimpyclaw 0.1.3 → 0.1.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.
package/dist/gateway.js CHANGED
@@ -1,11 +1,21 @@
1
1
  // Gateway HTTP server for health checks and control
2
2
  import Fastify from 'fastify';
3
+ import { existsSync } from 'fs';
4
+ import { fileURLToPath } from 'url';
3
5
  import { join } from 'path';
4
6
  import { runAgentTurn } from './agent.js';
5
7
  import { getCronJobs, runCronJob } from './cron.js';
6
8
  import { registerDashboardAPI } from './api.js';
7
9
  import { registerDashboard } from './dashboard-frontend.js';
8
10
  import { ensureDashboardToken } from './config.js';
11
+ const __dirname = fileURLToPath(new URL('.', import.meta.url));
12
+ function resolveDashboardDistDir() {
13
+ const packageDistDashboard = join(__dirname, 'dashboard');
14
+ if (existsSync(join(packageDistDashboard, 'index.html'))) {
15
+ return packageDistDashboard;
16
+ }
17
+ return join(process.cwd(), 'dist', 'dashboard');
18
+ }
9
19
  let config;
10
20
  let startTime;
11
21
  let lastMessage;
@@ -94,7 +104,7 @@ export async function createGateway(cfg) {
94
104
  registerDashboardAPI(fastify, config);
95
105
  // Register dashboard frontend (framework app)
96
106
  registerDashboard(fastify, {
97
- frameworkDistDir: join(process.cwd(), 'dist', 'dashboard'),
107
+ frameworkDistDir: resolveDashboardDistDir(),
98
108
  botName: config.agents.list[config.agents.default]?.identity?.name || 'SkimpyClaw',
99
109
  botEmoji: config.agents.list[config.agents.default]?.identity?.emoji || 'šŸ‘™šŸ¦ž',
100
110
  });
package/dist/setup.js CHANGED
@@ -803,12 +803,11 @@ export async function runSetup(options = {}) {
803
803
  console.log('\nNext steps:');
804
804
  console.log('1. Review templates in ~/.skimpyclaw/agents/main/');
805
805
  console.log('2. Start the daemon:');
806
- console.log(` launchctl bootout gui/$(id -u)/${GATEWAY_PLIST_LABEL} 2>/dev/null || true`);
807
- console.log(` launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/${GATEWAY_PLIST_LABEL}.plist`);
808
- console.log(` launchctl kickstart -k gui/$(id -u)/${GATEWAY_PLIST_LABEL}`);
806
+ console.log(' skimpyclaw start --daemon');
809
807
  console.log('3. Check health:');
810
- console.log(' curl http://localhost:18790/health');
811
- console.log(`4. Send /help in your ${useDiscord ? 'Discord bot DM/server' : 'Telegram bot'}`);
808
+ console.log(' skimpyclaw status');
809
+ console.log(`4. Optional daemon controls: skimpyclaw stop | skimpyclaw restart`);
810
+ console.log(`5. Send /help in your ${useDiscord ? 'Discord bot DM/server' : 'Telegram bot'}`);
812
811
  console.log('\nšŸ‘™šŸ¦ž Enjoy!');
813
812
  }
814
813
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skimpyclaw",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Lightweight personal AI assistant with Telegram and Discord integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",