@tano.page/mcp 0.16.0 → 0.17.0

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/dist/tano-mcp.cjs CHANGED
@@ -37372,8 +37372,8 @@ var builtInFileHandlers = Object.freeze([
37372
37372
  handler("powerpoint-openxml", ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.presentation", "office"),
37373
37373
  ...Object.entries({ png: "png", jpg: "jpeg", jpeg: "jpeg", gif: "gif", webp: "webp", avif: "avif", bmp: "bmp", svg: "svg+xml" }).map(([ext, mime]) => handler(`image-${ext}`, [ext], `image/${mime}`, "image")),
37374
37374
  handler("csv", ["csv", "tsv"], "text/csv", "csv"),
37375
- handler("json", ["json"], "application/json", "json"),
37376
- handler("code", ["js", "ts", "jsx", "tsx", "vue", "py", "rs", "css", "html", "htm", "xml", "yaml", "yml", "toml", "ini", "sh", "sql", "c", "h", "cpp", "hpp", "java", "go", "rb", "php", "ps1"], "text/plain", "code"),
37375
+ handler("json", ["json", "jsonc"], "application/json", "json"),
37376
+ handler("code", ["js", "mjs", "cjs", "ts", "mts", "cts", "jsx", "tsx", "vue", "svelte", "py", "rs", "css", "scss", "less", "html", "htm", "xml", "yaml", "yml", "toml", "ini", "conf", "cfg", "properties", "sh", "bash", "zsh", "sql", "c", "h", "cpp", "hpp", "cc", "java", "kt", "swift", "dart", "go", "rb", "php", "ps1", "dockerfile"], "text/plain", "code"),
37377
37377
  handler("text", ["txt", "log"], "text/plain", "text"),
37378
37378
  handler("audio", ["mp3", "wav", "ogg", "m4a", "flac"], "audio/*", "audio"),
37379
37379
  handler("video", ["mp4", "webm", "mov"], "video/*", "video")
@@ -38299,10 +38299,39 @@ var AgentWorkspace = class {
38299
38299
  changed = true;
38300
38300
  (0, import_node_fs.unlinkSync)(temporary);
38301
38301
  } else {
38302
- if (this.read(path).sha256 !== expectedHash)
38303
- throw new Error("\u5185\u5BB9\u5DF2\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u5E76\u5408\u5E76");
38304
- (0, import_node_fs.renameSync)(temporary, target);
38305
- changed = true;
38302
+ const nameKey = (0, import_node_crypto.createHash)("sha256").update(Buffer.from(target.split(/[\\/]/).at(-1) ?? "file", "utf8")).digest("hex").slice(0, 16);
38303
+ const lockPath = (0, import_node_path.join)((0, import_node_path.dirname)(target), `.tano-write-${nameKey}.lock`);
38304
+ let lockFd;
38305
+ for (let attempt = 0; attempt < 25; attempt++) {
38306
+ try {
38307
+ lockFd = (0, import_node_fs.openSync)(lockPath, "wx", 384);
38308
+ break;
38309
+ } catch (lockErr) {
38310
+ if (lockErr?.code !== "EEXIST") throw lockErr;
38311
+ try {
38312
+ if (Date.now() - (0, import_node_fs.lstatSync)(lockPath).mtimeMs > 3e4) {
38313
+ (0, import_node_fs.unlinkSync)(lockPath);
38314
+ continue;
38315
+ }
38316
+ } catch {
38317
+ continue;
38318
+ }
38319
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 40);
38320
+ }
38321
+ }
38322
+ if (lockFd === void 0) throw new Error("\u6587\u4EF6\u6B63\u88AB\u5176\u4ED6 Tano \u8FDB\u7A0B\u5199\u5165\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
38323
+ try {
38324
+ (0, import_node_fs.closeSync)(lockFd);
38325
+ if (this.read(path).sha256 !== expectedHash)
38326
+ throw new Error("\u5185\u5BB9\u5DF2\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u5E76\u5408\u5E76");
38327
+ (0, import_node_fs.renameSync)(temporary, target);
38328
+ changed = true;
38329
+ } finally {
38330
+ try {
38331
+ (0, import_node_fs.unlinkSync)(lockPath);
38332
+ } catch {
38333
+ }
38334
+ }
38306
38335
  }
38307
38336
  temporary = void 0;
38308
38337
  this.db.prepare("UPDATE agent_changes SET status='applied' WHERE id=?").run(id2);
@@ -46303,7 +46332,7 @@ var EMPTY_COMPLETION_RESULT = {
46303
46332
  // package.json
46304
46333
  var package_default = {
46305
46334
  name: "@tano/mcp",
46306
- version: "0.16.0",
46335
+ version: "0.17.0",
46307
46336
  private: true,
46308
46337
  type: "module",
46309
46338
  engines: {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tano.page/mcp",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24.12.0"
7
7
  },
8
8
  "dependencies": {
9
9
  "@modelcontextprotocol/sdk": "^1.30.0",
10
- "@tano/protocol": "npm:@tano.page/protocol@0.16.0",
10
+ "@tano/protocol": "npm:@tano.page/protocol@0.17.0",
11
11
  "zod": "^4.6.5"
12
12
  },
13
13
  "license": "MIT",
@@ -28,8 +28,8 @@
28
28
  "url": "git+https://github.com/Dramwig/Tano.git"
29
29
  },
30
30
  "tanoCore": {
31
- "sourceCommit": "0eead85177b8d5010d0daea26f1995a27f9270a9",
32
- "version": "0.16.0",
31
+ "sourceCommit": "dfaf132df0cd7086cd9ee09c9b620b47cc0dc7f0",
32
+ "version": "0.17.0",
33
33
  "importName": "@tano/mcp"
34
34
  }
35
35
  }