@ziggs-ai/ziggs-mcp 0.1.28 → 0.1.29

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 (2) hide show
  1. package/dist/tools.js +11 -2
  2. package/package.json +1 -1
package/dist/tools.js CHANGED
@@ -475,13 +475,22 @@ export function registerZiggsTools(server, creds, cfg) {
475
475
  .string()
476
476
  .optional()
477
477
  .describe('Usually "message" for user-visible chat'),
478
- }, WRITE, async ({ chatId, receiverId, text, entryType }) => {
478
+ idempotencyKey: z
479
+ .string()
480
+ .optional()
481
+ .describe('Retry-safe key. Reuse the SAME key when re-sending the SAME logical message (e.g. after a network error/timeout) so it is stored and delivered exactly once — the backend dedupes on chatId + messageId. Use a fresh key (or omit) for a genuinely new message.'),
482
+ }, WRITE, async ({ chatId, receiverId, text, entryType, idempotencyKey }) => {
479
483
  try {
480
484
  const result = await sendChatMessage({
481
485
  chatId,
482
486
  receiverId,
483
487
  text,
484
- messageId: `mcp_${randomUUID()}`,
488
+ // A stable idempotencyKey maps to a stable messageId so a retried
489
+ // logical send collapses to one row/one delivery (ZIG-718 backend
490
+ // dedupe); otherwise each call is a distinct message.
491
+ messageId: idempotencyKey
492
+ ? `mcp_idem_${idempotencyKey}`
493
+ : `mcp_${randomUUID()}`,
485
494
  entryType: entryType ?? 'message',
486
495
  contentType: 'text',
487
496
  }, creds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/ziggs-mcp",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "MCP server for Claude Code, Cursor, and other MCP hosts — act as your Ziggs delegate agent",
5
5
  "type": "module",
6
6
  "bin": {