@aipermission/mcp 0.1.8 → 0.1.9
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 +2 -1
- package/dist/resources/aipermission-operator/SKILL.md +9 -0
- package/dist/server.js +13 -0
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ The generated MCP config contains a bearer token. Keep it private. For project-l
|
|
|
54
54
|
- `get_request`
|
|
55
55
|
- `list_requests`
|
|
56
56
|
- `read_console`
|
|
57
|
+
- `restart_console_session`
|
|
57
58
|
- `send_message`
|
|
58
59
|
- `list_file_transfers`
|
|
59
60
|
- `get_file_transfer`
|
|
@@ -97,7 +98,7 @@ Supported clients:
|
|
|
97
98
|
- `gemini`: `GEMINI.md`
|
|
98
99
|
- `custom`: prints portable Markdown to stdout
|
|
99
100
|
|
|
100
|
-
These instructions teach the agent how to poll `approval_pending` and `running` requests, read live console output, write short reasons, use explicit file transfer paths, and avoid printing secrets. The default installer uses the operator instruction bundled in the npm package; `--source` accepts local file paths only and rejects HTTP(S) sources.
|
|
101
|
+
These instructions teach the agent how to poll `approval_pending` and `running` requests, handle `stale` approvals by sending a fresh request, read live console output, write short reasons, use explicit file transfer paths, and avoid printing secrets. The default installer uses the operator instruction bundled in the npm package; `--source` accepts local file paths only and rejects HTTP(S) sources.
|
|
101
102
|
|
|
102
103
|
## Security Boundary
|
|
103
104
|
|
|
@@ -67,9 +67,11 @@ failed
|
|
|
67
67
|
declined
|
|
68
68
|
blocked
|
|
69
69
|
error
|
|
70
|
+
stale
|
|
70
71
|
```
|
|
71
72
|
|
|
72
73
|
If the request is `declined`, read `user_note` and follow the user's correction.
|
|
74
|
+
If the request is `stale`, the approval context changed before execution; send a fresh `exec` request with the current command and reason instead of trying to reuse the old approval.
|
|
73
75
|
|
|
74
76
|
## Running Flow
|
|
75
77
|
|
|
@@ -80,6 +82,13 @@ When `exec` or `get_request` returns `running`:
|
|
|
80
82
|
3. Use `read_console(server_id)` between polls only when the token has `always_run` permission.
|
|
81
83
|
4. Do not start another long-running command on the same server until the active request reaches a terminal status, unless the user explicitly asks.
|
|
82
84
|
|
|
85
|
+
If the request appears stuck for an unusually long time and `read_console`
|
|
86
|
+
shows no useful progress, ask the operator before recovery. When the operator
|
|
87
|
+
agrees, call `restart_console_session(server_id)`. This closes the
|
|
88
|
+
gateway-owned persistent console session and the next `exec` opens a fresh SSH
|
|
89
|
+
session. Treat any canceled request as inconclusive and re-run only the minimal
|
|
90
|
+
safe inspection needed.
|
|
91
|
+
|
|
83
92
|
## Message Flow
|
|
84
93
|
|
|
85
94
|
Use `send_message(message, server_id?, session_id?)` for short operator-visible notes.
|
package/dist/server.js
CHANGED
|
@@ -72,6 +72,19 @@ server.tool(
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
|
|
75
|
+
server.tool(
|
|
76
|
+
"restart_console_session",
|
|
77
|
+
"Restart the persistent console session for a server when it appears stuck. This closes the current gateway-owned console session and the next exec will open a fresh SSH session.",
|
|
78
|
+
{
|
|
79
|
+
server_id: z.number().int().positive().describe("Server id from list_servers."),
|
|
80
|
+
},
|
|
81
|
+
async ({ server_id }) => {
|
|
82
|
+
return jsonToolResult(() => apiPost("/api/mcp/console/restart", {
|
|
83
|
+
server_id,
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
|
|
75
88
|
server.tool(
|
|
76
89
|
"get_request",
|
|
77
90
|
"Read an aipermission command request by id. Use this after exec returns approval_pending or running.",
|
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.1.
|
|
6
|
+
"version": "0.1.9",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@aipermission/mcp",
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.9",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|