@ziggs-ai/ziggs-mcp 0.14.0 → 0.14.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/README.md CHANGED
@@ -157,6 +157,9 @@ Startup validates the key shape, expiry (JWT `exp`), and agent resolution — er
157
157
  | `ziggs_grant_list` | `GET /grants` (all rails) |
158
158
  | `ziggs_context_read` | `GET /context/read/:type` |
159
159
  | `ziggs_artifact_record` | `POST /artifacts` |
160
+ | `ziggs_artifact_list` | `GET /artifacts` |
161
+ | `ziggs_artifact_share` | `POST /context/artifacts/:id/share` |
162
+ | `ziggs_artifact_attach` | `POST /chats/:id/artifacts`, `POST /tasks/:id/artifacts`, or `POST /agreements/:id/artifacts` |
160
163
  | `ziggs_artifact_upload_url` | `POST /artifacts/upload-url` (+ optional S3 PUT) |
161
164
  | `ziggs_artifact_complete_file` | `POST /artifacts/:id/complete` |
162
165
  | `ziggs_artifact_download` | `GET /artifacts/:id/download` |
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, delegateAgreement, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, PaymentsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateAgentId, GRANTS_CAPABILITIES, AGREEMENT_VERB_CAPABILITIES, CONTEXT_GRANT_SCOPE_KINDS, contextReadCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, recordArtifactCapability, listArtifactsCapability, shareArtifactCapability, attachArtifactCapability, uploadArtifactUrlCapability, completeArtifactFileCapability, downloadArtifactCapability, openConversationCapability, connectionProxyCapability, requestConnectionCapability, agreementClaimCapability, marketplaceViewCapability, } from '@ziggs-ai/api-client';
3
+ import { getAgreement, getMyAgreements, listMyChats, delegateAgreement, respondToAgreement, revokeAgreement, counterAgreement, fulfillAgreement, sendChatMessage, ConnectionsClient, PaymentsClient, ContextReadClient, GrantsClient, InboxClient, createTask, updateTaskState, replaceTaskPlan, updateTaskPlanSteps, listTasks, getTask, getBackendUrl, fetchMyOrgs, fetchSessionAccess, isMcpOAuthDelegateAgentId, GRANTS_CAPABILITIES, AGREEMENT_VERB_CAPABILITIES, CONTEXT_GRANT_SCOPE_KINDS, contextReadCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, recordArtifactCapability, listArtifactsCapability, shareArtifactCapability, attachArtifactCapability, uploadArtifactUrlCapability, completeArtifactFileCapability, downloadArtifactCapability, openConversationCapability, connectionProxyCapability, requestConnectionCapability, agreementClaimCapability, listTasksCapability, marketplaceViewCapability, } 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';
@@ -36,24 +36,6 @@ const ZIGGS_SEND_MESSAGE_DESCRIPTION = 'Send a chat message as the acting agent.
36
36
  'Taking part IS the permission, so there is no separate reach check on the send and no auto-add of a receiver who is not already in the room. ' +
37
37
  'A refusal means you hold no write grant here: rooms are opened with you (ziggs_chat_open) and holders are admitted under an instrument, and the refusal names which one is missing and how to create it. ' +
38
38
  PROTOCOL.reporting;
39
- // (revised A4): always-on teaching, not wrong-slot detection. Name the
40
- // result slot on the artifact_record description and success path so an agent
41
- // finds the right move unaided. Reporting rule sourced from the shared const
42
- //.
43
- // scope is optional. Say so first — the old wording ("write to a chat
44
- // or agreement scope") is what pushed a model into guessing a container, and
45
- // guessing wrong used to fail the write outright.
46
- const ZIGGS_RECORD_ARTIFACT_DESCRIPTION = 'Write an artifact — text (text) or a file (filename + mime + contentBase64; presign, upload ' +
47
- 'and completion all happen inside this one call). Scope is optional — pass agreementId or ' +
48
- 'chatId to record it into that ' +
49
- 'scope, pass taskId alone to bind a deliverable to its task, or pass no scope at all for a ' +
50
- 'free-standing artifact that is yours until you attach or share it. Never guess a scope: ' +
51
- 'recording with none always succeeds. Set visibility explicitly. ' +
52
- 'For a finished deliverable, set contentType=result and pass taskId to bind it to the task. ' +
53
- 'Inline text max 50000 characters. Over that: pass the body as a file here, ' +
54
- 'or record an index artifact plus part artifacts and list the part ids in the index. ' +
55
- 'The server does not auto-split. ' +
56
- PROTOCOL.reporting;
57
39
  // the strict artifact write (fail loudly, return the artifactId)
58
40
  // moved into ArtifactsClient.writeStrict, shared with the SDK's artifact_record.
59
41
  // the leak-guard, the connections proxy/request calls, the
@@ -711,11 +693,10 @@ export function registerZiggsTools(server, creds, cfg) {
711
693
  : result;
712
694
  },
713
695
  });
714
- // Description override keeps the reporting rule sourced from the shared
715
- // PROTOCOL const so it can't drift from SKILL/server instructions.
716
- registerCapability(server, recordArtifactCapability, creds, {
717
- description: ZIGGS_RECORD_ARTIFACT_DESCRIPTION,
718
- });
696
+ // descriptions.mcp is canonical do not override. The reporting paragraph
697
+ // is PROTOCOL.reporting copied into the capability (api-client cannot import
698
+ // ziggs-mcp); record-artifact-teaching.test.ts gates the live tool against both.
699
+ registerCapability(server, recordArtifactCapability, creds);
719
700
  // find what you recorded free-standing, and hand one artifact to one
720
701
  // agent. Descriptions come from the shared capability (no PROTOCOL override
721
702
  // needed; neither is a reporting surface).
@@ -912,41 +893,7 @@ export function registerZiggsTools(server, creds, cfg) {
912
893
  return toolError(e);
913
894
  }
914
895
  });
915
- registerStrictTool(server, 'ziggs_task_list', 'List tasks reachable by the acting agent (GET /tasks). Scope is determined by the operator key — same reach as chats and agreements. Supports optional state filter, cursor pagination, and assignee/creator filtering.', {
916
- state: z
917
- .string()
918
- .optional()
919
- .describe('Filter by state: active, completed, failed, cancelled'),
920
- cursor: z.string().optional().describe('Opaque cursor from prior nextCursor'),
921
- limit: z.number().optional().describe('Max rows (default server-side)'),
922
- assignedTo: z
923
- .string()
924
- .optional()
925
- .describe('Filter to tasks explicitly assigned to this agent/user id'),
926
- assignedToMe: z
927
- .boolean()
928
- .optional()
929
- .describe('Shorthand for assignedTo=<this delegate\'s own agent id>. Takes precedence over assignedTo if both are set.'),
930
- createdByMe: z
931
- .boolean()
932
- .optional()
933
- .describe('Tasks YOU created — the work you handed out to others. Check this before delegating: assignedToMe lists only what was handed TO you, so a job you already assigned does not appear there.'),
934
- }, readOnly('List tasks'), async ({ state, cursor, limit, assignedTo, assignedToMe, createdByMe }) => {
935
- try {
936
- const effectiveAssignedTo = assignedToMe ? creds.agentId : assignedTo;
937
- const result = await listTasks({
938
- state,
939
- cursor,
940
- limit,
941
- assignedTo: effectiveAssignedTo,
942
- ...(createdByMe ? { createdBy: creds.agentId } : {}),
943
- }, creds);
944
- return textResult(result);
945
- }
946
- catch (e) {
947
- return toolError(e);
948
- }
949
- });
896
+ registerCapability(server, listTasksCapability, creds);
950
897
  registerStrictTool(server, 'ziggs_task_get', 'Fetch a single task by id (GET /tasks/:id). Use this when a human hands you a taskId directly (e.g. "work on task_…") so you can read the work-order — its description, plan, assignee, state, and result — before acting. Same operator-key scope as ziggs_task_list; pairs with ziggs_task_set_result to close the task.', { taskId: z.string() }, readOnly('Read one task'), async ({ taskId }) => {
951
898
  try {
952
899
  const task = await getTask(taskId, creds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/ziggs-mcp",
3
- "version": "0.14.0",
3
+ "version": "0.14.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.14.0",
42
+ "@ziggs-ai/api-client": "0.14.2",
43
43
  "dotenv": "^16.6.1",
44
44
  "zod": "^3.24.2",
45
45
  "zod-to-json-schema": "^3.25.1"