@hasna/conversations 0.2.40 → 0.2.41
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 +21 -18
- package/bin/mcp.js +21 -18
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -14934,7 +14934,7 @@ var init_presence = __esm(() => {
|
|
|
14934
14934
|
var require_package = __commonJS((exports, module) => {
|
|
14935
14935
|
module.exports = {
|
|
14936
14936
|
name: "@hasna/conversations",
|
|
14937
|
-
version: "0.2.
|
|
14937
|
+
version: "0.2.41",
|
|
14938
14938
|
description: "Real-time CLI messaging for AI agents",
|
|
14939
14939
|
type: "module",
|
|
14940
14940
|
bin: {
|
|
@@ -45655,15 +45655,10 @@ function registerChannelBridge(server) {
|
|
|
45655
45655
|
markReadByIds([msg.id]);
|
|
45656
45656
|
} catch {}
|
|
45657
45657
|
}
|
|
45658
|
-
const
|
|
45659
|
-
|
|
45660
|
-
|
|
45661
|
-
|
|
45662
|
-
msg.space ? `Space: ${msg.space}` : null,
|
|
45663
|
-
msg.priority && msg.priority !== "normal" ? `Priority: ${msg.priority}` : null
|
|
45664
|
-
].filter(Boolean).join(" | ");
|
|
45665
|
-
const enrichedContent = `[${context}]
|
|
45666
|
-
${msg.content}`;
|
|
45658
|
+
const enrichedContent = `${msg.content}
|
|
45659
|
+
|
|
45660
|
+
---
|
|
45661
|
+
[Via Conversations MCP from ${msg.from_agent} (message #${msg.id}). To reply, use the conversations send_message tool with to="${msg.from_agent}"]`;
|
|
45667
45662
|
server.server.notification({
|
|
45668
45663
|
method: "notifications/claude/channel",
|
|
45669
45664
|
params: {
|
|
@@ -45714,15 +45709,21 @@ var init_channel = __esm(() => {
|
|
|
45714
45709
|
// src/mcp/tools/agents.ts
|
|
45715
45710
|
function registerAgentTools(server, agentFocus, getAgentFocus) {
|
|
45716
45711
|
server.registerTool("register_agent", {
|
|
45717
|
-
description: "Register an agent
|
|
45712
|
+
description: "Register an agent. Just provide the name \u2014 session_id is auto-detected.",
|
|
45718
45713
|
inputSchema: {
|
|
45719
|
-
name: exports_external2.string(),
|
|
45720
|
-
|
|
45714
|
+
name: exports_external2.string().optional().describe("Agent name"),
|
|
45715
|
+
agent_name: exports_external2.string().optional().describe("Agent name (alias)"),
|
|
45716
|
+
agent_id: exports_external2.string().optional().describe("Agent name (alias)"),
|
|
45717
|
+
session_id: exports_external2.string().optional().describe("Auto-detected from environment, do not set manually"),
|
|
45721
45718
|
role: exports_external2.string().optional(),
|
|
45722
45719
|
project_id: exports_external2.string().optional()
|
|
45723
45720
|
}
|
|
45724
45721
|
}, async (args) => {
|
|
45725
|
-
const { name, session_id, role, project_id } = args;
|
|
45722
|
+
const { name: nameParam, agent_name, agent_id, session_id: manualSid, role, project_id } = args;
|
|
45723
|
+
const name = nameParam || agent_name || agent_id;
|
|
45724
|
+
if (!name)
|
|
45725
|
+
return { content: [{ type: "text", text: "Error: name is required" }], isError: true };
|
|
45726
|
+
const session_id = manualSid || process.env.CONVERSATIONS_SESSION_ID || `${name}-${Date.now()}`;
|
|
45726
45727
|
try {
|
|
45727
45728
|
const result = registerAgent(name, session_id, role, project_id);
|
|
45728
45729
|
setSessionAgent(name);
|
|
@@ -45740,14 +45741,16 @@ function registerAgentTools(server, agentFocus, getAgentFocus) {
|
|
|
45740
45741
|
}
|
|
45741
45742
|
});
|
|
45742
45743
|
server.registerTool("heartbeat", {
|
|
45743
|
-
description: "Send presence heartbeat.",
|
|
45744
|
+
description: "Send presence heartbeat. Use 'from' or 'name' to set agent identity.",
|
|
45744
45745
|
inputSchema: {
|
|
45745
|
-
from: exports_external2.string().optional(),
|
|
45746
|
+
from: exports_external2.string().optional().describe("Agent name"),
|
|
45747
|
+
name: exports_external2.string().optional().describe("Agent name (alias for from)"),
|
|
45748
|
+
agent_name: exports_external2.string().optional().describe("Agent name (alias for from)"),
|
|
45746
45749
|
status: exports_external2.string().optional()
|
|
45747
45750
|
}
|
|
45748
45751
|
}, async (args) => {
|
|
45749
|
-
const { from: fromParam, status } = args;
|
|
45750
|
-
const agent = resolveIdentity(fromParam);
|
|
45752
|
+
const { from: fromParam, name: nameParam, agent_name, status } = args;
|
|
45753
|
+
const agent = resolveIdentity(fromParam || nameParam || agent_name);
|
|
45751
45754
|
heartbeat(agent, status);
|
|
45752
45755
|
setSessionAgent(agent);
|
|
45753
45756
|
return {
|
package/bin/mcp.js
CHANGED
|
@@ -42499,15 +42499,10 @@ function registerChannelBridge(server) {
|
|
|
42499
42499
|
markReadByIds([msg.id]);
|
|
42500
42500
|
} catch {}
|
|
42501
42501
|
}
|
|
42502
|
-
const
|
|
42503
|
-
|
|
42504
|
-
|
|
42505
|
-
|
|
42506
|
-
msg.space ? `Space: ${msg.space}` : null,
|
|
42507
|
-
msg.priority && msg.priority !== "normal" ? `Priority: ${msg.priority}` : null
|
|
42508
|
-
].filter(Boolean).join(" | ");
|
|
42509
|
-
const enrichedContent = `[${context}]
|
|
42510
|
-
${msg.content}`;
|
|
42502
|
+
const enrichedContent = `${msg.content}
|
|
42503
|
+
|
|
42504
|
+
---
|
|
42505
|
+
[Via Conversations MCP from ${msg.from_agent} (message #${msg.id}). To reply, use the conversations send_message tool with to="${msg.from_agent}"]`;
|
|
42511
42506
|
server.server.notification({
|
|
42512
42507
|
method: "notifications/claude/channel",
|
|
42513
42508
|
params: {
|
|
@@ -42554,15 +42549,21 @@ ${msg.content}`;
|
|
|
42554
42549
|
// src/mcp/tools/agents.ts
|
|
42555
42550
|
function registerAgentTools(server, agentFocus, getAgentFocus) {
|
|
42556
42551
|
server.registerTool("register_agent", {
|
|
42557
|
-
description: "Register an agent
|
|
42552
|
+
description: "Register an agent. Just provide the name \u2014 session_id is auto-detected.",
|
|
42558
42553
|
inputSchema: {
|
|
42559
|
-
name: exports_external.string(),
|
|
42560
|
-
|
|
42554
|
+
name: exports_external.string().optional().describe("Agent name"),
|
|
42555
|
+
agent_name: exports_external.string().optional().describe("Agent name (alias)"),
|
|
42556
|
+
agent_id: exports_external.string().optional().describe("Agent name (alias)"),
|
|
42557
|
+
session_id: exports_external.string().optional().describe("Auto-detected from environment, do not set manually"),
|
|
42561
42558
|
role: exports_external.string().optional(),
|
|
42562
42559
|
project_id: exports_external.string().optional()
|
|
42563
42560
|
}
|
|
42564
42561
|
}, async (args) => {
|
|
42565
|
-
const { name, session_id, role, project_id } = args;
|
|
42562
|
+
const { name: nameParam, agent_name, agent_id, session_id: manualSid, role, project_id } = args;
|
|
42563
|
+
const name = nameParam || agent_name || agent_id;
|
|
42564
|
+
if (!name)
|
|
42565
|
+
return { content: [{ type: "text", text: "Error: name is required" }], isError: true };
|
|
42566
|
+
const session_id = manualSid || process.env.CONVERSATIONS_SESSION_ID || `${name}-${Date.now()}`;
|
|
42566
42567
|
try {
|
|
42567
42568
|
const result = registerAgent(name, session_id, role, project_id);
|
|
42568
42569
|
setSessionAgent(name);
|
|
@@ -42580,14 +42581,16 @@ function registerAgentTools(server, agentFocus, getAgentFocus) {
|
|
|
42580
42581
|
}
|
|
42581
42582
|
});
|
|
42582
42583
|
server.registerTool("heartbeat", {
|
|
42583
|
-
description: "Send presence heartbeat.",
|
|
42584
|
+
description: "Send presence heartbeat. Use 'from' or 'name' to set agent identity.",
|
|
42584
42585
|
inputSchema: {
|
|
42585
|
-
from: exports_external.string().optional(),
|
|
42586
|
+
from: exports_external.string().optional().describe("Agent name"),
|
|
42587
|
+
name: exports_external.string().optional().describe("Agent name (alias for from)"),
|
|
42588
|
+
agent_name: exports_external.string().optional().describe("Agent name (alias for from)"),
|
|
42586
42589
|
status: exports_external.string().optional()
|
|
42587
42590
|
}
|
|
42588
42591
|
}, async (args) => {
|
|
42589
|
-
const { from: fromParam, status } = args;
|
|
42590
|
-
const agent = resolveIdentity(fromParam);
|
|
42592
|
+
const { from: fromParam, name: nameParam, agent_name, status } = args;
|
|
42593
|
+
const agent = resolveIdentity(fromParam || nameParam || agent_name);
|
|
42591
42594
|
heartbeat(agent, status);
|
|
42592
42595
|
setSessionAgent(agent);
|
|
42593
42596
|
return {
|
|
@@ -44443,7 +44446,7 @@ function registerTmuxTools(server) {
|
|
|
44443
44446
|
// package.json
|
|
44444
44447
|
var package_default = {
|
|
44445
44448
|
name: "@hasna/conversations",
|
|
44446
|
-
version: "0.2.
|
|
44449
|
+
version: "0.2.41",
|
|
44447
44450
|
description: "Real-time CLI messaging for AI agents",
|
|
44448
44451
|
type: "module",
|
|
44449
44452
|
bin: {
|