feat: integrate Pi backend and Pi Web

This commit is contained in:
luckyyzh
2026-07-30 19:37:53 +08:00
commit 7392ab9dd7
1390 changed files with 337197 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { getAgentDir } from "@earendil-works/pi-coding-agent";
import {
getManagedRuntimePaths,
isManagedRuntime,
} from "@/lib/app-runtime";
export const dynamic = "force-dynamic";
export async function GET() {
if (!isManagedRuntime()) {
return Response.json({ managed: false, agentDir: getAgentDir() });
}
const paths = getManagedRuntimePaths();
return Response.json({
managed: true,
appRoot: paths.appRoot,
dataDir: paths.dataDir,
agentDir: paths.agentDir,
resourcesDir: paths.resourcesDir,
skillRoots: paths.managedSkillRoots,
});
}