Files
dingtalk-workspace-cli/internal
修雨 8bcbceb971 perf(plugin): serve plugin MCP tool list from disk cache on startup
Follow-up to the 4s startup cap (df01f36). Plugin command registration
now reads the tools snapshot directly from the cache store on the hot
path, and only falls through to an Initialize+ListTools RPC when no
snapshot exists.

- registerHTTPServer / registerStdioServer try cache.LoadTools first;
  on hit they build Cobra commands synchronously with zero network I/O.
- Cold cache falls back to the existing synchronous discovery (already
  bounded at 2-4s) and persists the outcome — including empty tool
  lists — as a negative cache so the next invocation is fast regardless
  of endpoint health.
- Cache entries are namespaced under "plugin:<name>:<server>" so they
  are distinct from Market cache entries in `dws cache status`, and
  refresh on-demand via `dws cache clean` / `dws cache refresh`; the
  existing 7d ToolsTTL otherwise expires entries naturally.

Warm-cache `dws --help` with three user plugins (one unreachable) now
returns in ~80ms versus 3.7s with synchronous discovery, a >40x win
when endpoints are offline.
2026-04-18 00:47:20 +08:00
..
2026-03-28 17:51:22 +08:00
2026-03-27 17:55:57 +08:00
2026-04-12 11:26:04 +08:00
2026-03-27 17:55:57 +08:00
2026-04-03 20:01:05 +08:00
2026-03-27 17:55:57 +08:00
2026-03-28 17:51:22 +08:00
2026-04-09 11:01:59 +08:00
2026-03-27 17:55:57 +08:00
2026-03-27 17:55:57 +08:00