@hasna/conversations 0.2.36 → 0.2.37

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 +17 -8
  2. package/bin/mcp.js +17 -8
  3. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -14914,7 +14914,7 @@ var init_presence = __esm(() => {
14914
14914
  var require_package = __commonJS((exports, module) => {
14915
14915
  module.exports = {
14916
14916
  name: "@hasna/conversations",
14917
- version: "0.2.36",
14917
+ version: "0.2.37",
14918
14918
  description: "Real-time CLI messaging for AI agents",
14919
14919
  type: "module",
14920
14920
  bin: {
@@ -44722,7 +44722,8 @@ function registerMessagingTools(server, resolveProjectId) {
44722
44722
  target_session_id: exports_external2.string().optional().describe("If provided, sends to a specific agent-claude session ID (UUID). The message auto-injects into that session's conversation.")
44723
44723
  }
44724
44724
  }, async (args) => {
44725
- const { from: fromParam, to, content, priority, blocking, project_id, target_session_id } = args;
44725
+ const { from: fromParam, to: toParam, to_agent, content, priority, blocking, project_id, target_session_id } = args;
44726
+ const to = toParam || to_agent;
44726
44727
  const from = resolveIdentity(fromParam);
44727
44728
  const msg = sendMessage({
44728
44729
  from,
@@ -44804,14 +44805,16 @@ function registerMessagingTools(server, resolveProjectId) {
44804
44805
  };
44805
44806
  });
44806
44807
  server.registerTool("reply", {
44807
- description: "Reply to a specific message, creating a thread. Sets reply_to so it can be retrieved with get_thread_replies.",
44808
+ description: "Reply to a specific message by its numeric ID, creating a thread. Use read_messages first to find the message ID.",
44808
44809
  inputSchema: {
44809
- message_id: exports_external2.coerce.number(),
44810
+ message_id: exports_external2.coerce.number().describe("Numeric message ID (integer) to reply to. Use read_messages to find IDs."),
44810
44811
  content: exports_external2.string(),
44811
- from: exports_external2.string().optional()
44812
+ from: exports_external2.string().optional(),
44813
+ reply_to: exports_external2.coerce.number().optional().describe("Alias for message_id")
44812
44814
  }
44813
44815
  }, async (args) => {
44814
- const { from: fromParam, message_id, content } = args;
44816
+ const { from: fromParam, message_id: mid, reply_to, content } = args;
44817
+ const message_id = mid || reply_to;
44815
44818
  const original = getMessageById(message_id);
44816
44819
  if (!original) {
44817
44820
  return {
@@ -46948,18 +46951,21 @@ function registerChannelBridge(server, getAgentId, getSessionId) {
46948
46951
  }
46949
46952
  }
46950
46953
  function pushNotification(msg) {
46951
- console.error(`[channel-bridge] pushing notification: from=${msg.from_agent}, content=${msg.content.slice(0, 50)}`);
46954
+ console.error(`[channel-bridge] pushing notification: from=${msg.from_agent}, id=${msg.id}, content=${msg.content.slice(0, 50)}`);
46952
46955
  server.server.notification({
46953
46956
  method: "notifications/claude/channel",
46954
46957
  params: {
46955
46958
  content: msg.content,
46956
46959
  meta: {
46957
46960
  from: msg.from_agent,
46961
+ message_id: String(msg.id),
46958
46962
  session_id: msg.session_id,
46959
46963
  ...msg.space ? { space: msg.space } : {},
46960
46964
  ...msg.priority && msg.priority !== "normal" ? { priority: msg.priority } : {}
46961
46965
  }
46962
46966
  }
46967
+ }).catch((err) => {
46968
+ console.error(`[channel-bridge] notification error: ${err}`);
46963
46969
  });
46964
46970
  }
46965
46971
  function startPolling2() {
@@ -47003,7 +47009,10 @@ function registerChannelBridge(server, getAgentId, getSessionId) {
47003
47009
  } catch {}
47004
47010
  }, POLL_INTERVAL_MS);
47005
47011
  }
47006
- setTimeout(() => startPolling2(), 500);
47012
+ setTimeout(() => {
47013
+ console.error("[channel-bridge] attempting to start polling...");
47014
+ startPolling2();
47015
+ }, 2000);
47007
47016
  }
47008
47017
  var POLL_INTERVAL_MS = 1000;
47009
47018
  var init_channel = __esm(() => {
package/bin/mcp.js CHANGED
@@ -41218,7 +41218,8 @@ function registerMessagingTools(server, resolveProjectId) {
41218
41218
  target_session_id: exports_external.string().optional().describe("If provided, sends to a specific agent-claude session ID (UUID). The message auto-injects into that session's conversation.")
41219
41219
  }
41220
41220
  }, async (args) => {
41221
- const { from: fromParam, to, content, priority, blocking, project_id, target_session_id } = args;
41221
+ const { from: fromParam, to: toParam, to_agent, content, priority, blocking, project_id, target_session_id } = args;
41222
+ const to = toParam || to_agent;
41222
41223
  const from = resolveIdentity(fromParam);
41223
41224
  const msg = sendMessage({
41224
41225
  from,
@@ -41300,14 +41301,16 @@ function registerMessagingTools(server, resolveProjectId) {
41300
41301
  };
41301
41302
  });
41302
41303
  server.registerTool("reply", {
41303
- description: "Reply to a specific message, creating a thread. Sets reply_to so it can be retrieved with get_thread_replies.",
41304
+ description: "Reply to a specific message by its numeric ID, creating a thread. Use read_messages first to find the message ID.",
41304
41305
  inputSchema: {
41305
- message_id: exports_external.coerce.number(),
41306
+ message_id: exports_external.coerce.number().describe("Numeric message ID (integer) to reply to. Use read_messages to find IDs."),
41306
41307
  content: exports_external.string(),
41307
- from: exports_external.string().optional()
41308
+ from: exports_external.string().optional(),
41309
+ reply_to: exports_external.coerce.number().optional().describe("Alias for message_id")
41308
41310
  }
41309
41311
  }, async (args) => {
41310
- const { from: fromParam, message_id, content } = args;
41312
+ const { from: fromParam, message_id: mid, reply_to, content } = args;
41313
+ const message_id = mid || reply_to;
41311
41314
  const original = getMessageById(message_id);
41312
41315
  if (!original) {
41313
41316
  return {
@@ -44095,18 +44098,21 @@ function registerChannelBridge(server, getAgentId, getSessionId) {
44095
44098
  }
44096
44099
  }
44097
44100
  function pushNotification(msg) {
44098
- console.error(`[channel-bridge] pushing notification: from=${msg.from_agent}, content=${msg.content.slice(0, 50)}`);
44101
+ console.error(`[channel-bridge] pushing notification: from=${msg.from_agent}, id=${msg.id}, content=${msg.content.slice(0, 50)}`);
44099
44102
  server.server.notification({
44100
44103
  method: "notifications/claude/channel",
44101
44104
  params: {
44102
44105
  content: msg.content,
44103
44106
  meta: {
44104
44107
  from: msg.from_agent,
44108
+ message_id: String(msg.id),
44105
44109
  session_id: msg.session_id,
44106
44110
  ...msg.space ? { space: msg.space } : {},
44107
44111
  ...msg.priority && msg.priority !== "normal" ? { priority: msg.priority } : {}
44108
44112
  }
44109
44113
  }
44114
+ }).catch((err) => {
44115
+ console.error(`[channel-bridge] notification error: ${err}`);
44110
44116
  });
44111
44117
  }
44112
44118
  function startPolling() {
@@ -44150,7 +44156,10 @@ function registerChannelBridge(server, getAgentId, getSessionId) {
44150
44156
  } catch {}
44151
44157
  }, POLL_INTERVAL_MS);
44152
44158
  }
44153
- setTimeout(() => startPolling(), 500);
44159
+ setTimeout(() => {
44160
+ console.error("[channel-bridge] attempting to start polling...");
44161
+ startPolling();
44162
+ }, 2000);
44154
44163
  }
44155
44164
 
44156
44165
  // src/cli/commands/tmux.ts
@@ -44301,7 +44310,7 @@ function registerTmuxTools(server) {
44301
44310
  // package.json
44302
44311
  var package_default = {
44303
44312
  name: "@hasna/conversations",
44304
- version: "0.2.36",
44313
+ version: "0.2.37",
44305
44314
  description: "Real-time CLI messaging for AI agents",
44306
44315
  type: "module",
44307
44316
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.36",
3
+ "version": "0.2.37",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {