@spences10/pi-mcp 0.0.5 → 0.0.7
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 +6 -3
- package/dist/env.js +6 -45
- package/dist/env.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# @spences10/pi-mcp
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@spences10/pi-mcp)
|
|
4
|
+
[](https://viteplus.dev)
|
|
5
|
+
[](https://vitest.dev)
|
|
5
6
|
|
|
6
7
|
Pi extension for connecting MCP servers and exposing their tools
|
|
7
8
|
inside Pi.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Maintained in the `my-pi` Vite+ workspace and tested with Vitest.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
10
13
|
|
|
11
14
|
```bash
|
|
12
15
|
pi install npm:@spences10/pi-mcp
|
package/dist/env.js
CHANGED
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
'CI',
|
|
3
|
-
'COLORTERM',
|
|
4
|
-
'FORCE_COLOR',
|
|
5
|
-
'HOME',
|
|
6
|
-
'LANG',
|
|
7
|
-
'LOGNAME',
|
|
8
|
-
'NO_COLOR',
|
|
9
|
-
'PATH',
|
|
10
|
-
'SHELL',
|
|
11
|
-
'TEMP',
|
|
12
|
-
'TERM',
|
|
13
|
-
'TMP',
|
|
14
|
-
'TMPDIR',
|
|
15
|
-
'USER',
|
|
16
|
-
]);
|
|
17
|
-
const EXTRA_ENV_ALLOWLIST_KEYS = [
|
|
18
|
-
'MY_PI_CHILD_ENV_ALLOWLIST',
|
|
19
|
-
'MY_PI_MCP_ENV_ALLOWLIST',
|
|
20
|
-
];
|
|
1
|
+
import { create_child_process_env as create_shared_child_process_env } from '@spences10/pi-child-env';
|
|
21
2
|
export function create_child_process_env(explicit_env = {}, source_env = process.env) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
for (const allowlist_key of EXTRA_ENV_ALLOWLIST_KEYS) {
|
|
29
|
-
for (const key of parse_env_allowlist(source_env[allowlist_key])) {
|
|
30
|
-
allowed_keys.add(key);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const key of allowed_keys) {
|
|
34
|
-
const value = source_env[key];
|
|
35
|
-
if (typeof value === 'string')
|
|
36
|
-
env[key] = value;
|
|
37
|
-
}
|
|
38
|
-
return { ...env, ...explicit_env };
|
|
39
|
-
}
|
|
40
|
-
function parse_env_allowlist(value) {
|
|
41
|
-
if (!value)
|
|
42
|
-
return [];
|
|
43
|
-
return value
|
|
44
|
-
.split(',')
|
|
45
|
-
.map((key) => key.trim())
|
|
46
|
-
.filter(Boolean);
|
|
3
|
+
return create_shared_child_process_env({
|
|
4
|
+
profile: 'mcp',
|
|
5
|
+
explicit_env,
|
|
6
|
+
source_env,
|
|
7
|
+
});
|
|
47
8
|
}
|
|
48
9
|
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,IAAI,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAEtG,MAAM,UAAU,wBAAwB,CACvC,eAAuC,EAAE,EACzC,aAAgC,OAAO,CAAC,GAAG;IAE3C,OAAO,+BAA+B,CAAC;QACtC,OAAO,EAAE,KAAK;QACd,YAAY;QACZ,UAAU;KACV,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spences10/pi-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Pi extension for connecting MCP servers and exposing their tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mariozechner/pi-coding-agent": "^0.70.6"
|
|
35
|
+
"@mariozechner/pi-coding-agent": "^0.70.6",
|
|
36
|
+
"@spences10/pi-child-env": "0.1.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@types/node": "^25.6.0",
|
|
@@ -50,6 +51,6 @@
|
|
|
50
51
|
"scripts": {
|
|
51
52
|
"build": "tsc -p tsconfig.build.json",
|
|
52
53
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
53
|
-
"test": "vitest run"
|
|
54
|
+
"test": "pnpm --filter @spences10/pi-child-env run build && vitest run"
|
|
54
55
|
}
|
|
55
56
|
}
|