refactor: 全面转向 CLI 驱动架构与底层 SDK,裁撤繁杂 MCP 工具并参考 seal-home 规范

This commit is contained in:
gitea committed 2026-08-27 10:56:45 +08:00
1 parent 3d549e2e2f
commit e7aa8a86cc
19 files changed
+1228 -589

No files matched your search

Executable
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bun
import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
import { runCli } from "./cli/runner.js";
process.stdout.on("error", (err: any) => {
if (err?.code === "EPIPE") process.exit(0);
});
process.stderr.on("error", (err: any) => {
if (err?.code === "EPIPE") process.exit(0);
});
const entryFile = fileURLToPath(import.meta.url);
const appRoot = dirname(dirname(entryFile));
const result = await runCli(process.argv.slice(2), {
appRoot,
entryFile,
});
try {
if (result.stdout) process.stdout.write(result.stdout);
} catch (err: any) {
if (err?.code !== "EPIPE") throw err;
}
try {
if (result.stderr) {
process.stderr.write(`${result.stderr}${result.stderr.endsWith("\n") ? "" : "\n"}`);
}
} catch (err: any) {
if (err?.code !== "EPIPE") throw err;
}
process.exitCode = result.exitCode;