engine7 7.0.6 → 7.0.8

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/dist/cli.mjs +11 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -581,10 +581,19 @@ engine7 service \u2014 \u5F00\u673A\u81EA\u542F\u52A8\u7BA1\u7406
581
581
  if (action === "install") {
582
582
  if (process.platform === "win32") {
583
583
  const taskName = "Engine7";
584
- const cmd = `"${engine7Bin}" start --config "${path.resolve(configPath2)}"`;
584
+ const nodeExe = process.execPath;
585
+ const cliMjs = path.resolve(engine7Bin);
586
+ const absConfig = path.resolve(configPath2);
587
+ const wrapperPath = path.join(cwd, "engine7-start.cmd");
588
+ const wrapperContent = `@echo off\r
589
+ cd /d "${cwd}"\r
590
+ "${nodeExe}" "${cliMjs}" start --config "${absConfig}"\r
591
+ `;
592
+ fs.writeFileSync(wrapperPath, wrapperContent);
585
593
  try {
586
- execSync(`schtasks /create /tn "${taskName}" /tr "${cmd}" /sc onlogon /rl highest /f`, { stdio: "inherit", shell: true });
594
+ execSync(`schtasks /create /tn "${taskName}" /tr "${wrapperPath}" /sc onlogon /rl highest /f`, { stdio: "inherit", shell: true });
587
595
  console.log(`\u2705 Windows \u8BA1\u5212\u4EFB\u52A1 "${taskName}" \u5DF2\u521B\u5EFA\uFF08\u5F00\u673A\u81EA\u542F\u52A8\uFF09`);
596
+ console.log(` wrapper: ${wrapperPath}`);
588
597
  } catch {
589
598
  console.error("\u274C \u521B\u5EFA\u8BA1\u5212\u4EFB\u52A1\u5931\u8D25\uFF0C\u53EF\u80FD\u9700\u8981\u7BA1\u7406\u5458\u6743\u9650");
590
599
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engine7",
3
- "version": "7.0.6",
3
+ "version": "7.0.8",
4
4
  "type": "module",
5
5
  "description": "Engine 7 — Self-hosted AI agent engine",
6
6
  "main": "dist/main.mjs",