@kuluomi/mapp-router-mcp 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.mjs +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuluomi/mapp-router-mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "MAPP 平台意图路由 MCP 服务:列出可转交的应用,并把任务转交给它们。单文件、零运行时依赖。",
5
5
  "type": "module",
6
6
  "bin": {
package/server.mjs CHANGED
@@ -13054,7 +13054,7 @@ var require_content_type = __commonJS({
13054
13054
  import { createServer as createServer2 } from "node:http";
13055
13055
  import { hostname as hostname2 } from "node:os";
13056
13056
  import { randomUUID } from "node:crypto";
13057
- import { readFileSync } from "node:fs";
13057
+ import { readdirSync, readFileSync } from "node:fs";
13058
13058
  import { fileURLToPath } from "node:url";
13059
13059
 
13060
13060
  // node_modules/zod/v3/external.js
@@ -29527,7 +29527,15 @@ var DEFAULT_EXCLUDE_IDS = ["48621dce-c1df-4e1d-b6a4-be12f2ddcad3"];
29527
29527
  for (const id of DEFAULT_EXCLUDE_IDS) EXCLUDE_IDS.add(id);
29528
29528
  var BOOT_ID = randomUUID().slice(0, 8);
29529
29529
  var STARTED_AT = (/* @__PURE__ */ new Date()).toISOString();
29530
- var SERVER_VERSION = "0.3.2";
29530
+ var SERVER_VERSION = "0.3.3";
29531
+ function cwdPeek(limit = 8) {
29532
+ try {
29533
+ const names = readdirSync(process.cwd()).filter((n) => !n.startsWith("."));
29534
+ return names.slice(0, limit).join(",") || "(\u7A7A)";
29535
+ } catch (e) {
29536
+ return `(\u8BFB\u53D6\u5931\u8D25:${e?.code ?? e?.message ?? "unknown"})`;
29537
+ }
29538
+ }
29531
29539
  var callCount = 0;
29532
29540
  var recentCalls = [];
29533
29541
  function log(...args) {
@@ -29926,6 +29934,8 @@ function createMcpServer() {
29926
29934
  `port=${PORT}`,
29927
29935
  `pid=${process.pid}`,
29928
29936
  `started_at=${STARTED_AT}`,
29937
+ `cwd=${process.cwd()}`,
29938
+ `cwd_entries=${cwdPeek()}`,
29929
29939
  `now=${(/* @__PURE__ */ new Date()).toISOString()}`,
29930
29940
  `probe_call_count=${callCount}`,
29931
29941
  /** 版本号再挂一份到 node 行上:平台把这段文字渲染成表格时只认得几个老键,