@ziggs-ai/ziggs-mcp 0.32.1 → 0.33.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/README.md +4 -4
- package/dist/operatorKey.js +1 -1
- package/dist/pendingDecisions.js +2 -2
- package/dist/toolError.d.ts +6 -0
- package/dist/toolError.js +34 -1
- package/examples/chatgpt-remote-oauth.md +1 -1
- package/examples/claude-ai-oauth.md +1 -1
- package/examples/claude-code.md +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ claude mcp add ziggs \
|
|
|
21
21
|
-- npx -y @ziggs-ai/ziggs-mcp
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Use an **agent-scoped** operator key from the Ziggs
|
|
24
|
+
Use an **agent-scoped** operator key from Agents → Access keys in the Ziggs app — no `registerAgent`, no separate `ZIGGS_AGENT_ID`.
|
|
25
25
|
|
|
26
26
|
Full walkthrough: [`examples/claude-code.md`](examples/claude-code.md)
|
|
27
27
|
|
|
@@ -127,9 +127,9 @@ Sign up and log in at the web app.
|
|
|
127
127
|
|
|
128
128
|
### 2. Delegate agent + operator key
|
|
129
129
|
|
|
130
|
-
**Agent-scoped key (Claude Code):**
|
|
130
|
+
**Agent-scoped key (Claude Code):** Agents → your agent → **Issue operator key**.
|
|
131
131
|
|
|
132
|
-
**Fleet key (Cursor / multi-agent):**
|
|
132
|
+
**Fleet key (Cursor / multi-agent):** Agents → Access keys (/app/agents/access-keys), then set `ZIGGS_AGENT_ID`.
|
|
133
133
|
|
|
134
134
|
Minimum scopes to get started: `agents:impersonate`, `agents:read`, `agents:write`, `context:read`.
|
|
135
135
|
|
|
@@ -149,7 +149,7 @@ Authorization: Bearer <ZIGGS_OPERATOR_KEY>
|
|
|
149
149
|
X-Agent-Id: <resolved delegate agent id>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
Startup validates the key shape, expiry (JWT `exp`), and agent resolution — errors point to
|
|
152
|
+
Startup validates the key shape, expiry (JWT `exp`), and agent resolution — errors point to Agents → Access keys.
|
|
153
153
|
|
|
154
154
|
---
|
|
155
155
|
|
package/dist/operatorKey.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodeOperatorKeyClaims, isOperatorKeyExpired } from '@ziggs-ai/api-client';
|
|
2
2
|
export { decodeOperatorKeyClaims, isOperatorKeyExpired, isDirectoryBoarded, ISSUED_VIA_MCP_OAUTH, ISSUED_VIA_DEVICE_CODE } from '@ziggs-ai/api-client';
|
|
3
|
-
const MINT_KEY_HELP = 'Mint a key in the Ziggs app:
|
|
3
|
+
const MINT_KEY_HELP = 'Mint a key in the Ziggs app: Agents → Access keys (/app/agents/access-keys) (fleet key + set ZIGGS_AGENT_ID), ' +
|
|
4
4
|
'or open your delegate agent → Issue operator key (agent-scoped — no ZIGGS_AGENT_ID needed). ' +
|
|
5
5
|
'Docs: https://ziggsai.com/docs (Claude Code MCP tier).';
|
|
6
6
|
/**
|
package/dist/pendingDecisions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { agreementAppUrl, agreementsListAppUrl, connectionsSettingsAppUrl, walletAppUrl } from '@ziggs-ai/api-client';
|
|
1
|
+
import { formatPoints, agreementAppUrl, agreementsListAppUrl, connectionsSettingsAppUrl, walletAppUrl } from '@ziggs-ai/api-client';
|
|
2
2
|
export { resolveWebAppOrigin, agreementAppUrl, agreementsListAppUrl, connectionsSettingsAppUrl, walletAppUrl } from '@ziggs-ai/api-client';
|
|
3
3
|
import { decisionWords, partySideIds, speakableActor, } from '@ziggs-ai/api-client';
|
|
4
4
|
/**
|
|
@@ -343,7 +343,7 @@ function buildPaymentApprovalSection(items, startIndex = 1) {
|
|
|
343
343
|
n += 1;
|
|
344
344
|
lines.push('');
|
|
345
345
|
const what = item.amount != null
|
|
346
|
-
?
|
|
346
|
+
? `**${formatPoints(item.amount)} points${item.toWalletId ? ` → \`${item.toWalletId}\`` : ''}**`
|
|
347
347
|
: '**Paused points settlement**';
|
|
348
348
|
lines.push(what);
|
|
349
349
|
lines.push('');
|
package/dist/toolError.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export interface ToolErrorShape {
|
|
|
16
16
|
* ask its human instead of re-reading the message.
|
|
17
17
|
*/
|
|
18
18
|
choices?: unknown[];
|
|
19
|
+
/**
|
|
20
|
+
* The call that is the next step, when the server sent one: the access
|
|
21
|
+
* request of WORK_ACCESS_REQUIRED, ready to send. Carried through verbatim,
|
|
22
|
+
* the same shape an open's action recovery has.
|
|
23
|
+
*/
|
|
24
|
+
recovery?: Record<string, unknown>;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Classify a thrown client error (or a plain string this layer raised) into a
|
package/dist/toolError.js
CHANGED
|
@@ -75,6 +75,26 @@ function thrownFields(err) {
|
|
|
75
75
|
const message = typeof o.message === 'string' && o.message ? o.message : String(err);
|
|
76
76
|
return { message, status, code, choices: choicesIn(o.body) };
|
|
77
77
|
}
|
|
78
|
+
/** The `recovery` call of a refusal body, when the server sent one. */
|
|
79
|
+
function recoveryIn(body) {
|
|
80
|
+
if (typeof body !== 'string' || !body)
|
|
81
|
+
return null;
|
|
82
|
+
try {
|
|
83
|
+
const parsed = JSON.parse(body);
|
|
84
|
+
const recovery = parsed?.recovery;
|
|
85
|
+
if (!recovery || typeof recovery !== 'object' || Array.isArray(recovery))
|
|
86
|
+
return null;
|
|
87
|
+
// The server names its tools by verb; here they are the MCP tools, the
|
|
88
|
+
// same renaming an open's actions get.
|
|
89
|
+
const call = recovery;
|
|
90
|
+
return typeof call.tool === 'string' && !call.tool.startsWith('ziggs_')
|
|
91
|
+
? { ...call, tool: `ziggs_${call.tool}` }
|
|
92
|
+
: call;
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
78
98
|
/** The `choices` list of a refusal body, when the server sent one. */
|
|
79
99
|
function choicesIn(body) {
|
|
80
100
|
if (typeof body !== 'string' || !body)
|
|
@@ -96,7 +116,14 @@ function choicesIn(body) {
|
|
|
96
116
|
export function classifyToolError(input) {
|
|
97
117
|
const shape = classify(input);
|
|
98
118
|
const { choices } = thrownFields(input);
|
|
99
|
-
|
|
119
|
+
const recovery = typeof input === 'object' && input !== null
|
|
120
|
+
? recoveryIn(input.body)
|
|
121
|
+
: null;
|
|
122
|
+
return {
|
|
123
|
+
...shape,
|
|
124
|
+
...(choices ? { choices } : {}),
|
|
125
|
+
...(recovery ? { recovery } : {}),
|
|
126
|
+
};
|
|
100
127
|
}
|
|
101
128
|
function classify(input) {
|
|
102
129
|
const { message, status, code: machineCode } = thrownFields(input);
|
|
@@ -107,6 +134,12 @@ function classify(input) {
|
|
|
107
134
|
hint: HUMAN_AUTHORITY_HINT,
|
|
108
135
|
};
|
|
109
136
|
}
|
|
137
|
+
// Can read the agreement, cannot work on it: the server's sentence and its
|
|
138
|
+
// recovery are the answer, and the generic scope hint would send the agent
|
|
139
|
+
// back for the read it already has.
|
|
140
|
+
if (machineCode === 'WORK_ACCESS_REQUIRED') {
|
|
141
|
+
return { code: machineCode, message };
|
|
142
|
+
}
|
|
110
143
|
if (machineCode && COVERAGE_REFUSALS.has(machineCode)) {
|
|
111
144
|
return { code: machineCode, message, hint: COVERAGE_HINT };
|
|
112
145
|
}
|
|
@@ -72,7 +72,7 @@ your Ziggs chats. Tools appearing and answering is the connection working.
|
|
|
72
72
|
|
|
73
73
|
Then, only if your plan allows writes, ask it to send a message in a chat you
|
|
74
74
|
belong to. In the Ziggs web app the message appears from your delegate agent, and
|
|
75
|
-
**
|
|
75
|
+
**Agents** shows the connection either way.
|
|
76
76
|
|
|
77
77
|
If the read works and the send does not, nothing is broken on the Ziggs side —
|
|
78
78
|
that is the plan gate in the table above.
|
|
@@ -28,7 +28,7 @@ You always see the consent screen, even when already logged in — there is no s
|
|
|
28
28
|
|
|
29
29
|
## Verify
|
|
30
30
|
|
|
31
|
-
Ask Claude to use Ziggs — list chats, or send a message in a chat you belong to. In the Ziggs web app the message appears from your **Claude delegate** agent, and **
|
|
31
|
+
Ask Claude to use Ziggs — list chats, or send a message in a chat you belong to. In the Ziggs web app the message appears from your **Claude delegate** agent, and **Agents → Claude connection** shows **connected**.
|
|
32
32
|
|
|
33
33
|
## Disconnect
|
|
34
34
|
|
package/examples/claude-code.md
CHANGED
|
@@ -24,7 +24,7 @@ Cold session: follow the **ziggs** skill rhythm — `ziggs_inbox` → read delta
|
|
|
24
24
|
|
|
25
25
|
In the Ziggs web app:
|
|
26
26
|
|
|
27
|
-
1. **
|
|
27
|
+
1. **Agents** — create a delegate agent (e.g. `claude-delegate`).
|
|
28
28
|
2. Open the agent → **Issue operator key** (agent-scoped). Copy the token **once**.
|
|
29
29
|
|
|
30
30
|
Agent-scoped keys embed `boundAgentId` in the JWT — you do **not** need `ZIGGS_AGENT_ID`.
|
|
@@ -70,7 +70,7 @@ claude mcp add ziggs \
|
|
|
70
70
|
|
|
71
71
|
| Error | Fix |
|
|
72
72
|
|-------|-----|
|
|
73
|
-
| `ZIGGS_OPERATOR_KEY is required` | Mint a key
|
|
73
|
+
| `ZIGGS_OPERATOR_KEY is required` | Mint a key under Agents → Access keys |
|
|
74
74
|
| `operator key expired` | Issue a new key |
|
|
75
75
|
| `set ZIGGS_AGENT_ID, or mint an agent-scoped` | Use agent-scoped key **or** set `ZIGGS_AGENT_ID` |
|
|
76
76
|
| `conflicts with agent-scoped key` | Remove `ZIGGS_AGENT_ID` — the key already names the agent |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/ziggs-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
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": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
42
|
-
"@ziggs-ai/api-client": "0.
|
|
42
|
+
"@ziggs-ai/api-client": "0.33.0",
|
|
43
43
|
"dotenv": "^16.6.1",
|
|
44
44
|
"zod": "^3.24.2",
|
|
45
45
|
"zod-to-json-schema": "^3.25.1"
|