feat(sproutclaw): modularize webui, extensions, and agent config layout
Some checks failed
CI / build-check-test (push) Has been cancelled
Some checks failed
CI / build-check-test (push) Has been cancelled
Restructure local extensions into per-feature directories, split WebUI into backend modules with slash commands and systemd support, and track prompts/skills under .pi/agent for portable Gitea deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
9
.pi/agent/extensions/webui/backend/config/cli.ts
Normal file
9
.pi/agent/extensions/webui/backend/config/cli.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function parsePort(argv: string[] = process.argv.slice(2)): number {
|
||||
const idx = argv.indexOf("--port");
|
||||
const raw = idx !== -1 ? argv[idx + 1] : "19133";
|
||||
const port = parseInt(raw || "19133", 10);
|
||||
if (!Number.isFinite(port) || port < 1 || port > 65535) {
|
||||
throw new Error(`无效端口: ${raw}`);
|
||||
}
|
||||
return port;
|
||||
}
|
||||
Reference in New Issue
Block a user