@ziggs-ai/ziggs-mcp 0.1.35 → 0.2.0
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/dist/tools.js +18 -6
- package/package.json +3 -3
package/dist/tools.js
CHANGED
|
@@ -649,11 +649,15 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
649
649
|
}))
|
|
650
650
|
.optional()
|
|
651
651
|
.describe('Scopes you finished handling — acked before fetching, monotonic'),
|
|
652
|
-
|
|
652
|
+
waitSeconds: z
|
|
653
|
+
.number()
|
|
654
|
+
.optional()
|
|
655
|
+
.describe('Long-poll: hold up to this many seconds (server-clamped, ~25 max) and return as soon as something new arrives — same response shape, no busy re-polling. Omit for an immediate snapshot.'),
|
|
656
|
+
}, READ_ONLY, async ({ ack, waitSeconds }) => {
|
|
653
657
|
try {
|
|
654
658
|
const client = new InboxClient(creds.operatorKey, creds.agentId);
|
|
655
659
|
const acked = ack?.length ? await client.ack(ack) : null;
|
|
656
|
-
const inbox = await client.getInbox();
|
|
660
|
+
const inbox = await client.getInbox(waitSeconds != null ? { waitSeconds } : {});
|
|
657
661
|
let activeTasks = [];
|
|
658
662
|
let activeTasksError;
|
|
659
663
|
try {
|
|
@@ -800,12 +804,16 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
800
804
|
.optional()
|
|
801
805
|
.describe('Optional task — creates a TaskArtifactLink alongside the primary scope link'),
|
|
802
806
|
content_type: z.string().optional().describe('Default text'),
|
|
803
|
-
|
|
807
|
+
idempotencyKey: z
|
|
808
|
+
.string()
|
|
809
|
+
.optional()
|
|
810
|
+
.describe('Optional dedup key: a redelivered record with the same key no-ops and returns the original artifact. Derive it deterministically (e.g. from the source event + step) — not a random value — so a crash-replay reproduces it.'),
|
|
811
|
+
}, WRITE, async ({ text, visibility, chatId, agreementId, taskId, content_type, idempotencyKey }) => {
|
|
804
812
|
try {
|
|
805
813
|
if ((chatId && agreementId) || (!chatId && !agreementId)) {
|
|
806
814
|
return toolError('Pass exactly one of chatId or agreementId');
|
|
807
815
|
}
|
|
808
|
-
const { artifactId } = await new ArtifactsClient(creds.operatorKey, creds.agentId).writeStrict({ text, visibility, chatId, agreementId, taskId, content_type });
|
|
816
|
+
const { artifactId } = await new ArtifactsClient(creds.operatorKey, creds.agentId).writeStrict({ text, visibility, chatId, agreementId, taskId, content_type, idempotencyKey });
|
|
809
817
|
return textResult({
|
|
810
818
|
ok: true,
|
|
811
819
|
artifactId,
|
|
@@ -857,9 +865,13 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
857
865
|
.optional()
|
|
858
866
|
.describe('Outcome payload (summary, status, links, …)'),
|
|
859
867
|
errorMessage: z.string().optional().describe('Required when state=failed'),
|
|
860
|
-
|
|
868
|
+
idempotencyKey: z
|
|
869
|
+
.string()
|
|
870
|
+
.optional()
|
|
871
|
+
.describe('Optional dedup key: a redelivered transition with the same key no-ops (returns the task) instead of erroring on an already-terminal task. Derive it deterministically (e.g. from taskId + target state) so a crash-replay reproduces it.'),
|
|
872
|
+
}, WRITE, async ({ taskId, state, result, errorMessage, idempotencyKey }) => {
|
|
861
873
|
try {
|
|
862
|
-
const task = await updateTaskState(taskId, state, { result, errorMessage }, creds);
|
|
874
|
+
const task = await updateTaskState(taskId, state, { result, errorMessage, idempotencyKey }, creds);
|
|
863
875
|
return textResult({ ok: true, task });
|
|
864
876
|
}
|
|
865
877
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/ziggs-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
39
|
-
"@ziggs-ai/api-client": "^0.
|
|
39
|
+
"@ziggs-ai/api-client": "^0.2.0",
|
|
40
40
|
"dotenv": "^16.6.1",
|
|
41
41
|
"zod": "^3.24.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@ziggs-ai/agent-sdk": "^0.
|
|
44
|
+
"@ziggs-ai/agent-sdk": "^0.3.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=20"
|