@aipermission/mcp 0.2.49 → 0.2.50
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 -0
- package/dist/init.js +1 -1
- package/dist/local-url.js +3 -0
- package/dist/server.js +10 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -98,6 +98,10 @@ Local input-validation failures do not imply that execution occurred.
|
|
|
98
98
|
Malformed or incomplete JSON responses are not treated as success. Invalid
|
|
99
99
|
local headers are rejected before dispatch without echoing the API token;
|
|
100
100
|
transport errors never echo raw response fragments or header values.
|
|
101
|
+
Connector-action capacity errors retain HTTP `429`, the gateway error code,
|
|
102
|
+
and `Retry-After`. Respect that delay; immediate retry loops cannot bypass the
|
|
103
|
+
gateway's per-workspace/token rate, persisted-running concurrency, input, or
|
|
104
|
+
atomic projected-storage limits.
|
|
101
105
|
|
|
102
106
|
- `list_connector_targets`
|
|
103
107
|
- `get_connector_help`
|
package/dist/init.js
CHANGED
|
@@ -614,7 +614,7 @@ function scanTOMLHeader(line, state) {
|
|
|
614
614
|
return null;
|
|
615
615
|
}
|
|
616
616
|
const trimmed = line.trimStart();
|
|
617
|
-
if (trimmed.startsWith("[")
|
|
617
|
+
if (trimmed.startsWith("[")) {
|
|
618
618
|
try {
|
|
619
619
|
return findMarkerPath(parseTOML(`${line}\n__aipermission_header_marker = true\n`));
|
|
620
620
|
} catch {
|
package/dist/local-url.js
CHANGED
|
@@ -13,6 +13,9 @@ export function normalizeLocalAPIURL(value = DEFAULT_API_URL) {
|
|
|
13
13
|
if (parsed.protocol !== "http:") {
|
|
14
14
|
throw new Error("AIPERMISSION_API_URL must use http:// for the local gateway.");
|
|
15
15
|
}
|
|
16
|
+
if (parsed.username || parsed.password) {
|
|
17
|
+
throw new Error("AIPERMISSION_API_URL must not contain URL credentials.");
|
|
18
|
+
}
|
|
16
19
|
let hostname = parsed.hostname.toLowerCase();
|
|
17
20
|
if (hostname === "[::1]") {
|
|
18
21
|
hostname = "::1";
|
package/dist/server.js
CHANGED
|
@@ -17,7 +17,13 @@ import { normalizeLocalAPIURL } from "./local-url.js";
|
|
|
17
17
|
import { jsonToolResult } from "./results.js";
|
|
18
18
|
|
|
19
19
|
const packageMetadata = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
20
|
-
|
|
20
|
+
let apiUrl = "";
|
|
21
|
+
let apiURLConfigurationError = null;
|
|
22
|
+
try {
|
|
23
|
+
apiUrl = normalizeLocalAPIURL(process.env.AIPERMISSION_API_URL);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
apiURLConfigurationError = new Error("Invalid local gateway URL configuration; update AIPERMISSION_API_URL.", { cause: error });
|
|
26
|
+
}
|
|
21
27
|
const apiToken = process.env.AIPERMISSION_API_TOKEN || "";
|
|
22
28
|
const apiTimeoutMs = Number.parseInt(process.env.AIPERMISSION_HTTP_TIMEOUT_MS || "60000", 10);
|
|
23
29
|
|
|
@@ -177,6 +183,9 @@ async function apiPost(path, body) {
|
|
|
177
183
|
}
|
|
178
184
|
|
|
179
185
|
async function apiRequest(path, options, idempotencyKey) {
|
|
186
|
+
if (apiURLConfigurationError) {
|
|
187
|
+
throw apiURLConfigurationError;
|
|
188
|
+
}
|
|
180
189
|
if (!apiToken) {
|
|
181
190
|
throw new Error("AIPERMISSION_API_TOKEN is required.");
|
|
182
191
|
}
|
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.50",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@aipermission/mcp",
|
|
11
|
-
"version": "0.2.
|
|
11
|
+
"version": "0.2.50",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|