@aipermission/mcp 0.2.24 → 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.
package/README.md CHANGED
@@ -122,6 +122,13 @@ sensitive application data, and offset changes can replay or skip records, so
122
122
  keep these actions in Prompt mode unless direct execution is intentional. If a
123
123
  publish has an unknown delivery outcome, inspect before retrying.
124
124
 
125
+ For S3, discover bounded object actions, temporary URL actions, object-version
126
+ controls, and bucket lifecycle actions through `get_connector_actions`. Signed
127
+ URLs are bearer credentials limited to one key and at most one hour. Read the
128
+ current lifecycle policy before changing it: replacement and deletion affect
129
+ the complete policy and are destructive. Keep version deletion and lifecycle
130
+ changes in Prompt unless direct execution is deliberate.
131
+
125
132
  For Docker, call `get_connector_actions(target_ref)` to discover bounded
126
133
  actions such as `docker_version`, `list_containers`, `list_images`,
127
134
  `list_networks`, `list_volumes`, `inspect_container`, `container_logs`,
@@ -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
 
@@ -203,6 +208,19 @@ prefer this sequence:
203
208
  operator explicitly approved replacement.
204
209
  7. Treat `delete_object` as destructive and ask for explicit confirmation if
205
210
  approval mode does not already provide it.
211
+ 8. Use `presign_download` and `presign_upload` only for one exact object key
212
+ and keep expiry between 60 and 3600 seconds. The returned URL is a temporary
213
+ bearer credential. When an upload result includes `required_headers`, send
214
+ every listed header unchanged; no-overwrite URLs require the signed
215
+ `If-None-Match: *` header.
216
+ 9. Use `list_object_versions` before `restore_object_version` or
217
+ `delete_object_version`. Restoring creates a new current version; deleting
218
+ an exact version or delete marker is permanent.
219
+ 10. Read `get_bucket_lifecycle` before changing retention. The bounded
220
+ `replace_bucket_lifecycle` action replaces every existing rule with one
221
+ explicit rule; `delete_bucket_lifecycle` removes the complete policy.
222
+ 11. Keep lifecycle replacement, lifecycle deletion, and version deletion in
223
+ Prompt unless the operator deliberately trusts that exact workflow.
206
224
 
207
225
  Object content may contain secrets or customer data. Avoid downloading or
208
226
  echoing object contents unless the operator asked for that exact object.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipermission/mcp",
3
- "version": "0.2.24",
3
+ "version": "0.2.26",
4
4
  "mcpName": "io.github.aipermission/aipermission-mcp",
5
5
  "description": "Local-first MCP bridge for the aipermission gateway.",
6
6
  "license": "AGPL-3.0-only",
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.24",
6
+ "version": "0.2.26",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "@aipermission/mcp",
11
- "version": "0.2.24",
11
+ "version": "0.2.26",
12
12
  "transport": {
13
13
  "type": "stdio"
14
14
  }