@hasna/conversations 0.2.27 → 0.2.28

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
@@ -14122,12 +14122,13 @@ function sendMessage(opts) {
14122
14122
  const normalizedPriority = opts.priority === "low" || opts.priority === "normal" || opts.priority === "high" || opts.priority === "urgent" ? opts.priority : "normal";
14123
14123
  const blocking = opts.blocking ? 1 : 0;
14124
14124
  const replyTo = opts.reply_to || null;
14125
+ const msgUuid = randomUUID().replace(/-/g, "");
14125
14126
  const stmt = db2.prepare(`
14126
- INSERT INTO messages (session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
14127
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
14127
+ INSERT INTO messages (uuid, session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
14128
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
14128
14129
  RETURNING *
14129
14130
  `);
14130
- const row = stmt.get(sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
14131
+ const row = stmt.get(msgUuid, sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
14131
14132
  const message = parseMessage(row);
14132
14133
  if (opts.attachments && opts.attachments.length > 0) {
14133
14134
  const attachmentsDir = join11(getAttachmentsDir(), String(message.id));
@@ -14927,7 +14928,7 @@ var init_presence = __esm(() => {
14927
14928
  var require_package = __commonJS((exports, module) => {
14928
14929
  module.exports = {
14929
14930
  name: "@hasna/conversations",
14930
- version: "0.2.27",
14931
+ version: "0.2.28",
14931
14932
  description: "Real-time CLI messaging for AI agents",
14932
14933
  type: "module",
14933
14934
  bin: {
package/bin/mcp.js CHANGED
@@ -40234,12 +40234,13 @@ function sendMessage(opts) {
40234
40234
  const normalizedPriority = opts.priority === "low" || opts.priority === "normal" || opts.priority === "high" || opts.priority === "urgent" ? opts.priority : "normal";
40235
40235
  const blocking = opts.blocking ? 1 : 0;
40236
40236
  const replyTo = opts.reply_to || null;
40237
+ const msgUuid = randomUUID().replace(/-/g, "");
40237
40238
  const stmt = db2.prepare(`
40238
- INSERT INTO messages (session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
40239
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
40239
+ INSERT INTO messages (uuid, session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
40240
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
40240
40241
  RETURNING *
40241
40242
  `);
40242
- const row = stmt.get(sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
40243
+ const row = stmt.get(msgUuid, sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
40243
40244
  const message = parseMessage(row);
40244
40245
  if (opts.attachments && opts.attachments.length > 0) {
40245
40246
  const attachmentsDir = join10(getAttachmentsDir(), String(message.id));
@@ -44051,7 +44052,7 @@ function formatError2(e) {
44051
44052
  // package.json
44052
44053
  var package_default = {
44053
44054
  name: "@hasna/conversations",
44054
- version: "0.2.27",
44055
+ version: "0.2.28",
44055
44056
  description: "Real-time CLI messaging for AI agents",
44056
44057
  type: "module",
44057
44058
  bin: {
package/dist/index.js CHANGED
@@ -11747,12 +11747,13 @@ function sendMessage(opts) {
11747
11747
  const normalizedPriority = opts.priority === "low" || opts.priority === "normal" || opts.priority === "high" || opts.priority === "urgent" ? opts.priority : "normal";
11748
11748
  const blocking = opts.blocking ? 1 : 0;
11749
11749
  const replyTo = opts.reply_to || null;
11750
+ const msgUuid = randomUUID().replace(/-/g, "");
11750
11751
  const stmt = db2.prepare(`
11751
- INSERT INTO messages (session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
11752
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
11752
+ INSERT INTO messages (uuid, session_id, from_agent, to_agent, space, project_id, content, priority, working_dir, repository, branch, metadata, blocking, reply_to)
11753
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
11753
11754
  RETURNING *
11754
11755
  `);
11755
- const row = stmt.get(sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
11756
+ const row = stmt.get(msgUuid, sessionId, opts.from, opts.to, opts.space || null, opts.project_id || null, opts.content, normalizedPriority, opts.working_dir || null, opts.repository || null, opts.branch || null, metadata, blocking, replyTo);
11756
11757
  const message = parseMessage(row);
11757
11758
  if (opts.attachments && opts.attachments.length > 0) {
11758
11759
  const attachmentsDir = join8(getAttachmentsDir(), String(message.id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {