@ziggs-ai/ziggs-mcp 0.37.5 → 0.37.7
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 +32 -7
- package/package.json +2 -2
package/dist/tools.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isDirectorySurface } from './directorySurface.js';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { presentResourceActions, getAgreement, getMyAgreements, listMyChats, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, acknowledgeTaskControl, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateSession, GRANTS_CAPABILITIES, AGREEMENT_VERB_CAPABILITIES, LISTING_DOOR_CAPABILITIES, CONTEXT_GRANT_SCOPE_KINDS, contextReadCapability, openCapability, accessExplainCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, recordArtifactCapability, listArtifactsCapability, findArtifactsCapability, shareArtifactCapability, attachArtifactCapability, uploadArtifactUrlCapability, completeArtifactFileCapability, downloadArtifactCapability, openConversationCapability, connectionProxyCapability, requestConnectionCapability, agreementClaimCapability, agreementSubcontractCapability, listTasksCapability, cancelTaskCapability, marketplaceViewCapability, parseListFields, pickListedRows, projectChatListRows, sessionOrientation, presentSendResult, presentTaskOutcome, explainRefusedRead, RESOURCE_HIDDEN_MESSAGE, } from '@ziggs-ai/api-client';
|
|
4
|
+
import { presentResourceActions, getAgreement, getMyAgreements, listMyChats, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, acknowledgeTaskControl, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateSession, GRANTS_CAPABILITIES, AGREEMENT_VERB_CAPABILITIES, LISTING_DOOR_CAPABILITIES, CONTEXT_GRANT_SCOPE_KINDS, contextReadCapability, openCapability, accessExplainCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, recordArtifactCapability, listArtifactsCapability, findArtifactsCapability, shareArtifactCapability, attachArtifactCapability, uploadArtifactUrlCapability, completeArtifactFileCapability, downloadArtifactCapability, openConversationCapability, connectionProxyCapability, requestConnectionCapability, agreementClaimCapability, agreementSubcontractCapability, listTasksCapability, cancelTaskCapability, marketplaceViewCapability, parseListFields, pickListedRows, projectChatListRows, sessionOrientation, presentSendResult, presentTaskOutcome, explainRefusedRead, RESOURCE_HIDDEN_MESSAGE, SOURCES_DESCRIPTION, } from '@ziggs-ai/api-client';
|
|
5
5
|
import { decodeOperatorKeyClaims } from './operatorKey.js';
|
|
6
6
|
import { registerTrustTools } from './trustTools.js';
|
|
7
7
|
import { registerPaymentTools } from './paymentTools.js';
|
|
@@ -250,6 +250,15 @@ function isReadRefusal(e) {
|
|
|
250
250
|
const status = e?.status;
|
|
251
251
|
return status === 403 || status === 404;
|
|
252
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* What a write drew on, as every write tool takes it. Loose on purpose, the
|
|
255
|
+
* shape the capability adapter gives an object list: the server checks each
|
|
256
|
+
* entry and says which one is wrong, and a full schema here would repeat that
|
|
257
|
+
* check on six tools in every session.
|
|
258
|
+
*/
|
|
259
|
+
function sourcesField() {
|
|
260
|
+
return z.array(z.record(z.unknown())).optional().describe(SOURCES_DESCRIPTION);
|
|
261
|
+
}
|
|
253
262
|
export function registerZiggsTools(server, creds, cfg) {
|
|
254
263
|
// A refused get answers as open would: the server's one judgement of
|
|
255
264
|
// hidden or unreadable, and for unreadable the request to make. When that
|
|
@@ -449,7 +458,8 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
449
458
|
.string()
|
|
450
459
|
.optional()
|
|
451
460
|
.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.'),
|
|
452
|
-
|
|
461
|
+
sources: sourcesField(),
|
|
462
|
+
}, destructive('Send a chat message'), async ({ chatId, to, receiverId, text, entryType, idempotencyKey, conversationAgreementId, underAgreementId, taskId, sources }) => {
|
|
453
463
|
try {
|
|
454
464
|
const roomId = typeof chatId === 'string' ? chatId.trim() : '';
|
|
455
465
|
const personId = typeof to === 'string' ? to.trim() : '';
|
|
@@ -475,6 +485,7 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
475
485
|
taskId,
|
|
476
486
|
entryType: entryType ?? 'message',
|
|
477
487
|
contentType: 'text',
|
|
488
|
+
...(sources ? { sources: sources } : {}),
|
|
478
489
|
}, creds);
|
|
479
490
|
// `success: true` was the whole answer, and an agent that had just sent
|
|
480
491
|
// an answer read it as delivered. The presenter names the destination
|
|
@@ -567,9 +578,13 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
567
578
|
.string()
|
|
568
579
|
.optional()
|
|
569
580
|
.describe('Revised task description for the spawned work'),
|
|
570
|
-
|
|
581
|
+
sources: sourcesField(),
|
|
582
|
+
}, destructive('Counter a proposal'), async ({ agreementId, sources, ...counter }) => {
|
|
571
583
|
try {
|
|
572
|
-
const agreement = await counterAgreement(agreementId,
|
|
584
|
+
const agreement = await counterAgreement(agreementId, {
|
|
585
|
+
...counter,
|
|
586
|
+
...(sources ? { sources: sources } : {}),
|
|
587
|
+
}, creds);
|
|
573
588
|
return textResult({ status: 'countered', agreementId, agreement });
|
|
574
589
|
}
|
|
575
590
|
catch (e) {
|
|
@@ -935,9 +950,11 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
935
950
|
})
|
|
936
951
|
.optional()
|
|
937
952
|
.describe('How often the holder may remind, and how many times at most. Both halves are required together: a cadence with no budget is refused, because one reminder is one wake and a rule that never says stop is an open-ended loop. Omit entirely for a task nobody needs reminding about.'),
|
|
938
|
-
|
|
953
|
+
sources: sourcesField(),
|
|
954
|
+
}, write('Create a task'), async ({ agreementId, description, title, parentTaskId, assigneeId, inputArtifactIds, waitsOn, graph, plan, planReviewTiming, requireMidWorkPlanAck, dueAt, checkBack, sources, }) => {
|
|
939
955
|
try {
|
|
940
956
|
const task = await createTask({
|
|
957
|
+
...(sources ? { sources: sources } : {}),
|
|
941
958
|
agreementId,
|
|
942
959
|
description,
|
|
943
960
|
title,
|
|
@@ -976,9 +993,15 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
976
993
|
.string()
|
|
977
994
|
.optional()
|
|
978
995
|
.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.'),
|
|
979
|
-
|
|
996
|
+
sources: sourcesField(),
|
|
997
|
+
}, destructive('File a task result'), async ({ taskId, state, result, errorMessage, idempotencyKey, sources }) => {
|
|
980
998
|
try {
|
|
981
|
-
const confirm = await updateTaskState(taskId, state, {
|
|
999
|
+
const confirm = await updateTaskState(taskId, state, {
|
|
1000
|
+
result,
|
|
1001
|
+
errorMessage,
|
|
1002
|
+
idempotencyKey,
|
|
1003
|
+
...(sources ? { sources: sources } : {}),
|
|
1004
|
+
}, creds);
|
|
982
1005
|
// The confirmation said `completed` and left delivery,
|
|
983
1006
|
// metering and the agreement to be inferred from it. The presenter
|
|
984
1007
|
// states each one from what the server reported, and stays silent about
|
|
@@ -1016,6 +1039,7 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
1016
1039
|
.unknown()
|
|
1017
1040
|
.optional()
|
|
1018
1041
|
.describe('Optional step output stored with this replace.'),
|
|
1042
|
+
sources: sourcesField(),
|
|
1019
1043
|
}))
|
|
1020
1044
|
.describe('Full replacement step list (ordered)'),
|
|
1021
1045
|
}, destructive('Update a task plan'), async ({ taskId, steps }) => {
|
|
@@ -1039,6 +1063,7 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
1039
1063
|
.unknown()
|
|
1040
1064
|
.optional()
|
|
1041
1065
|
.describe('Optional step output stored with this patch.'),
|
|
1066
|
+
sources: sourcesField(),
|
|
1042
1067
|
}))
|
|
1043
1068
|
.optional()
|
|
1044
1069
|
.describe('The steps that changed. Do not resend the rest of the plan. Omit it only when this call is nothing but a waitingOn.'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/ziggs-mcp",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.7",
|
|
4
4
|
"description": "MCP server for Claude Code, Cursor, and other MCP hosts \u2014 act as your Ziggs delegate agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
50
|
-
"@ziggs-ai/api-client": "0.37.
|
|
50
|
+
"@ziggs-ai/api-client": "0.37.7",
|
|
51
51
|
"dotenv": "^16.6.1",
|
|
52
52
|
"zod": "^3.24.2",
|
|
53
53
|
"zod-to-json-schema": "^3.25.1"
|