@ziggs-ai/ziggs-mcp 0.1.7 → 0.1.8
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/operatorKey.d.ts +1 -0
- package/dist/operatorKey.js +1 -0
- package/dist/tools.js +7 -3
- package/package.json +1 -1
package/dist/operatorKey.d.ts
CHANGED
package/dist/operatorKey.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -47,16 +47,20 @@ async function writeArtifactStrict(creds, input) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
export function registerZiggsTools(server, creds, cfg) {
|
|
50
|
-
server.tool('ziggs_connection_status', 'ZIG-503 — Verify MCP OAuth binding: delegate agent id, owner user id, and
|
|
50
|
+
server.tool('ziggs_connection_status', 'ZIG-503 — Verify MCP OAuth binding: delegate agent id, owner user id, and org scope. Call after connect before inbox/chats.', {}, async () => {
|
|
51
51
|
const claims = decodeOperatorKeyClaims(creds.operatorKey);
|
|
52
|
+
const boundOrgId = claims?.boundOrgId?.trim() || null;
|
|
52
53
|
return textResult({
|
|
53
54
|
ok: true,
|
|
54
55
|
agentId: creds.agentId,
|
|
55
56
|
ownerId: claims?.ownerId ?? cfg.ZIGGS_OWNER_USER_ID ?? null,
|
|
56
57
|
keyId: claims?.keyId ?? null,
|
|
57
58
|
tokenType: claims?.type ?? 'operator',
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
orgId: boundOrgId,
|
|
60
|
+
orgBinding: boundOrgId ? 'selected' : 'personal',
|
|
61
|
+
orgBindingNote: boundOrgId
|
|
62
|
+
? 'MCP OAuth is bound to the organization you chose at consent (ZIG-504).'
|
|
63
|
+
: 'MCP OAuth binds to your personal org when no org was specified at consent.',
|
|
60
64
|
apiBase: getBackendUrl(),
|
|
61
65
|
docs: 'https://ziggsai.com/docs',
|
|
62
66
|
});
|