@aipermission/mcp 0.2.25 → 0.2.26
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.
|
@@ -25,7 +25,7 @@ Before acting:
|
|
|
25
25
|
2. Pick the relevant `target_ref`.
|
|
26
26
|
3. Call `get_connector_help(target_ref)` the first time you use that connector.
|
|
27
27
|
4. Call `get_connector_actions(target_ref)` and choose the narrowest action.
|
|
28
|
-
5. Call `call_connector_action(target_ref, action_name, input, reason)`.
|
|
28
|
+
5. Call `call_connector_action(target_ref, action_name, input, reason, idempotency_key)`.
|
|
29
29
|
|
|
30
30
|
If no target is visible, say that the current token has no accessible connector
|
|
31
31
|
targets. A target can be absent because its project is disabled for the token or
|
|
@@ -41,6 +41,11 @@ profile. Treat action errors as the current reachability/authorization signal.
|
|
|
41
41
|
## Reasons
|
|
42
42
|
|
|
43
43
|
Every `call_connector_action` should include a short `reason`.
|
|
44
|
+
Use one stable, unique `idempotency_key` for each logical action. Preserve that
|
|
45
|
+
key while retrying an uncertain call. Never reuse it for a different target,
|
|
46
|
+
action, input, or reason; the gateway rejects mismatched reuse.
|
|
47
|
+
Blocked and missing-permission outcomes are also replayed. After the operator
|
|
48
|
+
changes permission, use a new key for the new logical attempt.
|
|
44
49
|
|
|
45
50
|
Good reasons:
|
|
46
51
|
|
package/dist/server.js
CHANGED
|
@@ -69,13 +69,15 @@ server.tool(
|
|
|
69
69
|
action_name: z.string().min(1).describe("Action name from get_connector_actions."),
|
|
70
70
|
input: z.record(z.unknown()).optional().describe("Connector-specific action input."),
|
|
71
71
|
reason: z.string().optional().describe("Why this connector action is needed."),
|
|
72
|
+
idempotency_key: z.string().min(1).max(128).optional().describe("Caller-stable key that makes retries return the original request without running twice."),
|
|
72
73
|
},
|
|
73
|
-
async ({ target_ref, action_name, input, reason }) => {
|
|
74
|
+
async ({ target_ref, action_name, input, reason, idempotency_key }) => {
|
|
74
75
|
return jsonToolResult(() => apiPost("/api/mcp/connector-actions/call", {
|
|
75
76
|
target_ref,
|
|
76
77
|
action_name,
|
|
77
78
|
input: input || {},
|
|
78
79
|
reason: reason || "",
|
|
80
|
+
idempotency_key,
|
|
79
81
|
}));
|
|
80
82
|
}
|
|
81
83
|
);
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"name": "io.github.aipermission/aipermission-mcp",
|
|
4
4
|
"title": "AIPermission",
|
|
5
5
|
"description": "Local-first MCP bridge for the AIPermission gateway.",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.26",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@aipermission/mcp",
|
|
11
|
-
"version": "0.2.
|
|
11
|
+
"version": "0.2.26",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|