Initial commit: sage:TypeScript AI Agent 框架 monorepo(llm / memory / tui 三包)

This commit is contained in:
WpyQwq
2026-09-19 12:10:51 +08:00
commit eb29eb3fa1
47 changed files with 4429 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env node
import { fileURLToPath, pathToFileURL } from "url"
import { join, dirname } from "path"
import { spawnSync } from "child_process"
const __dir = dirname(fileURLToPath(import.meta.url))
const tuiEntry = join(__dir, "packages", "tui", "src", "index.tsx")
const tsxLoader = join(__dir, "node_modules", "tsx", "dist", "esm", "index.cjs")
const loaderUrl = pathToFileURL(tsxLoader).href
const result = spawnSync(
process.execPath,
[`--import=${loaderUrl}`, tuiEntry, ...process.argv.slice(2)],
{ stdio: "inherit", env: { ...process.env }, cwd: process.cwd() }
)
process.exit(result.status ?? 0)