@floomhq/signaldash 0.22.0 → 0.28.0

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/lib/cli.js CHANGED
@@ -290,7 +290,7 @@ export async function connectCommand(channel, options, dependencies = {}) {
290
290
  }
291
291
 
292
292
  function registrationLine() {
293
- return "Register: claude mcp add signaldash -- npx -y @floomhq/signaldash mcp | Cursor command: npx -y @floomhq/signaldash mcp";
293
+ return "Register: claude mcp add signaldash -s user -- npx -y @floomhq/signaldash mcp | Cursor command: npx -y @floomhq/signaldash mcp";
294
294
  }
295
295
 
296
296
  export async function mcpCommand(options, dependencies = {}) {
package/lib/mcp.js CHANGED
@@ -127,7 +127,7 @@ function cleanMessage(message) {
127
127
  id: message.id ?? message.provider_id ?? null,
128
128
  text: message.text ?? null,
129
129
  timestamp: message.timestamp ?? null,
130
- is_sender: Boolean(message.is_sender),
130
+ is_sender: providerIsOwn(message.is_sender),
131
131
  sender_id: message.sender_id ?? null,
132
132
  attachments: (message.attachments || []).map((attachment) => ({
133
133
  id: attachment.id ?? null,
@@ -140,6 +140,16 @@ function cleanMessage(message) {
140
140
  };
141
141
  }
142
142
 
143
+ function providerIsOwn(value) {
144
+ if (typeof value === "boolean") return value;
145
+ if (typeof value === "number") return value !== 0;
146
+ if (typeof value === "string") {
147
+ const normalized = value.trim().toLowerCase();
148
+ return ["1", "true", "yes", "y"].includes(normalized);
149
+ }
150
+ return false;
151
+ }
152
+
143
153
  function itemList(payload) {
144
154
  return Array.isArray(payload?.items)
145
155
  ? payload.items
@@ -207,7 +217,7 @@ async function executeTool({ name, args, config, client, guard }) {
207
217
  const recent = itemList(await client.listMessages(chatId, 20));
208
218
  const duplicate = recent.find(
209
219
  (message) =>
210
- message.is_sender &&
220
+ providerIsOwn(message.is_sender) &&
211
221
  typeof message.text === "string" &&
212
222
  message.text.trim() === text,
213
223
  );
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ // Single source of truth for substituting the skill template's version
4
+ // placeholder. Three call sites independently need this exact substitution:
5
+ // `cmdSkill` in bin/sd.mjs (installs the skill into ~/.claude/skills), the
6
+ // public signaldash.dev page renderer (ops/render-skill-page.mjs and
7
+ // ops/render-skill-markdown.mjs), and the server's own /skill + /skill.md
8
+ // routes (server/server.cjs). Before this file existed the substitution was
9
+ // hand-duplicated in bin/sd.mjs and ops/render-skill-page.mjs, and the
10
+ // server routes and ops/sync-public-skill.sh did not substitute at all --
11
+ // which is how the publicly served skill ended up telling agents to run
12
+ // `npx -y @floomhq/signaldash@{{PACKAGE_VERSION}} <invite-code>`, a command
13
+ // that does not exist.
14
+ //
15
+ // .cjs so both ESM (bin/sd.mjs, ops/*.mjs, via Node's CJS/ESM interop) and
16
+ // CommonJS (server/server.cjs) call sites can require/import it without a
17
+ // build step or a second copy.
18
+
19
+ const PACKAGE_VERSION_PLACEHOLDER = '{{PACKAGE_VERSION}}';
20
+
21
+ function renderSkillTemplate(rawMarkdown, packageVersion) {
22
+ if (typeof rawMarkdown !== 'string') {
23
+ throw new TypeError('renderSkillTemplate: rawMarkdown must be a string');
24
+ }
25
+ if (typeof packageVersion !== 'string' || !packageVersion) {
26
+ throw new TypeError('renderSkillTemplate: packageVersion must be a non-empty string');
27
+ }
28
+ return rawMarkdown.split(PACKAGE_VERSION_PLACEHOLDER).join(packageVersion);
29
+ }
30
+
31
+ exports.renderSkillTemplate = renderSkillTemplate;
32
+ exports.PACKAGE_VERSION_PLACEHOLDER = PACKAGE_VERSION_PLACEHOLDER;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floomhq/signaldash",
3
- "version": "0.22.0",
3
+ "version": "0.28.0",
4
4
  "description": "Secure LinkedIn, WhatsApp, and email access for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "scripts": {
20
20
  "test": "node --test",
21
- "check": "node --check bin/sd.mjs && node --check server/server.cjs && node --check server/write-control.cjs && node --check bin/signaldash.js && node --check lib/cli.js && node --check lib/config-file.js && node --check lib/mcp.js && node --check lib/rate-guard.js && node --check lib/secrets.js && node --check lib/unipile.js"
21
+ "check": "node --check bin/sd.mjs && node --check server/server.cjs && node --check server/composio-email.cjs && node --check server/attachments.cjs && node --check server/write-control.cjs && node --check server/voice-profile.cjs && node --check server/campaign-store.cjs && node --check server/campaign-runner.cjs && node --check server/withdrawal-store.cjs && node --check server/post-scheduler.cjs && node --check server/message-scheduler.cjs && node --check bin/signaldash.js && node --check lib/cli.js && node --check lib/config-file.js && node --check lib/mcp.js && node --check lib/rate-guard.js && node --check lib/secrets.js && node --check lib/unipile.js"
22
22
  },
23
23
  "keywords": [
24
24
  "mcp",
@@ -34,4 +34,4 @@
34
34
  "ora": "8.0.1",
35
35
  "open": "10.1.0"
36
36
  }
37
- }
37
+ }