@hasna/conversations 0.2.14 → 0.2.15

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 (3) hide show
  1. package/bin/index.js +26 -1
  2. package/bin/mcp.js +26 -1
  3. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -4453,7 +4453,7 @@ var init_poll = __esm(() => {
4453
4453
  var require_package = __commonJS((exports, module) => {
4454
4454
  module.exports = {
4455
4455
  name: "@hasna/conversations",
4456
- version: "0.2.14",
4456
+ version: "0.2.15",
4457
4457
  description: "Real-time CLI messaging for AI agents",
4458
4458
  type: "module",
4459
4459
  bin: {
@@ -33914,6 +33914,31 @@ var init_mcp2 = __esm(() => {
33914
33914
  content: [{ type: "text", text: JSON.stringify(spaces) }]
33915
33915
  };
33916
33916
  });
33917
+ server.registerTool("broadcast", {
33918
+ description: "Send the same message to multiple spaces at once. Useful for status updates, bug reports, or announcements that need to go to several spaces.",
33919
+ inputSchema: {
33920
+ spaces: exports_external.array(exports_external.string()).describe("List of space names to send to"),
33921
+ content: exports_external.string().describe("Message content"),
33922
+ from: exports_external.string().optional().describe("Sender agent name"),
33923
+ priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional()
33924
+ }
33925
+ }, async (args) => {
33926
+ const { spaces, content, from: fromParam, priority } = args;
33927
+ const from = resolveIdentity(fromParam);
33928
+ const results = [];
33929
+ const errors4 = [];
33930
+ for (const space of spaces) {
33931
+ try {
33932
+ const msg = sendMessage({ from, to: space, content, space, priority });
33933
+ results.push({ space, id: msg.id });
33934
+ } catch (e) {
33935
+ errors4.push(`${space}: ${e instanceof Error ? e.message : String(e)}`);
33936
+ }
33937
+ }
33938
+ return {
33939
+ content: [{ type: "text", text: JSON.stringify({ sent: results, errors: errors4, total: results.length }) }]
33940
+ };
33941
+ });
33917
33942
  server.registerTool("list_unread_counts", {
33918
33943
  description: "Get unread message counts per space without fetching message content. Use this at session start to triage which spaces need attention before calling read_messages.",
33919
33944
  inputSchema: {
package/bin/mcp.js CHANGED
@@ -30943,7 +30943,7 @@ function getGraphStats() {
30943
30943
  // package.json
30944
30944
  var package_default = {
30945
30945
  name: "@hasna/conversations",
30946
- version: "0.2.14",
30946
+ version: "0.2.15",
30947
30947
  description: "Real-time CLI messaging for AI agents",
30948
30948
  type: "module",
30949
30949
  bin: {
@@ -31283,6 +31283,31 @@ server.registerTool("list_spaces", {
31283
31283
  content: [{ type: "text", text: JSON.stringify(spaces) }]
31284
31284
  };
31285
31285
  });
31286
+ server.registerTool("broadcast", {
31287
+ description: "Send the same message to multiple spaces at once. Useful for status updates, bug reports, or announcements that need to go to several spaces.",
31288
+ inputSchema: {
31289
+ spaces: exports_external.array(exports_external.string()).describe("List of space names to send to"),
31290
+ content: exports_external.string().describe("Message content"),
31291
+ from: exports_external.string().optional().describe("Sender agent name"),
31292
+ priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional()
31293
+ }
31294
+ }, async (args) => {
31295
+ const { spaces, content, from: fromParam, priority } = args;
31296
+ const from = resolveIdentity(fromParam);
31297
+ const results = [];
31298
+ const errors3 = [];
31299
+ for (const space of spaces) {
31300
+ try {
31301
+ const msg = sendMessage({ from, to: space, content, space, priority });
31302
+ results.push({ space, id: msg.id });
31303
+ } catch (e) {
31304
+ errors3.push(`${space}: ${e instanceof Error ? e.message : String(e)}`);
31305
+ }
31306
+ }
31307
+ return {
31308
+ content: [{ type: "text", text: JSON.stringify({ sent: results, errors: errors3, total: results.length }) }]
31309
+ };
31310
+ });
31286
31311
  server.registerTool("list_unread_counts", {
31287
31312
  description: "Get unread message counts per space without fetching message content. Use this at session start to triage which spaces need attention before calling read_messages.",
31288
31313
  inputSchema: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {