@cjhyy/code-shell-server 0.9.11 → 0.9.13

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.
@@ -180,9 +180,10 @@ export class ResourceLibrary {
180
180
  const digest = createHash("sha256");
181
181
  let copied = 0;
182
182
  destination = await open(temporary, "wx", 0o600);
183
- // A fixed-size buffer keeps large imports streaming while retaining both
184
- // file descriptors for post-copy identity checks and an explicit fsync.
185
- const buffer = Buffer.allocUnsafe(256 * 1024);
183
+ // A bounded 1 MiB buffer amortizes the filesystem identity checks on large
184
+ // imports. Every block still verifies the grant, source and staging path;
185
+ // both descriptors remain open for the final identity checks and fsync.
186
+ const buffer = Buffer.allocUnsafe(Math.min(initial.size, 1024 * 1024));
186
187
  while (true) {
187
188
  await verifySource();
188
189
  const { bytesRead } = await source.read(buffer, 0, buffer.length, copied);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cjhyy/code-shell-server",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "description": "CodeShell server transport layer — mobile remote HTTP/WS host, pairing, passcode gate, tunnel, rooms, uploads, and session/attachment services. Electron-free; precursor of the auth gateway.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -51,13 +51,13 @@
51
51
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
52
52
  },
53
53
  "dependencies": {
54
- "@cjhyy/code-shell-capability-coding": "0.9.11",
55
- "@cjhyy/code-shell-core": "0.9.11",
56
- "@cjhyy/code-shell-web": "0.9.11",
54
+ "@cjhyy/code-shell-capability-coding": "0.9.13",
55
+ "@cjhyy/code-shell-core": "0.9.13",
56
+ "@cjhyy/code-shell-web": "0.9.13",
57
57
  "@modelcontextprotocol/sdk": "^1.12.1",
58
58
  "@types/ws": "^8.18.1",
59
59
  "ws": "^8.21.0",
60
- "@cjhyy/code-shell-link": "0.9.11"
60
+ "@cjhyy/code-shell-link": "0.9.13"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=20.10"