@ziggs-ai/ziggs-mcp 0.22.0 → 0.22.2
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/protocol/delegateProtocol.d.ts +1 -1
- package/dist/protocol/delegateProtocol.js +1 -1
- package/dist/surface.d.ts +3 -0
- package/dist/surface.js +27 -16
- package/dist/tools.js +11 -3
- package/package.json +2 -2
- package/skills/ziggs/.cursorrules +1 -1
- package/skills/ziggs/SKILL.md +1 -1
- package/skills/ziggs/references/inbox-rhythm.md +1 -1
- package/skills/ziggs/references/reporting-convention.md +1 -1
|
@@ -21,7 +21,7 @@ export declare const PROTOCOL: {
|
|
|
21
21
|
* because a client that never calls ziggs_tools would otherwise conclude the
|
|
22
22
|
* everyday set is all there is.
|
|
23
23
|
*/
|
|
24
|
-
readonly surface: "Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
24
|
+
readonly surface: "Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=[\"<name>\"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.";
|
|
25
25
|
/** The working loop, as the `ziggs_inbox` description phrases it. */
|
|
26
26
|
readonly loop: "Flow: inbox → read → act → ack.";
|
|
27
27
|
/**
|
|
@@ -21,7 +21,7 @@ export const PROTOCOL = {
|
|
|
21
21
|
* because a client that never calls ziggs_tools would otherwise conclude the
|
|
22
22
|
* everyday set is all there is.
|
|
23
23
|
*/
|
|
24
|
-
surface: 'Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
24
|
+
surface: 'Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=["<name>"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.',
|
|
25
25
|
/** The working loop, as the `ziggs_inbox` description phrases it. */
|
|
26
26
|
loop: 'Flow: inbox → read → act → ack.',
|
|
27
27
|
/**
|
package/dist/surface.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { type CatalogEntry } from './toolCatalog.js';
|
|
2
3
|
/**
|
|
3
4
|
* The tools a cold session gets natively, with their full schemas.
|
|
4
5
|
*
|
|
@@ -56,6 +57,8 @@ export declare const DESTRUCTIVE_STAY_NATIVE: readonly string[];
|
|
|
56
57
|
* when it refuses.
|
|
57
58
|
*/
|
|
58
59
|
export declare const CATALOG_TOOLS: readonly string[];
|
|
60
|
+
/** Per-tool how-to-call, derived from NATIVE_TOOLS and the annotations. */
|
|
61
|
+
export declare function callLine(entry: CatalogEntry): string;
|
|
59
62
|
/**
|
|
60
63
|
* Narrow `tools/list` to the native set, then register the tools that make the
|
|
61
64
|
* rest reachable: the catalog, and one dispatcher per annotation lane.
|
package/dist/surface.js
CHANGED
|
@@ -96,18 +96,39 @@ const CATALOG_TOOL_NAMES = new Set(CATALOG_TOOLS);
|
|
|
96
96
|
*/
|
|
97
97
|
const ZIGGS_API = 'the Ziggs API (https://api.ziggsai.com, reference at https://ziggsai.com/docs)';
|
|
98
98
|
const TOOLS_DESCRIPTION = 'Every Ziggs tool that exists: name plus one line, for the whole surface. ' +
|
|
99
|
-
'A handful of everyday tools are already loaded natively; the rest live here. Each row says whether the tool is read-only
|
|
100
|
-
'Pass `describe` with one or more tool names to get their full descriptions
|
|
99
|
+
'A handful of everyday tools are already loaded natively; the rest live here. Each row says whether the tool is read-only, whether the host already holds it (`native`), and how to call it (`call`). ' +
|
|
100
|
+
'Pass `describe` with one or more tool names to get their full descriptions, input schemas, and the same `call` line — do that before calling a tool you have not used in this session, so you pass the right arguments. ' +
|
|
101
101
|
'Pass `search` to filter the listing by a word in the name or title (e.g. "agreement", "artifact"). ' +
|
|
102
102
|
'Nothing is hidden: if a capability exists, its name is in this list.';
|
|
103
103
|
const TOOL_READ_DESCRIPTION = `Call a read-only Ziggs tool by name, against ${ZIGGS_API}. ` +
|
|
104
|
-
'This reaches every read-only tool ziggs_tools lists
|
|
104
|
+
'This reaches every read-only tool ziggs_tools lists, native or not. It never changes anything: a tool that writes is refused here and pointed at ziggs_tool_write. ' +
|
|
105
105
|
'Look the tool up with ziggs_tools describe=[<name>] first when you do not already know its parameters: `args` is validated against the real schema and a wrong key is refused, not silently dropped. ' +
|
|
106
106
|
'The result is exactly what the tool itself returns.';
|
|
107
107
|
const TOOL_WRITE_DESCRIPTION = `Call a Ziggs tool that creates or changes something, by name, against ${ZIGGS_API}. ` +
|
|
108
|
-
'This reaches every writing tool ziggs_tools lists
|
|
108
|
+
'This reaches every reversible writing tool ziggs_tools lists, native or not. Read-only tools are refused here and pointed at ziggs_tool_read; irreversible tools are called by their own name only — the dispatchers refuse them. ' +
|
|
109
109
|
'Look the tool up with ziggs_tools describe=[<name>] first when you do not already know its parameters: `args` is validated against the real schema and a wrong key is refused, not silently dropped. ' +
|
|
110
110
|
'The result is exactly what the tool itself returns.';
|
|
111
|
+
function isNative(name) {
|
|
112
|
+
return NATIVE_TOOLS.includes(name);
|
|
113
|
+
}
|
|
114
|
+
/** Per-tool how-to-call, derived from NATIVE_TOOLS and the annotations. */
|
|
115
|
+
export function callLine(entry) {
|
|
116
|
+
if (entry.annotations.destructiveHint) {
|
|
117
|
+
return `call it by name only: ${entry.name}; the dispatchers refuse it`;
|
|
118
|
+
}
|
|
119
|
+
const dispatcher = laneOf(entry);
|
|
120
|
+
if (isNative(entry.name)) {
|
|
121
|
+
return `call it by name: ${entry.name}; ${dispatcher} { tool: "${entry.name}", args } also works`;
|
|
122
|
+
}
|
|
123
|
+
return `call via ${dispatcher} { tool, args }`;
|
|
124
|
+
}
|
|
125
|
+
function withCall(entry, base) {
|
|
126
|
+
return {
|
|
127
|
+
...base,
|
|
128
|
+
...(isNative(entry.name) ? { native: true } : {}),
|
|
129
|
+
call: callLine(entry),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
111
132
|
function sortRows(entries) {
|
|
112
133
|
return [...entries].sort((a, b) => a.name.localeCompare(b.name));
|
|
113
134
|
}
|
|
@@ -115,15 +136,6 @@ function sortRows(entries) {
|
|
|
115
136
|
function laneOf(entry) {
|
|
116
137
|
return entry.annotations.readOnlyHint ? TOOL_READ_NAME : TOOL_WRITE_NAME;
|
|
117
138
|
}
|
|
118
|
-
/** The hint under a describe: the dispatcher to call next, named when one fits all. */
|
|
119
|
-
function nextCall(entries) {
|
|
120
|
-
const lanes = new Set(entries.map(laneOf));
|
|
121
|
-
if (lanes.size === 1) {
|
|
122
|
-
for (const lane of lanes)
|
|
123
|
-
return `Call it with ${lane} { tool, args }.`;
|
|
124
|
-
}
|
|
125
|
-
return `Call read-only tools with ${TOOL_READ_NAME} { tool, args } and the rest with ${TOOL_WRITE_NAME} { tool, args }.`;
|
|
126
|
-
}
|
|
127
139
|
/**
|
|
128
140
|
* Keep `tools/list` to `listed` (plus the catalog tools, registered after this
|
|
129
141
|
* runs) by filtering the response the SDK's own handler builds.
|
|
@@ -259,9 +271,8 @@ export function applySurfacePolicy(server) {
|
|
|
259
271
|
return toolError(`No such tool: ${unknown.join(', ')}. Call ${TOOLS_CATALOG_NAME} with no arguments for the full list of names.`);
|
|
260
272
|
}
|
|
261
273
|
return textResult({
|
|
262
|
-
tools: found.map(describeEntry),
|
|
274
|
+
tools: found.map((entry) => withCall(entry, describeEntry(entry))),
|
|
263
275
|
...(unknown.length ? { unknown } : {}),
|
|
264
|
-
next: nextCall(found),
|
|
265
276
|
});
|
|
266
277
|
}
|
|
267
278
|
const all = sortRows(catalogFor(server));
|
|
@@ -270,7 +281,7 @@ export function applySurfacePolicy(server) {
|
|
|
270
281
|
? all.filter((e) => e.name.toLowerCase().includes(needle) ||
|
|
271
282
|
e.title.toLowerCase().includes(needle) ||
|
|
272
283
|
aliasMatches(e.name, needle))
|
|
273
|
-
: all).map(catalogRow);
|
|
284
|
+
: all).map((entry) => withCall(entry, catalogRow(entry)));
|
|
274
285
|
return textResult({
|
|
275
286
|
count: rows.length,
|
|
276
287
|
...(needle ? { search: needle, total: all.length } : {}),
|
package/dist/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { getAgreement, getMyAgreements, listMyChats, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, PaymentsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateSession, GRANTS_CAPABILITIES, AGREEMENT_VERB_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, sessionOrientation, presentSendResult, presentTaskOutcome, } from '@ziggs-ai/api-client';
|
|
3
|
+
import { getAgreement, getMyAgreements, listMyChats, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, PaymentsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateSession, GRANTS_CAPABILITIES, AGREEMENT_VERB_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, } from '@ziggs-ai/api-client';
|
|
4
4
|
import { decodeOperatorKeyClaims } from './operatorKey.js';
|
|
5
5
|
import { registerTrustTools } from './trustTools.js';
|
|
6
6
|
import { registerPaymentTools } from './paymentTools.js';
|
|
@@ -411,10 +411,18 @@ export function registerZiggsTools(server, creds, cfg) {
|
|
|
411
411
|
return toolError(e);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
|
-
registerStrictTool(server, 'ziggs_chat_list', 'List
|
|
414
|
+
registerStrictTool(server, 'ziggs_chat_list', 'List rooms the acting agent holds a grant on. Default rows are chatId, name, updatedAt, lastMessage, unreadCount, and participantSummary — the people who actually receive in the room, each named once with one face. The web app also builds members (flat viewer list) and rosterSummary (display roster including agreement overlays); those come only when fields asks for them.', {
|
|
415
|
+
fields: z
|
|
416
|
+
.array(z.string())
|
|
417
|
+
.optional()
|
|
418
|
+
.describe('Return only these keys on each row. Omit for the default (chatId, name, updatedAt, lastMessage, unreadCount, participantSummary). Pass members and/or rosterSummary to include the other web-app rosters. Keep chatId if you will open or send next.'),
|
|
419
|
+
}, readOnly('List your chats'), async ({ fields }) => {
|
|
415
420
|
try {
|
|
416
421
|
const chats = await listMyChats(creds);
|
|
417
|
-
return textResult({
|
|
422
|
+
return textResult({
|
|
423
|
+
count: chats.length,
|
|
424
|
+
chats: projectChatListRows(chats, fields),
|
|
425
|
+
});
|
|
418
426
|
}
|
|
419
427
|
catch (e) {
|
|
420
428
|
return toolError(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/ziggs-mcp",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.2",
|
|
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": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
42
|
-
"@ziggs-ai/api-client": "0.22.
|
|
42
|
+
"@ziggs-ai/api-client": "0.22.2",
|
|
43
43
|
"dotenv": "^16.6.1",
|
|
44
44
|
"zod": "^3.24.2",
|
|
45
45
|
"zod-to-json-schema": "^3.25.1"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
You are a delegate agent on a Ziggs team. The MCP tools are the connection; operate by this protocol.
|
|
5
5
|
|
|
6
|
-
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
6
|
+
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=["<name>"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.
|
|
7
7
|
- Flow: inbox → read → act → ack.
|
|
8
8
|
- Reading never advances the watermark; once you have handled what an envelope carried, hand it back with ziggs_inbox_ack — pass its `ackTo` VERBATIM (it is opaque — never construct or edit one) together with `handledResourceIds` for every delivery ASSIGNED to you (assigneeId = you; requests too) in that window. Rows without your stamp are context another window handles — read them, never ack them as yours. Never rewind an ack to an older value.
|
|
9
9
|
- Work is a task under an agreement (the ticket). Read it from the inbox — or, if handed a bare taskId, open it with ziggs_task_get — then post progress by naming the steps that changed with ziggs_task_update_steps. Restructure the checklist with ziggs_task_replace_plan (full list).
|
package/skills/ziggs/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ You represent a **delegate agent** on Ziggs. MCP tools are the connection; this
|
|
|
22
22
|
<!-- BEGIN GENERATED: delegate-protocol — generated file, do not edit by hand -->
|
|
23
23
|
_You are a delegate agent on a Ziggs team. The MCP tools are the connection; operate by this protocol._
|
|
24
24
|
|
|
25
|
-
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
25
|
+
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=["<name>"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.
|
|
26
26
|
- Flow: inbox → read → act → ack.
|
|
27
27
|
- Reading never advances the watermark; once you have handled what an envelope carried, hand it back with ziggs_inbox_ack — pass its `ackTo` VERBATIM (it is opaque — never construct or edit one) together with `handledResourceIds` for every delivery ASSIGNED to you (assigneeId = you; requests too) in that window. Rows without your stamp are context another window handles — read them, never ack them as yours. Never rewind an ack to an older value.
|
|
28
28
|
- Work is a task under an agreement (the ticket). Read it from the inbox — or, if handed a bare taskId, open it with ziggs_task_get — then post progress by naming the steps that changed with ziggs_task_update_steps. Restructure the checklist with ziggs_task_replace_plan (full list).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<!-- BEGIN GENERATED: delegate-protocol — generated file, do not edit by hand -->
|
|
6
6
|
_You are a delegate agent on a Ziggs team. The MCP tools are the connection; operate by this protocol._
|
|
7
7
|
|
|
8
|
-
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
8
|
+
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=["<name>"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.
|
|
9
9
|
- Flow: inbox → read → act → ack.
|
|
10
10
|
- Reading never advances the watermark; once you have handled what an envelope carried, hand it back with ziggs_inbox_ack — pass its `ackTo` VERBATIM (it is opaque — never construct or edit one) together with `handledResourceIds` for every delivery ASSIGNED to you (assigneeId = you; requests too) in that window. Rows without your stamp are context another window handles — read them, never ack them as yours. Never rewind an ack to an older value.
|
|
11
11
|
- Work is a task under an agreement (the ticket). Read it from the inbox — or, if handed a bare taskId, open it with ziggs_task_get — then post progress by naming the steps that changed with ziggs_task_update_steps. Restructure the checklist with ziggs_task_replace_plan (full list).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<!-- BEGIN GENERATED: delegate-protocol — generated file, do not edit by hand -->
|
|
6
6
|
_You are a delegate agent on a Ziggs team. The MCP tools are the connection; operate by this protocol._
|
|
7
7
|
|
|
8
|
-
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line,
|
|
8
|
+
- Only the everyday tools are loaded; the rest of the surface is one call away. ziggs_tools lists every tool that exists (name + one line, whether it is read-only, whether the host already holds it, and how to call it), ziggs_tools describe=["<name>"] returns its full schema and a call line, ziggs_tool_read and ziggs_tool_write reach every reversible tool by name — native or not — and irreversible tools are called by their own name only. Nothing is hidden: check ziggs_tools before concluding a capability is missing.
|
|
9
9
|
- Flow: inbox → read → act → ack.
|
|
10
10
|
- Reading never advances the watermark; once you have handled what an envelope carried, hand it back with ziggs_inbox_ack — pass its `ackTo` VERBATIM (it is opaque — never construct or edit one) together with `handledResourceIds` for every delivery ASSIGNED to you (assigneeId = you; requests too) in that window. Rows without your stamp are context another window handles — read them, never ack them as yours. Never rewind an ack to an older value.
|
|
11
11
|
- Work is a task under an agreement (the ticket). Read it from the inbox — or, if handed a bare taskId, open it with ziggs_task_get — then post progress by naming the steps that changed with ziggs_task_update_steps. Restructure the checklist with ziggs_task_replace_plan (full list).
|