@taptap/maker 0.0.16 → 0.0.17-beta.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
@@ -26,4 +26,4 @@ This package contains only the Maker CLI/MCP bundle and Maker workflow skills.
26
26
  It does not include the legacy TapTap Open API MCP server, proxy, native signer,
27
27
  or OpenClaw plugin package contents.
28
28
 
29
- Version: 0.0.16
29
+ Version: 0.0.17-beta.1
package/dist/maker.js CHANGED
@@ -31620,6 +31620,7 @@ import path8 from "node:path";
31620
31620
  var LUA_LSP_PACKAGE = "maker-lua-lsp";
31621
31621
  var LUA_LSP_IDES = "codex,cursor,claude";
31622
31622
  var LUA_LSP_SETUP_TIMEOUT_MS = 12e4;
31623
+ var LUA_LSP_PROBE_TIMEOUT_MS = 5e3;
31623
31624
  var PYTHON_SCRIPTS_DIR_SCRIPT = [
31624
31625
  "import sysconfig",
31625
31626
  'print(sysconfig.get_path("scripts") or "")'
@@ -31627,6 +31628,9 @@ var PYTHON_SCRIPTS_DIR_SCRIPT = [
31627
31628
  function getMakerLuaLspConfigPath() {
31628
31629
  return path8.join(getMakerHome(), "lua-lsp.json");
31629
31630
  }
31631
+ function getMakerLuaLspVenvDir() {
31632
+ return path8.join(getMakerHome(), "lua-lsp-venv");
31633
+ }
31630
31634
  function checkMakerLuaLspEnvironment(options = {}) {
31631
31635
  const runner = options.spawn || spawnSync5;
31632
31636
  const python = options.pythonEnvironment || checkMakerPythonEnvironment(options);
@@ -31642,6 +31646,23 @@ function checkMakerLuaLspEnvironment(options = {}) {
31642
31646
  nextAction: "本地 Lua 诊断需要 Python 环境。请先运行 `taptap-maker python setup`,它会继续准备 maker-lua-lsp。"
31643
31647
  };
31644
31648
  }
31649
+ const saved = loadLuaLspRuntimeConfig();
31650
+ if (saved == null ? void 0 : saved.command) {
31651
+ const version3 = readLuaLspVersion(saved.command, runner);
31652
+ if (version3) {
31653
+ return {
31654
+ ...base,
31655
+ ready: true,
31656
+ status: "ready",
31657
+ command: saved.command,
31658
+ version: version3,
31659
+ python: saved.python || python.python,
31660
+ scriptsDir: path8.dirname(saved.command),
31661
+ missing: [],
31662
+ nextAction: "maker-lua-lsp 已安装;本地 Lua 诊断可用。"
31663
+ };
31664
+ }
31665
+ }
31645
31666
  const resolved = resolveLuaLspCommand(python, platform, runner);
31646
31667
  const command = resolved.command || LUA_LSP_PACKAGE;
31647
31668
  const version2 = readLuaLspVersion(command, runner);
@@ -31658,7 +31679,6 @@ function checkMakerLuaLspEnvironment(options = {}) {
31658
31679
  nextAction: "maker-lua-lsp 已安装;本地 Lua 诊断可用。"
31659
31680
  };
31660
31681
  }
31661
- const saved = loadLuaLspRuntimeConfig();
31662
31682
  if ((saved == null ? void 0 : saved.status) === "setup_failed") {
31663
31683
  return {
31664
31684
  ...base,
@@ -31700,7 +31720,20 @@ function setupMakerLuaLspEnvironment(options = {}) {
31700
31720
  saveLuaLspRuntimeConfig(environment2);
31701
31721
  return { changed: false, environment: environment2, python };
31702
31722
  }
31703
- const pipInstall = runner(python.python, ["-m", "pip", "install", "--upgrade", LUA_LSP_PACKAGE], {
31723
+ const venv = ensureLuaLspVenv(python, platform, runner);
31724
+ if (venv.result && venv.result.status !== 0) {
31725
+ const environment2 = formatLuaLspSetupFailure(
31726
+ platform,
31727
+ python,
31728
+ "maker-lua-lsp venv creation failed",
31729
+ venv.result,
31730
+ venv.command,
31731
+ venv.scriptsDir
31732
+ );
31733
+ saveLuaLspRuntimeConfig(environment2);
31734
+ return { changed: false, environment: environment2, python };
31735
+ }
31736
+ const pipInstall = runner(venv.python, ["-m", "pip", "install", "--upgrade", LUA_LSP_PACKAGE], {
31704
31737
  encoding: "utf8",
31705
31738
  timeout: LUA_LSP_SETUP_TIMEOUT_MS
31706
31739
  });
@@ -31709,13 +31742,23 @@ function setupMakerLuaLspEnvironment(options = {}) {
31709
31742
  platform,
31710
31743
  python,
31711
31744
  "maker-lua-lsp pip install failed",
31712
- pipInstall
31745
+ pipInstall,
31746
+ venv.command,
31747
+ venv.scriptsDir
31713
31748
  );
31714
31749
  saveLuaLspRuntimeConfig(environment2);
31715
31750
  return { changed: false, environment: environment2, python };
31716
31751
  }
31717
- const resolved = resolveLuaLspCommand(python, platform, runner);
31718
- const command = resolved.command || LUA_LSP_PACKAGE;
31752
+ const resolved = resolveLuaLspCommand(
31753
+ {
31754
+ ...python,
31755
+ python: venv.python
31756
+ },
31757
+ platform,
31758
+ runner
31759
+ );
31760
+ const command = resolved.command || venv.command;
31761
+ const scriptsDir = resolved.scriptsDir || venv.scriptsDir;
31719
31762
  const ideInstall = runner(command, ["install", "--ide", LUA_LSP_IDES], {
31720
31763
  encoding: "utf8",
31721
31764
  timeout: LUA_LSP_SETUP_TIMEOUT_MS
@@ -31727,7 +31770,7 @@ function setupMakerLuaLspEnvironment(options = {}) {
31727
31770
  "maker-lua-lsp IDE install failed",
31728
31771
  ideInstall,
31729
31772
  command,
31730
- resolved.scriptsDir
31773
+ scriptsDir
31731
31774
  );
31732
31775
  saveLuaLspRuntimeConfig(environment2);
31733
31776
  return { changed: false, environment: environment2, python };
@@ -31739,7 +31782,7 @@ function setupMakerLuaLspEnvironment(options = {}) {
31739
31782
  command,
31740
31783
  version: readLuaLspVersion(command, runner),
31741
31784
  python: python.python,
31742
- scriptsDir: resolved.scriptsDir,
31785
+ scriptsDir,
31743
31786
  missing: [],
31744
31787
  nextAction: "maker-lua-lsp 已安装并完成 Codex/Cursor/Claude 配置。"
31745
31788
  };
@@ -31790,6 +31833,10 @@ function createLuaLspBase(platform) {
31790
31833
  };
31791
31834
  }
31792
31835
  function resolveLuaLspCommand(python, platform, runner) {
31836
+ const venvCommand = getLuaLspVenvCommand(platform);
31837
+ if (fs7.existsSync(venvCommand)) {
31838
+ return { command: venvCommand, scriptsDir: path8.dirname(venvCommand) };
31839
+ }
31793
31840
  const scriptsDir = readPythonScriptsDir(python.python, runner);
31794
31841
  if (scriptsDir) {
31795
31842
  const command = path8.join(
@@ -31803,6 +31850,44 @@ function resolveLuaLspCommand(python, platform, runner) {
31803
31850
  }
31804
31851
  return {};
31805
31852
  }
31853
+ function ensureLuaLspVenv(python, platform, runner) {
31854
+ const venvDir = getMakerLuaLspVenvDir();
31855
+ const venvPython = getLuaLspVenvPython(platform);
31856
+ const scriptsDir = getLuaLspVenvScriptsDir(platform);
31857
+ const command = getLuaLspVenvCommand(platform);
31858
+ if (!isLuaLspVenvComplete(platform)) {
31859
+ const result = runner(python.python || "", ["-m", "venv", venvDir], {
31860
+ encoding: "utf8",
31861
+ timeout: LUA_LSP_SETUP_TIMEOUT_MS
31862
+ });
31863
+ if (result.status !== 0) {
31864
+ return { python: venvPython, scriptsDir, command, result };
31865
+ }
31866
+ }
31867
+ return { python: venvPython, scriptsDir, command };
31868
+ }
31869
+ function isLuaLspVenvComplete(platform) {
31870
+ return fs7.existsSync(getLuaLspVenvPython(platform)) && fs7.existsSync(getLuaLspVenvConfigPath());
31871
+ }
31872
+ function getLuaLspVenvConfigPath() {
31873
+ return path8.join(getMakerLuaLspVenvDir(), "pyvenv.cfg");
31874
+ }
31875
+ function getLuaLspVenvPython(platform) {
31876
+ return path8.join(
31877
+ getMakerLuaLspVenvDir(),
31878
+ platform === "win32" ? "Scripts" : "bin",
31879
+ platform === "win32" ? "python.exe" : "python"
31880
+ );
31881
+ }
31882
+ function getLuaLspVenvScriptsDir(platform) {
31883
+ return path8.join(getMakerLuaLspVenvDir(), platform === "win32" ? "Scripts" : "bin");
31884
+ }
31885
+ function getLuaLspVenvCommand(platform) {
31886
+ return path8.join(
31887
+ getLuaLspVenvScriptsDir(platform),
31888
+ platform === "win32" ? "maker-lua-lsp.exe" : "maker-lua-lsp"
31889
+ );
31890
+ }
31806
31891
  function readPythonScriptsDir(python, runner) {
31807
31892
  if (!python) {
31808
31893
  return void 0;
@@ -31811,8 +31896,18 @@ function readPythonScriptsDir(python, runner) {
31811
31896
  return result.status === 0 ? result.stdout.trim().split(/\r?\n/)[0] || void 0 : void 0;
31812
31897
  }
31813
31898
  function readLuaLspVersion(command, runner) {
31814
- const result = runner(command, ["--version"], { encoding: "utf8" });
31815
- return result.status === 0 ? result.stdout.trim() || "installed" : void 0;
31899
+ const result = runner(command, ["--version"], {
31900
+ encoding: "utf8",
31901
+ timeout: LUA_LSP_PROBE_TIMEOUT_MS
31902
+ });
31903
+ if (result.status === 0) {
31904
+ return result.stdout.trim() || "installed";
31905
+ }
31906
+ const help = runner(command, ["--help"], {
31907
+ encoding: "utf8",
31908
+ timeout: LUA_LSP_PROBE_TIMEOUT_MS
31909
+ });
31910
+ return help.status === 0 ? "installed" : void 0;
31816
31911
  }
31817
31912
  function formatLuaLspSetupFailure(platform, python, message, result, command, scriptsDir) {
31818
31913
  var _a3, _b, _c;
@@ -32774,7 +32869,7 @@ function extensionFromUrl(url2) {
32774
32869
  }
32775
32870
 
32776
32871
  // src/maker/server/mcp.ts
32777
- var VERSION = true ? "0.0.16" : "dev";
32872
+ var VERSION = true ? "0.0.17-beta.1" : "dev";
32778
32873
  var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
32779
32874
  var DEFAULT_PROXY_RETRY_ATTEMPTS = 5;
32780
32875
  var DEFAULT_PROXY_RETRY_DELAY_MS = 30 * 1e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/maker",
3
- "version": "0.0.16",
3
+ "version": "0.0.17-beta.1",
4
4
  "type": "module",
5
5
  "description": "TapTap Maker local development CLI and MCP server",
6
6
  "main": "dist/maker.js",
@@ -183,7 +183,8 @@ Workflow:
183
183
  4. Python plus `maker-lua-lsp` is the local Lua diagnostics prerequisite for Maker local
184
184
  development. `taptap-maker init` checks Python before PAT, app list, clone, and MCP config
185
185
  installation. If Python is not ready, init tries `taptap-maker python setup` up to 3 total
186
- attempts. After Python is ready, setup best-effort installs/upgrades `maker-lua-lsp` and runs
186
+ attempts. After Python is ready, setup best-effort creates a Maker private LSP venv,
187
+ installs/upgrades `maker-lua-lsp` there, and runs
187
188
  `maker-lua-lsp install --ide codex,cursor,claude`; LSP failure should be reported but must not
188
189
  block remote build. If Python setup still fails, explain that init has paused before
189
190
  login/project clone/MCP config, then guide the user to retry `taptap-maker python setup` with