aipic-mcp-stdio 1.0.0 → 1.0.1

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
@@ -1,33 +1,8 @@
1
- # aipic-mcp-stdio - Release Bundle
1
+ # aipic-mcp-stdio
2
2
 
3
- Publish the `aipic-mcp-stdio` package to the public npm registry.
3
+ 百度网盘AI修图(NetdiskAIPhoto)本地 MCP 服务的 stdio ↔ HTTP 代理,供库库AI 等宿主通过 `npx -y aipic-mcp-stdio` 拉起。
4
4
 
5
- ## Contents
5
+ 按当前平台/架构自动选择对应的预编译二进制(optionalDependencies):
6
6
 
7
- - `package.json` - npm package manifest (`name: aipic-mcp-stdio`, `version: 1.0.0`)
8
- - `aipic-mcp-stdio` - the prebuilt binary (mac_arm64 build)
9
- - `publish.cmd` - Windows publish script
10
-
11
- > NOTE: the bundled binary is the **mac_arm64** build. Publishing it works on any
12
- > OS, but the resulting package only runs on Apple Silicon. If you need a
13
- > Windows package, build the `win32-x64` binary first.
14
-
15
- ## Steps
16
-
17
- 1. Install Node.js >= 18 (includes npm).
18
- 2. Log in to npm (once):
19
- ```
20
- npm login
21
- ```
22
- Use an account with two-factor authentication (2FA) enabled.
23
- 3. From this directory, run:
24
- ```
25
- publish.cmd <6-digit-otp>
26
- ```
27
- The `<6-digit-otp>` is the current code from your authenticator app.
28
-
29
- ## Notes
30
-
31
- - `publish.cmd` passes `--ignore-scripts` to skip the `prepack` tool-sync
32
- check, which requires repo files not included in this bundle.
33
- - If the OTP expires mid-publish, re-run with a fresh code.
7
+ - `aipic-mcp-stdio-darwin-arm64` — macOS Apple Silicon
8
+ - `aipic-mcp-stdio-win32-x64` — Windows x64
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ // 分发器:按当前平台/架构拉起对应平台包里预编译好的二进制。
5
+ // 敏感逻辑(护栏分级、endpoint 读取、stdin 帧解析等)全在二进制里,这里只负责选包并透传 stdio。
6
+ const { spawn } = require('node:child_process');
7
+
8
+ const pkgName = `aipic-mcp-stdio-${process.platform}-${process.arch}`;
9
+ let binPath;
10
+ try {
11
+ binPath = require(pkgName);
12
+ } catch (err) {
13
+ process.stderr.write(
14
+ `aipic-mcp-stdio: 当前平台 ${process.platform}-${process.arch} 没有预编译二进制(${pkgName} 未安装)。\n`
15
+ );
16
+ process.exit(1);
17
+ }
18
+
19
+ const child = spawn(binPath, [], { stdio: 'inherit' });
20
+
21
+ child.on('error', err => {
22
+ process.stderr.write(`aipic-mcp-stdio: 启动二进制失败:${err.message}\n`);
23
+ process.exit(1);
24
+ });
25
+
26
+ child.on('exit', (code, signal) => {
27
+ if (signal) {
28
+ process.kill(process.pid, signal);
29
+ } else {
30
+ process.exit(code == null ? 1 : code);
31
+ }
32
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aipic-mcp-stdio",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "stdio <-> HTTP proxy for the Baidu Netdisk AI Photo (NetdiskAIPhoto) local MCP server",
5
5
  "keywords": [
6
6
  "mcp",
@@ -13,19 +13,17 @@
13
13
  "registry": "https://registry.npmjs.org/"
14
14
  },
15
15
  "bin": {
16
- "aipic-mcp-stdio": "aipic-mcp-stdio"
16
+ "aipic-mcp-stdio": "bin/aipic-mcp-stdio.js"
17
17
  },
18
18
  "engines": {
19
19
  "node": ">=18"
20
20
  },
21
21
  "files": [
22
- "aipic-mcp-stdio"
22
+ "bin"
23
23
  ],
24
24
  "dependencies": {},
25
- "scripts": {
26
- "verify": "node verify.js",
27
- "verify:all": "node verify.js --all",
28
- "check:tools": "node check-tool-sync.js",
29
- "prepack": "node check-tool-sync.js"
25
+ "optionalDependencies": {
26
+ "aipic-mcp-stdio-darwin-arm64": "1.0.1",
27
+ "aipic-mcp-stdio-win32-x64": "1.0.1"
30
28
  }
31
29
  }
package/aipic-mcp-stdio DELETED
@@ -1,4 +0,0 @@
1
- [diffend] Oversized file quarantined before diffing.
2
- name: package/aipic-mcp-stdio
3
- size: 112709712 bytes
4
- sha256: 60467a03c446d2201d0adf4123fb0171674c679676138d9cb06facfd2c576f0a