@hasna/conversations 0.1.0 → 0.1.2

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/bin/index.js CHANGED
@@ -2685,7 +2685,7 @@ var init_presence = __esm(() => {
2685
2685
  var require_package = __commonJS((exports, module) => {
2686
2686
  module.exports = {
2687
2687
  name: "@hasna/conversations",
2688
- version: "0.1.0",
2688
+ version: "0.1.2",
2689
2689
  description: "Real-time CLI messaging for AI agents",
2690
2690
  type: "module",
2691
2691
  bin: {
@@ -31627,7 +31627,8 @@ var init_stdio2 = __esm(() => {
31627
31627
  // src/mcp/index.ts
31628
31628
  var exports_mcp = {};
31629
31629
  __export(exports_mcp, {
31630
- startMcpServer: () => startMcpServer
31630
+ startMcpServer: () => startMcpServer,
31631
+ server: () => server
31631
31632
  });
31632
31633
  async function startMcpServer() {
31633
31634
  const transport = new StdioServerTransport;
@@ -31649,8 +31650,9 @@ var init_mcp2 = __esm(() => {
31649
31650
  });
31650
31651
  server.registerTool("send_message", {
31651
31652
  title: "Send Message",
31652
- description: "Send a direct message to another agent. The sender is auto-resolved from CONVERSATIONS_AGENT_ID env var.",
31653
+ description: "Send a direct message to another agent. Pass 'from' to identify yourself, or it falls back to CONVERSATIONS_AGENT_ID env var.",
31653
31654
  inputSchema: {
31655
+ from: exports_external.string().optional().describe("Your agent ID (e.g. 'claude-1', 'assistant'). Falls back to CONVERSATIONS_AGENT_ID env var."),
31654
31656
  to: exports_external.string().describe("Recipient agent ID"),
31655
31657
  content: exports_external.string().describe("Message content"),
31656
31658
  session_id: exports_external.string().optional().describe("Session ID (auto-generated if omitted)"),
@@ -31660,8 +31662,8 @@ var init_mcp2 = __esm(() => {
31660
31662
  branch: exports_external.string().optional().describe("Branch context"),
31661
31663
  metadata: exports_external.string().optional().describe("JSON metadata string")
31662
31664
  }
31663
- }, async ({ to, content, session_id, priority, working_dir, repository, branch, metadata }) => {
31664
- const from = resolveIdentity();
31665
+ }, async ({ from: fromParam, to, content, session_id, priority, working_dir, repository, branch, metadata }) => {
31666
+ const from = resolveIdentity(fromParam);
31665
31667
  let parsedMetadata;
31666
31668
  if (metadata) {
31667
31669
  try {
@@ -31722,11 +31724,12 @@ var init_mcp2 = __esm(() => {
31722
31724
  title: "Reply to Message",
31723
31725
  description: "Reply to a message by its ID. Automatically uses the same session and sends to the original sender.",
31724
31726
  inputSchema: {
31727
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31725
31728
  message_id: exports_external.number().describe("ID of the message to reply to"),
31726
31729
  content: exports_external.string().describe("Reply content"),
31727
31730
  priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional().describe("Message priority")
31728
31731
  }
31729
- }, async ({ message_id, content, priority }) => {
31732
+ }, async ({ from: fromParam, message_id, content, priority }) => {
31730
31733
  const original = getMessageById(message_id);
31731
31734
  if (!original) {
31732
31735
  return {
@@ -31734,7 +31737,7 @@ var init_mcp2 = __esm(() => {
31734
31737
  isError: true
31735
31738
  };
31736
31739
  }
31737
- const from = resolveIdentity();
31740
+ const from = resolveIdentity(fromParam);
31738
31741
  const space = original.space || (original.session_id?.startsWith("space:") ? original.session_id.slice(6) : undefined);
31739
31742
  const to = space ? space : original.from_agent === from ? original.to_agent : original.from_agent;
31740
31743
  const msg = sendMessage({
@@ -31753,11 +31756,12 @@ var init_mcp2 = __esm(() => {
31753
31756
  title: "Mark Read",
31754
31757
  description: "Mark message IDs as read for the current agent. Set 'all' to true to mark all unread messages as read.",
31755
31758
  inputSchema: {
31759
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31756
31760
  ids: exports_external.array(exports_external.number()).optional().describe("Message IDs to mark as read"),
31757
31761
  all: exports_external.boolean().optional().describe("Mark all unread messages as read")
31758
31762
  }
31759
- }, async ({ ids, all }) => {
31760
- const agent = resolveIdentity();
31763
+ }, async ({ from: fromParam, ids, all }) => {
31764
+ const agent = resolveIdentity(fromParam);
31761
31765
  let count;
31762
31766
  if (all) {
31763
31767
  count = markAllRead(agent);
@@ -31810,13 +31814,14 @@ var init_mcp2 = __esm(() => {
31810
31814
  title: "Create Space",
31811
31815
  description: "Create a new space. The creator is auto-joined. Spaces can be nested (max 3 levels) and associated with a project.",
31812
31816
  inputSchema: {
31817
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31813
31818
  name: exports_external.string().describe("Space name (e.g. 'deployments', 'code-review')"),
31814
31819
  description: exports_external.string().optional().describe("Space description"),
31815
31820
  parent_id: exports_external.string().optional().describe("Parent space name for nesting (max 3 levels deep)"),
31816
31821
  project_id: exports_external.string().optional().describe("Project ID to associate this space with")
31817
31822
  }
31818
- }, async ({ name, description, parent_id, project_id }) => {
31819
- const agent = resolveIdentity();
31823
+ }, async ({ from: fromParam, name, description, parent_id, project_id }) => {
31824
+ const agent = resolveIdentity(fromParam);
31820
31825
  try {
31821
31826
  const sp = createSpace(name, agent, { description, parent_id, project_id });
31822
31827
  return {
@@ -31863,12 +31868,13 @@ var init_mcp2 = __esm(() => {
31863
31868
  title: "Send to Space",
31864
31869
  description: "Send a message to a space. All members can see it.",
31865
31870
  inputSchema: {
31871
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31866
31872
  space: exports_external.string().describe("Space name"),
31867
31873
  content: exports_external.string().describe("Message content"),
31868
31874
  priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional().describe("Message priority")
31869
31875
  }
31870
- }, async ({ space, content, priority }) => {
31871
- const from = resolveIdentity();
31876
+ }, async ({ from: fromParam, space, content, priority }) => {
31877
+ const from = resolveIdentity(fromParam);
31872
31878
  const sp = getSpace(space);
31873
31879
  if (!sp) {
31874
31880
  return {
@@ -31906,10 +31912,11 @@ var init_mcp2 = __esm(() => {
31906
31912
  title: "Join Space",
31907
31913
  description: "Join a space to receive messages.",
31908
31914
  inputSchema: {
31915
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31909
31916
  space: exports_external.string().describe("Space name to join")
31910
31917
  }
31911
- }, async ({ space }) => {
31912
- const agent = resolveIdentity();
31918
+ }, async ({ from: fromParam, space }) => {
31919
+ const agent = resolveIdentity(fromParam);
31913
31920
  const ok = joinSpace(space, agent);
31914
31921
  if (!ok) {
31915
31922
  return {
@@ -31925,10 +31932,11 @@ var init_mcp2 = __esm(() => {
31925
31932
  title: "Leave Space",
31926
31933
  description: "Leave a space.",
31927
31934
  inputSchema: {
31935
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
31928
31936
  space: exports_external.string().describe("Space name to leave")
31929
31937
  }
31930
- }, async ({ space }) => {
31931
- const agent = resolveIdentity();
31938
+ }, async ({ from: fromParam, space }) => {
31939
+ const agent = resolveIdentity(fromParam);
31932
31940
  const left = leaveSpace(space, agent);
31933
31941
  return {
31934
31942
  content: [{ type: "text", text: JSON.stringify({ space, agent, left }, null, 2) }]
@@ -32005,6 +32013,7 @@ var init_mcp2 = __esm(() => {
32005
32013
  title: "Create Project",
32006
32014
  description: "Create a new project. Projects organize spaces and provide context for agent collaboration.",
32007
32015
  inputSchema: {
32016
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
32008
32017
  name: exports_external.string().describe("Project name (unique)"),
32009
32018
  description: exports_external.string().optional().describe("Project description"),
32010
32019
  path: exports_external.string().optional().describe("Absolute path to project on disk"),
@@ -32013,8 +32022,8 @@ var init_mcp2 = __esm(() => {
32013
32022
  metadata: exports_external.string().optional().describe("JSON metadata string"),
32014
32023
  settings: exports_external.string().optional().describe("JSON settings string")
32015
32024
  }
32016
- }, async ({ name, description, path, repository, tags, metadata, settings }) => {
32017
- const agent = resolveIdentity();
32025
+ }, async ({ from: fromParam, name, description, path, repository, tags, metadata, settings }) => {
32026
+ const agent = resolveIdentity(fromParam);
32018
32027
  let parsedTags;
32019
32028
  if (tags) {
32020
32029
  try {
@@ -32203,12 +32212,13 @@ var init_mcp2 = __esm(() => {
32203
32212
  });
32204
32213
  server.registerTool("delete_message", {
32205
32214
  title: "Delete Message",
32206
- description: "Delete a message. Only the sender can delete their own messages. The agent is auto-resolved.",
32215
+ description: "Delete a message. Only the sender can delete their own messages.",
32207
32216
  inputSchema: {
32217
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
32208
32218
  id: exports_external.number().describe("Message ID to delete")
32209
32219
  }
32210
- }, async ({ id }) => {
32211
- const agent = resolveIdentity();
32220
+ }, async ({ from: fromParam, id }) => {
32221
+ const agent = resolveIdentity(fromParam);
32212
32222
  const deleted = deleteMessage(id, agent);
32213
32223
  if (!deleted) {
32214
32224
  return {
@@ -32222,13 +32232,14 @@ var init_mcp2 = __esm(() => {
32222
32232
  });
32223
32233
  server.registerTool("edit_message", {
32224
32234
  title: "Edit Message",
32225
- description: "Edit a message's content. Only the sender can edit their own messages. The agent is auto-resolved.",
32235
+ description: "Edit a message's content. Only the sender can edit their own messages.",
32226
32236
  inputSchema: {
32237
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
32227
32238
  id: exports_external.number().describe("Message ID to edit"),
32228
32239
  content: exports_external.string().describe("New message content")
32229
32240
  }
32230
- }, async ({ id, content }) => {
32231
- const agent = resolveIdentity();
32241
+ }, async ({ from: fromParam, id, content }) => {
32242
+ const agent = resolveIdentity(fromParam);
32232
32243
  const msg = editMessage(id, agent, content);
32233
32244
  if (!msg) {
32234
32245
  return {
@@ -32292,12 +32303,13 @@ var init_mcp2 = __esm(() => {
32292
32303
  });
32293
32304
  server.registerTool("heartbeat", {
32294
32305
  title: "Heartbeat",
32295
- description: "Send a heartbeat to indicate agent is alive. Auto-resolves agent from CONVERSATIONS_AGENT_ID env var. Optionally set a status.",
32306
+ description: "Send a heartbeat to indicate agent is alive. Optionally set a status.",
32296
32307
  inputSchema: {
32308
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
32297
32309
  status: exports_external.string().optional().describe("Agent status (e.g. 'online', 'busy', 'idle'). Defaults to 'online'.")
32298
32310
  }
32299
- }, async ({ status }) => {
32300
- const agent = resolveIdentity();
32311
+ }, async ({ from: fromParam, status }) => {
32312
+ const agent = resolveIdentity(fromParam);
32301
32313
  heartbeat(agent, status);
32302
32314
  return {
32303
32315
  content: [{ type: "text", text: JSON.stringify({ agent, status: status || "online", heartbeat: true }, null, 2) }]
@@ -34614,6 +34626,11 @@ program2.command("dashboard").description("Start web dashboard").option("--port
34614
34626
  startDashboardServer2(port, opts.host);
34615
34627
  });
34616
34628
  program2.action(() => {
34629
+ if (!process.stdin.isTTY) {
34630
+ console.error(chalk2.red("Interactive mode requires a TTY terminal."));
34631
+ console.error(chalk2.dim("Use subcommands (send, read, sessions, etc.) for non-interactive use."));
34632
+ process.exit(1);
34633
+ }
34617
34634
  const agent = resolveIdentity();
34618
34635
  render(React8.createElement(App, { agent }));
34619
34636
  });
package/bin/mcp.js CHANGED
@@ -29098,8 +29098,9 @@ var server = new McpServer({
29098
29098
  });
29099
29099
  server.registerTool("send_message", {
29100
29100
  title: "Send Message",
29101
- description: "Send a direct message to another agent. The sender is auto-resolved from CONVERSATIONS_AGENT_ID env var.",
29101
+ description: "Send a direct message to another agent. Pass 'from' to identify yourself, or it falls back to CONVERSATIONS_AGENT_ID env var.",
29102
29102
  inputSchema: {
29103
+ from: exports_external.string().optional().describe("Your agent ID (e.g. 'claude-1', 'assistant'). Falls back to CONVERSATIONS_AGENT_ID env var."),
29103
29104
  to: exports_external.string().describe("Recipient agent ID"),
29104
29105
  content: exports_external.string().describe("Message content"),
29105
29106
  session_id: exports_external.string().optional().describe("Session ID (auto-generated if omitted)"),
@@ -29109,8 +29110,8 @@ server.registerTool("send_message", {
29109
29110
  branch: exports_external.string().optional().describe("Branch context"),
29110
29111
  metadata: exports_external.string().optional().describe("JSON metadata string")
29111
29112
  }
29112
- }, async ({ to, content, session_id, priority, working_dir, repository, branch, metadata }) => {
29113
- const from = resolveIdentity();
29113
+ }, async ({ from: fromParam, to, content, session_id, priority, working_dir, repository, branch, metadata }) => {
29114
+ const from = resolveIdentity(fromParam);
29114
29115
  let parsedMetadata;
29115
29116
  if (metadata) {
29116
29117
  try {
@@ -29171,11 +29172,12 @@ server.registerTool("reply", {
29171
29172
  title: "Reply to Message",
29172
29173
  description: "Reply to a message by its ID. Automatically uses the same session and sends to the original sender.",
29173
29174
  inputSchema: {
29175
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29174
29176
  message_id: exports_external.number().describe("ID of the message to reply to"),
29175
29177
  content: exports_external.string().describe("Reply content"),
29176
29178
  priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional().describe("Message priority")
29177
29179
  }
29178
- }, async ({ message_id, content, priority }) => {
29180
+ }, async ({ from: fromParam, message_id, content, priority }) => {
29179
29181
  const original = getMessageById(message_id);
29180
29182
  if (!original) {
29181
29183
  return {
@@ -29183,7 +29185,7 @@ server.registerTool("reply", {
29183
29185
  isError: true
29184
29186
  };
29185
29187
  }
29186
- const from = resolveIdentity();
29188
+ const from = resolveIdentity(fromParam);
29187
29189
  const space = original.space || (original.session_id?.startsWith("space:") ? original.session_id.slice(6) : undefined);
29188
29190
  const to = space ? space : original.from_agent === from ? original.to_agent : original.from_agent;
29189
29191
  const msg = sendMessage({
@@ -29202,11 +29204,12 @@ server.registerTool("mark_read", {
29202
29204
  title: "Mark Read",
29203
29205
  description: "Mark message IDs as read for the current agent. Set 'all' to true to mark all unread messages as read.",
29204
29206
  inputSchema: {
29207
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29205
29208
  ids: exports_external.array(exports_external.number()).optional().describe("Message IDs to mark as read"),
29206
29209
  all: exports_external.boolean().optional().describe("Mark all unread messages as read")
29207
29210
  }
29208
- }, async ({ ids, all }) => {
29209
- const agent = resolveIdentity();
29211
+ }, async ({ from: fromParam, ids, all }) => {
29212
+ const agent = resolveIdentity(fromParam);
29210
29213
  let count;
29211
29214
  if (all) {
29212
29215
  count = markAllRead(agent);
@@ -29259,13 +29262,14 @@ server.registerTool("create_space", {
29259
29262
  title: "Create Space",
29260
29263
  description: "Create a new space. The creator is auto-joined. Spaces can be nested (max 3 levels) and associated with a project.",
29261
29264
  inputSchema: {
29265
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29262
29266
  name: exports_external.string().describe("Space name (e.g. 'deployments', 'code-review')"),
29263
29267
  description: exports_external.string().optional().describe("Space description"),
29264
29268
  parent_id: exports_external.string().optional().describe("Parent space name for nesting (max 3 levels deep)"),
29265
29269
  project_id: exports_external.string().optional().describe("Project ID to associate this space with")
29266
29270
  }
29267
- }, async ({ name, description, parent_id, project_id }) => {
29268
- const agent = resolveIdentity();
29271
+ }, async ({ from: fromParam, name, description, parent_id, project_id }) => {
29272
+ const agent = resolveIdentity(fromParam);
29269
29273
  try {
29270
29274
  const sp = createSpace(name, agent, { description, parent_id, project_id });
29271
29275
  return {
@@ -29312,12 +29316,13 @@ server.registerTool("send_to_space", {
29312
29316
  title: "Send to Space",
29313
29317
  description: "Send a message to a space. All members can see it.",
29314
29318
  inputSchema: {
29319
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29315
29320
  space: exports_external.string().describe("Space name"),
29316
29321
  content: exports_external.string().describe("Message content"),
29317
29322
  priority: exports_external.enum(["low", "normal", "high", "urgent"]).optional().describe("Message priority")
29318
29323
  }
29319
- }, async ({ space, content, priority }) => {
29320
- const from = resolveIdentity();
29324
+ }, async ({ from: fromParam, space, content, priority }) => {
29325
+ const from = resolveIdentity(fromParam);
29321
29326
  const sp = getSpace(space);
29322
29327
  if (!sp) {
29323
29328
  return {
@@ -29355,10 +29360,11 @@ server.registerTool("join_space", {
29355
29360
  title: "Join Space",
29356
29361
  description: "Join a space to receive messages.",
29357
29362
  inputSchema: {
29363
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29358
29364
  space: exports_external.string().describe("Space name to join")
29359
29365
  }
29360
- }, async ({ space }) => {
29361
- const agent = resolveIdentity();
29366
+ }, async ({ from: fromParam, space }) => {
29367
+ const agent = resolveIdentity(fromParam);
29362
29368
  const ok = joinSpace(space, agent);
29363
29369
  if (!ok) {
29364
29370
  return {
@@ -29374,10 +29380,11 @@ server.registerTool("leave_space", {
29374
29380
  title: "Leave Space",
29375
29381
  description: "Leave a space.",
29376
29382
  inputSchema: {
29383
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29377
29384
  space: exports_external.string().describe("Space name to leave")
29378
29385
  }
29379
- }, async ({ space }) => {
29380
- const agent = resolveIdentity();
29386
+ }, async ({ from: fromParam, space }) => {
29387
+ const agent = resolveIdentity(fromParam);
29381
29388
  const left = leaveSpace(space, agent);
29382
29389
  return {
29383
29390
  content: [{ type: "text", text: JSON.stringify({ space, agent, left }, null, 2) }]
@@ -29454,6 +29461,7 @@ server.registerTool("create_project", {
29454
29461
  title: "Create Project",
29455
29462
  description: "Create a new project. Projects organize spaces and provide context for agent collaboration.",
29456
29463
  inputSchema: {
29464
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29457
29465
  name: exports_external.string().describe("Project name (unique)"),
29458
29466
  description: exports_external.string().optional().describe("Project description"),
29459
29467
  path: exports_external.string().optional().describe("Absolute path to project on disk"),
@@ -29462,8 +29470,8 @@ server.registerTool("create_project", {
29462
29470
  metadata: exports_external.string().optional().describe("JSON metadata string"),
29463
29471
  settings: exports_external.string().optional().describe("JSON settings string")
29464
29472
  }
29465
- }, async ({ name, description, path, repository, tags, metadata, settings }) => {
29466
- const agent = resolveIdentity();
29473
+ }, async ({ from: fromParam, name, description, path, repository, tags, metadata, settings }) => {
29474
+ const agent = resolveIdentity(fromParam);
29467
29475
  let parsedTags;
29468
29476
  if (tags) {
29469
29477
  try {
@@ -29652,12 +29660,13 @@ server.registerTool("delete_project", {
29652
29660
  });
29653
29661
  server.registerTool("delete_message", {
29654
29662
  title: "Delete Message",
29655
- description: "Delete a message. Only the sender can delete their own messages. The agent is auto-resolved.",
29663
+ description: "Delete a message. Only the sender can delete their own messages.",
29656
29664
  inputSchema: {
29665
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29657
29666
  id: exports_external.number().describe("Message ID to delete")
29658
29667
  }
29659
- }, async ({ id }) => {
29660
- const agent = resolveIdentity();
29668
+ }, async ({ from: fromParam, id }) => {
29669
+ const agent = resolveIdentity(fromParam);
29661
29670
  const deleted = deleteMessage(id, agent);
29662
29671
  if (!deleted) {
29663
29672
  return {
@@ -29671,13 +29680,14 @@ server.registerTool("delete_message", {
29671
29680
  });
29672
29681
  server.registerTool("edit_message", {
29673
29682
  title: "Edit Message",
29674
- description: "Edit a message's content. Only the sender can edit their own messages. The agent is auto-resolved.",
29683
+ description: "Edit a message's content. Only the sender can edit their own messages.",
29675
29684
  inputSchema: {
29685
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29676
29686
  id: exports_external.number().describe("Message ID to edit"),
29677
29687
  content: exports_external.string().describe("New message content")
29678
29688
  }
29679
- }, async ({ id, content }) => {
29680
- const agent = resolveIdentity();
29689
+ }, async ({ from: fromParam, id, content }) => {
29690
+ const agent = resolveIdentity(fromParam);
29681
29691
  const msg = editMessage(id, agent, content);
29682
29692
  if (!msg) {
29683
29693
  return {
@@ -29741,12 +29751,13 @@ server.registerTool("get_pinned_messages", {
29741
29751
  });
29742
29752
  server.registerTool("heartbeat", {
29743
29753
  title: "Heartbeat",
29744
- description: "Send a heartbeat to indicate agent is alive. Auto-resolves agent from CONVERSATIONS_AGENT_ID env var. Optionally set a status.",
29754
+ description: "Send a heartbeat to indicate agent is alive. Optionally set a status.",
29745
29755
  inputSchema: {
29756
+ from: exports_external.string().optional().describe("Your agent ID. Falls back to CONVERSATIONS_AGENT_ID env var."),
29746
29757
  status: exports_external.string().optional().describe("Agent status (e.g. 'online', 'busy', 'idle'). Defaults to 'online'.")
29747
29758
  }
29748
- }, async ({ status }) => {
29749
- const agent = resolveIdentity();
29759
+ }, async ({ from: fromParam, status }) => {
29760
+ const agent = resolveIdentity(fromParam);
29750
29761
  heartbeat(agent, status);
29751
29762
  return {
29752
29763
  content: [{ type: "text", text: JSON.stringify({ agent, status: status || "online", heartbeat: true }, null, 2) }]
@@ -29776,5 +29787,6 @@ if (isDirectRun) {
29776
29787
  });
29777
29788
  }
29778
29789
  export {
29779
- startMcpServer
29790
+ startMcpServer,
29791
+ server
29780
29792
  };
@@ -7,4 +7,6 @@
7
7
  * conversations mcp # Start MCP server on stdio
8
8
  * conversations-mcp # Direct binary
9
9
  */
10
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
11
+ export declare const server: McpServer;
10
12
  export declare function startMcpServer(): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {