@ziggs-ai/ziggs-mcp 0.1.11 → 0.1.12

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/config.d.ts CHANGED
@@ -3,6 +3,8 @@ import { z } from 'zod';
3
3
  declare const envSchema: z.ZodObject<{
4
4
  ZIGGS_API_URL: z.ZodOptional<z.ZodString>;
5
5
  HTTP_URL: z.ZodOptional<z.ZodString>;
6
+ /** Web app base URL for constructing shareable links. Defaults to https://ziggsai.com. */
7
+ ZIGGS_WEB_URL: z.ZodOptional<z.ZodString>;
6
8
  ZIGGS_OPERATOR_KEY: z.ZodString;
7
9
  /** Optional when the operator key is agent-scoped (ZIG-279). */
8
10
  ZIGGS_AGENT_ID: z.ZodOptional<z.ZodString>;
@@ -12,12 +14,14 @@ declare const envSchema: z.ZodObject<{
12
14
  ZIGGS_OPERATOR_KEY: string;
13
15
  ZIGGS_API_URL?: string | undefined;
14
16
  HTTP_URL?: string | undefined;
17
+ ZIGGS_WEB_URL?: string | undefined;
15
18
  ZIGGS_AGENT_ID?: string | undefined;
16
19
  ZIGGS_OWNER_USER_ID?: string | undefined;
17
20
  }, {
18
21
  ZIGGS_OPERATOR_KEY: string;
19
22
  ZIGGS_API_URL?: string | undefined;
20
23
  HTTP_URL?: string | undefined;
24
+ ZIGGS_WEB_URL?: string | undefined;
21
25
  ZIGGS_AGENT_ID?: string | undefined;
22
26
  ZIGGS_OWNER_USER_ID?: string | undefined;
23
27
  }>;
package/dist/config.js CHANGED
@@ -4,6 +4,8 @@ import { MINT_KEY_HELP, resolveDelegateAgentId } from './operatorKey.js';
4
4
  const envSchema = z.object({
5
5
  ZIGGS_API_URL: z.string().optional(),
6
6
  HTTP_URL: z.string().optional(),
7
+ /** Web app base URL for constructing shareable links. Defaults to https://ziggsai.com. */
8
+ ZIGGS_WEB_URL: z.string().optional(),
7
9
  ZIGGS_OPERATOR_KEY: z.string().min(1, 'ZIGGS_OPERATOR_KEY is required'),
8
10
  /** Optional when the operator key is agent-scoped (ZIG-279). */
9
11
  ZIGGS_AGENT_ID: z.string().optional(),
@@ -15,6 +17,7 @@ export function loadConfig() {
15
17
  const raw = {
16
18
  ZIGGS_API_URL: process.env.ZIGGS_API_URL,
17
19
  HTTP_URL: process.env.HTTP_URL ?? process.env.ZIGGS_API_URL,
20
+ ZIGGS_WEB_URL: process.env.ZIGGS_WEB_URL,
18
21
  ZIGGS_OPERATOR_KEY: process.env.ZIGGS_OPERATOR_KEY,
19
22
  ZIGGS_AGENT_ID: process.env.ZIGGS_AGENT_ID,
20
23
  ZIGGS_OWNER_USER_ID: process.env.ZIGGS_OWNER_USER_ID,
package/dist/tools.js CHANGED
@@ -166,7 +166,10 @@ export function registerZiggsTools(server, creds, cfg) {
166
166
  });
167
167
  server.tool('ziggs_send_message', 'Send a chat message as the delegate agent (requires chat membership). Cross-org first contact requires an ACTIVE link first (ziggs_request_link / ziggs_create_link_invite, then approve/claim); without it, messaging an agent outside your org fails with AGENT_NOT_PUBLISHED.', {
168
168
  chatId: z.string(),
169
- receiverId: z.string().describe('User or agent id receiving the message'),
169
+ receiverId: z
170
+ .string()
171
+ .optional()
172
+ .describe('User or agent id receiving the message. Optional when the chat has exactly one other member (the recipient is inferred server-side); required when multiple members could receive it.'),
170
173
  text: z.string(),
171
174
  entryType: z
172
175
  .string()
@@ -348,5 +351,5 @@ export function registerZiggsTools(server, creds, cfg) {
348
351
  return toolError(e.message);
349
352
  }
350
353
  });
351
- registerTrustTools(server, creds);
354
+ registerTrustTools(server, creds, cfg);
352
355
  }
@@ -1,4 +1,5 @@
1
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { type Creds } from '@ziggs-ai/api-client';
3
+ import type { ZiggsMcpConfig } from './config.js';
3
4
  /** ZIG-433 — agent search + context grant management through MCP. */
4
- export declare function registerTrustTools(server: McpServer, creds: Creds): void;
5
+ export declare function registerTrustTools(server: McpServer, creds: Creds, cfg?: ZiggsMcpConfig): void;
@@ -13,8 +13,10 @@ function toolError(message) {
13
13
  }
14
14
  const grantScopeKindSchema = z.enum(['chat', 'agreement', 'org']);
15
15
  const contextTemporalSchema = z.enum(['from-now', 'from-start']);
16
+ const DEFAULT_WEB_URL = 'https://ziggsai.com';
16
17
  /** ZIG-433 — agent search + context grant management through MCP. */
17
- export function registerTrustTools(server, creds) {
18
+ export function registerTrustTools(server, creds, cfg) {
19
+ const webUrl = cfg?.ZIGGS_WEB_URL?.replace(/\/$/, '') ?? DEFAULT_WEB_URL;
18
20
  server.tool('ziggs_search_agents', 'Find agents (AgentSearchClient). A keyword/natural-language query searches PUBLISHED agents only. Passing an EXACT agent id resolves that one agent even if it is unpublished/private — use this to look up a delegate someone shared their id for, then ziggs_request_link against it (ZIG-480). Use returned agentId in grant/issue tools — do not guess ids.', {
19
21
  query: z.string().describe('Keyword/natural-language search (published agents) OR an exact agent id (resolves that agent even if unpublished)'),
20
22
  limit: z.number().optional().describe('Max results (default server-side)'),
@@ -183,7 +185,8 @@ export function registerTrustTools(server, creds) {
183
185
  return textResult({
184
186
  status: 'open',
185
187
  inviteId: agreement.agreementId,
186
- message: 'Open link invite created. Share inviteId (agreementId) with the counterparty; they claim it via ziggs_claim_link_invite. No agent id needed on either side.',
188
+ claimUrl: `${webUrl}/app/link-invites/${agreement.agreementId}`,
189
+ message: 'Open link invite created. Share claimUrl with the counterparty — they open it in the Ziggs web app to claim and activate the link. No agent id needed on either side.',
187
190
  agreement,
188
191
  });
189
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/ziggs-mcp",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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": {