relaybot 1.0.0 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relaybot",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A Slack-to-AI gateway that lets you interact with Claude/Codex directly from your DMs",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -1,11 +1,22 @@
1
+ const path = require('path');
1
2
  const agent = require('./agent');
2
3
 
4
+ const isProduction = __dirname.includes('node_modules');
5
+ const skillPath = path.join(__dirname, '..', 'skills', 'relay-bot', 'SKILL.md');
6
+
7
+ function getPromptSuffix() {
8
+ if (isProduction) {
9
+ return `\nIMPORTANT: Read and follow the instructions in ${skillPath}`;
10
+ }
11
+ return '\nIMPORTANT: Use the relay-bot skill.';
12
+ }
13
+
3
14
  function registerHandlers(app) {
4
15
  app.message(async ({ message, say }) => {
5
16
  console.log('New message:', message.text);
6
17
 
7
18
  if (agent.isRunning()) {
8
- const fullPrompt = `${message.text}\nIMPORTANT: Use the relay-bot skill.`;
19
+ const fullPrompt = message.text + getPromptSuffix();
9
20
  agent.sendCommand(fullPrompt);
10
21
  } else {
11
22
  await say('Agent process is not running.');