leedab 0.1.4 → 0.1.5

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/leedab.js +15 -0
  2. package/package.json +1 -1
package/bin/leedab.js CHANGED
@@ -296,6 +296,21 @@ pairing
296
296
  return;
297
297
  }
298
298
 
299
+ // Check seat limit
300
+ const { ensureLicense } = await import("../dist/license.js");
301
+ const license = await ensureLicense();
302
+ if (license && license.maxSeats > 0) {
303
+ // Count total unique users across all channel allowlists
304
+ const allUsers = new Set();
305
+ for (const ch of Object.values(config.channels || {})) {
306
+ for (const u of ch.allowFrom || []) allUsers.add(u);
307
+ }
308
+ if (allUsers.size >= license.maxSeats) {
309
+ console.error(chalk.red(`Seat limit reached (${allUsers.size}/${license.maxSeats}). Upgrade your plan to add more users.`));
310
+ process.exit(1);
311
+ }
312
+ }
313
+
299
314
  config.channels[channel].allowFrom.push(userId);
300
315
  config.channels[channel].dmPolicy = "allowlist";
301
316
  await writeFile(configPath, JSON.stringify(config, null, 2) + "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leedab",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "LeedAB — Your enterprise AI agent. Local-first, private by default.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "LeedAB <hello@leedab.com>",