@hasna/conversations 0.2.22 → 0.2.24

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.
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerAgentCommands(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerAnalyticsCommands(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerMessagingCommands(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerProjectCommands(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerSpaceCommands(program: Command): void;
package/dist/index.js CHANGED
@@ -9485,7 +9485,7 @@ function getDb() {
9485
9485
  return db;
9486
9486
  const dbPath = getDbPath2();
9487
9487
  mkdirSync3(dirname2(dbPath), { recursive: true });
9488
- db = new SqliteAdapter(dbPath, { create: true });
9488
+ db = new SqliteAdapter(dbPath);
9489
9489
  db.exec("PRAGMA journal_mode = WAL");
9490
9490
  db.exec("PRAGMA busy_timeout = 5000");
9491
9491
  db.exec(`
@@ -13114,7 +13114,7 @@ function registerAgent(name, sessionId, role, projectId) {
13114
13114
  `).run(id, normalizedName, sessionId, resolvedRole, projectId ?? null);
13115
13115
  const created = db2.prepare("SELECT * FROM agent_presence WHERE agent = ?").get(normalizedName);
13116
13116
  return { agent: parsePresence(created), created: true, took_over: false };
13117
- }).immediate();
13117
+ });
13118
13118
  return result;
13119
13119
  }
13120
13120
  function heartbeat(agent, status, metadata, sessionId) {
@@ -13202,7 +13202,7 @@ function acquireLock(resourceType, resourceId, agentId, lockType = "advisory", e
13202
13202
  SELECT * FROM resource_locks WHERE resource_type = ? AND resource_id = ? AND lock_type = ?
13203
13203
  `).get(resourceType, resourceId, lockType);
13204
13204
  return { acquired: true, lock };
13205
- }).immediate();
13205
+ });
13206
13206
  }
13207
13207
  function bulkAcquireLock(resources, agentId) {
13208
13208
  const db2 = getDb();
@@ -13236,7 +13236,7 @@ function bulkAcquireLock(resources, agentId) {
13236
13236
  acquired.push(lock);
13237
13237
  }
13238
13238
  return { acquired: true, locks: acquired };
13239
- }).immediate();
13239
+ });
13240
13240
  }
13241
13241
  function tryBulkAcquireLock(resources, agentId) {
13242
13242
  try {
@@ -13710,7 +13710,7 @@ function buildGraph() {
13710
13710
  weight = excluded.weight,
13711
13711
  updated_at = excluded.updated_at
13712
13712
  `);
13713
- const insertOrUpdate = db2.transaction(() => {
13713
+ db2.transaction(() => {
13714
13714
  const dmPairs = db2.prepare(`
13715
13715
  SELECT from_agent, to_agent, COUNT(*) as cnt, MAX(created_at) as last_at
13716
13716
  FROM messages WHERE space IS NULL AND from_agent != to_agent
@@ -13756,7 +13756,6 @@ function buildGraph() {
13756
13756
  created++;
13757
13757
  }
13758
13758
  });
13759
- insertOrUpdate();
13760
13759
  return { edges_created: created, edges_updated: updated };
13761
13760
  }
13762
13761
  function getRelated(entityType, entityId) {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Advanced tools: locks, graph, reactions, read receipts, mentions, unread counts,
3
+ * threads, hot sessions, topics, summary, search_tools, describe_tools, send_feedback
4
+ */
5
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
+ export declare function registerAdvancedTools(server: McpServer, pkgVersion: string): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Agent/presence tools: register_agent, heartbeat, list_agents, remove_agent,
3
+ * rename_agent, set_focus, get_focus, unfocus, get_session_activity, get_blockers
4
+ */
5
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
+ export declare function registerAgentTools(server: McpServer, agentFocus: Map<string, {
7
+ project_id: string | null;
8
+ }>, getAgentFocus: (agentId: string) => string | null): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Messaging tools: send_message, read_messages, read_digest, list_sessions, reply,
3
+ * mark_read, mark_unread, mark_space_read, search_messages, export_messages,
4
+ * delete_message, edit_message, pin_message, unpin_message, get_pinned_messages,
5
+ * mark_all_read, broadcast
6
+ */
7
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ export declare function registerMessagingTools(server: McpServer, resolveProjectId: (explicitProjectId: string | undefined, agentId: string) => string | undefined): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Project tools: create_project, list_projects, get_project, update_project, delete_project
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ export declare function registerProjectTools(server: McpServer): void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Space tools: create_space, list_spaces, send_to_space, read_space,
3
+ * join_space, leave_space, update_space, archive_space, unarchive_space,
4
+ * set_space_topic, get_space_topic, summarize_space
5
+ */
6
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
+ export declare function registerSpaceTools(server: McpServer): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {