@isarai/maestro 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # @isarai/maestro
2
+
3
+ Standalone CLI for running Maestro without Docker Compose.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -g @isarai/maestro
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ maestro start
15
+ maestro status
16
+ maestro auth
17
+ maestro stop
18
+ ```
@@ -0,0 +1,35 @@
1
+ FROM node:22-bookworm-slim
2
+
3
+ RUN apt-get update && apt-get install -y ca-certificates curl gnupg \
4
+ && install -m 0755 -d /etc/apt/keyrings \
5
+ && curl -fsSL https://download.docker.com/linux/debian/gpg \
6
+ | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
7
+ && chmod a+r /etc/apt/keyrings/docker.gpg \
8
+ && . /etc/os-release \
9
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian ${VERSION_CODENAME} stable" \
10
+ > /etc/apt/sources.list.d/docker.list \
11
+ && apt-get update && apt-get install -y \
12
+ bash \
13
+ build-essential \
14
+ bubblewrap \
15
+ docker-ce-cli \
16
+ docker-compose-plugin \
17
+ git \
18
+ python-is-python3 \
19
+ python3 \
20
+ python3-pip \
21
+ python3-venv \
22
+ ripgrep \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ RUN corepack enable pnpm
26
+ RUN npm install -g @anthropic-ai/claude-code @openai/codex
27
+
28
+ RUN mkdir -p /root/.claude \
29
+ && echo '{"hasCompletedOnboarding":true}' > /root/.claude.json
30
+
31
+ WORKDIR /workspace
32
+
33
+ ENV TERM=xterm-256color
34
+
35
+ CMD ["/bin/bash", "-l"]
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Get terminal width, default to 40
4
+ W=${COLUMNS:-$(tput cols 2>/dev/null || echo 40)}
5
+ BANNER=$(printf '%*s' "$W" '' | tr ' ' '=')
6
+
7
+ echo "$BANNER"
8
+ echo " Maestro First-Run Setup"
9
+ echo "$BANNER"
10
+ echo ""
11
+
12
+ # --- GitHub CLI ---
13
+ if command -v gh &>/dev/null; then
14
+ echo "Checking GitHub CLI authentication..."
15
+ if gh auth status >/dev/null 2>&1; then
16
+ echo "GitHub CLI is already authenticated."
17
+ else
18
+ echo "GitHub CLI is not authenticated."
19
+ echo "Running: gh auth login"
20
+ echo ""
21
+ printf '%s' "$GH_PAT" | gh auth login --with-token || echo "(gh auth login exited with error)"
22
+ fi
23
+ else
24
+ echo "GitHub CLI (gh) not found, skipping."
25
+ fi
26
+ echo ""
27
+
28
+ # --- Claude Code ---
29
+ read -rp "Do you want to use Claude Code? (y/n) " use_claude
30
+ if [[ "$use_claude" =~ ^[Yy]$ ]]; then
31
+ if command -v claude &>/dev/null; then
32
+ echo "Checking Claude Code authentication..."
33
+ if claude auth status >/dev/null 2>&1; then
34
+ echo "Claude Code is already authenticated."
35
+ else
36
+ echo ""
37
+ echo "Running: claude setup-token"
38
+ echo "Open the URL shown below in your browser, then paste the token back."
39
+ echo ""
40
+ claude setup-token || echo "(claude setup-token exited with error)"
41
+ fi
42
+ else
43
+ echo "Claude Code CLI not found, skipping."
44
+ fi
45
+ fi
46
+ echo ""
47
+
48
+ # --- Codex ---
49
+ read -rp "Do you want to use Codex? (y/n) " use_codex
50
+ if [[ "$use_codex" =~ ^[Yy]$ ]]; then
51
+ if command -v codex &>/dev/null; then
52
+ echo "Running: codex login"
53
+ echo ""
54
+ codex login --device-auth || echo "(codex login exited with error)"
55
+ else
56
+ echo "Codex CLI not found, skipping."
57
+ fi
58
+ fi
59
+ echo ""
60
+
61
+ echo "$BANNER"
62
+ echo " Setup complete!"
63
+ echo "$BANNER"
64
+ echo "__MAESTRO_SETUP_DONE__"
package/bin/maestro.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ import("../dist/index.js").catch((error) => {
4
+ console.error(error instanceof Error ? error.message : String(error));
5
+ process.exit(1);
6
+ });
package/dist/index.js ADDED
@@ -0,0 +1,219 @@
1
+ // src/index.ts
2
+ import * as fs from "node:fs";
3
+ import * as os from "node:os";
4
+ import * as path from "node:path";
5
+ import { spawn } from "node:child_process";
6
+ import { fileURLToPath } from "node:url";
7
+ var PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
8
+ var MAESTRO_DIR = path.join(os.homedir(), ".maestro");
9
+ var PID_PATH = path.join(MAESTRO_DIR, "server.pid");
10
+ var META_PATH = path.join(MAESTRO_DIR, "server-meta.json");
11
+ var LOG_PATH = path.join(MAESTRO_DIR, "server.log");
12
+ var TOKEN_PATH = path.join(MAESTRO_DIR, "api-token");
13
+ var SERVER_PATH = path.join(PACKAGE_ROOT, "dist", "server.js");
14
+ var DEFAULT_HOST = process.env.HOST || "0.0.0.0";
15
+ var DEFAULT_PORT = process.env.PORT || "4800";
16
+ function ensureMaestroDir() {
17
+ fs.mkdirSync(MAESTRO_DIR, { recursive: true });
18
+ }
19
+ function fail(message) {
20
+ console.error(message);
21
+ process.exit(1);
22
+ }
23
+ function preflight() {
24
+ if (!fs.existsSync(SERVER_PATH)) {
25
+ fail(`Maestro server bundle not found at ${SERVER_PATH}`);
26
+ }
27
+ }
28
+ function readPid() {
29
+ try {
30
+ const raw = fs.readFileSync(PID_PATH, "utf8").trim();
31
+ if (!raw) return null;
32
+ const pid = Number(raw);
33
+ return Number.isInteger(pid) && pid > 0 ? pid : null;
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+ function isProcessAlive(pid) {
39
+ try {
40
+ process.kill(pid, 0);
41
+ if (process.platform === "linux") {
42
+ try {
43
+ const stat = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
44
+ const fields = stat.trim().split(" ");
45
+ if (fields[2] === "Z") {
46
+ return false;
47
+ }
48
+ } catch {
49
+ }
50
+ }
51
+ return true;
52
+ } catch (error) {
53
+ return Boolean(
54
+ error && typeof error === "object" && "code" in error && error.code === "EPERM"
55
+ );
56
+ }
57
+ }
58
+ function readMeta() {
59
+ try {
60
+ return JSON.parse(fs.readFileSync(META_PATH, "utf8"));
61
+ } catch {
62
+ return null;
63
+ }
64
+ }
65
+ function writeMeta(meta) {
66
+ ensureMaestroDir();
67
+ fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2) + "\n", "utf8");
68
+ }
69
+ function cleanupState() {
70
+ try {
71
+ fs.unlinkSync(PID_PATH);
72
+ } catch {
73
+ }
74
+ try {
75
+ fs.unlinkSync(META_PATH);
76
+ } catch {
77
+ }
78
+ }
79
+ function displayHost(host) {
80
+ if (!host || host === "0.0.0.0" || host === "::") {
81
+ return "127.0.0.1";
82
+ }
83
+ return host;
84
+ }
85
+ function getStatus() {
86
+ const pid = readPid();
87
+ const meta = readMeta();
88
+ if (!pid) {
89
+ return { running: false, pid: null, meta };
90
+ }
91
+ if (!isProcessAlive(pid)) {
92
+ cleanupState();
93
+ return { running: false, pid: null, meta };
94
+ }
95
+ return { running: true, pid, meta };
96
+ }
97
+ function start() {
98
+ preflight();
99
+ ensureMaestroDir();
100
+ const current = getStatus();
101
+ if (current.running) {
102
+ const host = displayHost(current.meta?.host || DEFAULT_HOST);
103
+ const port = current.meta?.port || DEFAULT_PORT;
104
+ console.log(`Maestro is already running (pid ${current.pid})`);
105
+ console.log(`URL: http://${host}:${port}`);
106
+ console.log(`Log: ${LOG_PATH}`);
107
+ return;
108
+ }
109
+ const out = fs.openSync(LOG_PATH, "a");
110
+ const env = {
111
+ ...process.env,
112
+ NODE_ENV: process.env.NODE_ENV || "production",
113
+ HOST: DEFAULT_HOST,
114
+ PORT: DEFAULT_PORT,
115
+ MAESTRO_INSTALL_ROOT: PACKAGE_ROOT
116
+ };
117
+ const child = spawn(process.execPath, [SERVER_PATH], {
118
+ cwd: process.cwd(),
119
+ detached: true,
120
+ stdio: ["ignore", out, out],
121
+ env
122
+ });
123
+ child.unref();
124
+ fs.writeFileSync(PID_PATH, `${child.pid}
125
+ `, "utf8");
126
+ writeMeta({
127
+ pid: child.pid ?? 0,
128
+ host: env.HOST,
129
+ port: env.PORT,
130
+ logPath: LOG_PATH,
131
+ startedAt: (/* @__PURE__ */ new Date()).toISOString(),
132
+ cwd: process.cwd()
133
+ });
134
+ console.log(`Started Maestro (pid ${child.pid})`);
135
+ console.log(`URL: http://${displayHost(env.HOST)}:${env.PORT}`);
136
+ console.log(`Log: ${LOG_PATH}`);
137
+ }
138
+ function sleep(ms) {
139
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
140
+ }
141
+ async function stop() {
142
+ const status2 = getStatus();
143
+ if (!status2.running || !status2.pid) {
144
+ console.log("Maestro is not running");
145
+ cleanupState();
146
+ return;
147
+ }
148
+ process.kill(status2.pid, "SIGTERM");
149
+ const deadline = Date.now() + 1e4;
150
+ while (Date.now() < deadline) {
151
+ if (!isProcessAlive(status2.pid)) {
152
+ cleanupState();
153
+ console.log(`Stopped Maestro (pid ${status2.pid})`);
154
+ return;
155
+ }
156
+ await sleep(200);
157
+ }
158
+ fail(`Timed out waiting for Maestro (pid ${status2.pid}) to stop`);
159
+ }
160
+ function status() {
161
+ const current = getStatus();
162
+ if (!current.running) {
163
+ console.log("Maestro is not running");
164
+ return;
165
+ }
166
+ const host = displayHost(current.meta?.host || DEFAULT_HOST);
167
+ const port = current.meta?.port || DEFAULT_PORT;
168
+ console.log(`Maestro is running (pid ${current.pid})`);
169
+ console.log(`URL: http://${host}:${port}`);
170
+ console.log(`Log: ${LOG_PATH}`);
171
+ }
172
+ function auth() {
173
+ if (!fs.existsSync(TOKEN_PATH)) {
174
+ fail(`Maestro API token not found at ${TOKEN_PATH}. Start Maestro first.`);
175
+ }
176
+ const token = fs.readFileSync(TOKEN_PATH, "utf8").trim();
177
+ const current = getStatus();
178
+ const host = displayHost(current.meta?.host || DEFAULT_HOST);
179
+ const port = current.meta?.port || DEFAULT_PORT;
180
+ console.log(`Server URL: http://${host}:${port}`);
181
+ console.log(`API token: ${token}`);
182
+ console.log(`Token path: ${TOKEN_PATH}`);
183
+ }
184
+ function help() {
185
+ console.log("Usage: maestro <command>");
186
+ console.log("");
187
+ console.log("Commands:");
188
+ console.log(" start Start the Maestro server in the background");
189
+ console.log(" stop Stop the background Maestro server");
190
+ console.log(" status Show whether the Maestro server is running");
191
+ console.log(" auth Print the local Maestro API token");
192
+ }
193
+ async function main() {
194
+ const cmd = process.argv[2];
195
+ switch (cmd) {
196
+ case "start":
197
+ start();
198
+ break;
199
+ case "stop":
200
+ await stop();
201
+ break;
202
+ case "status":
203
+ status();
204
+ break;
205
+ case "auth":
206
+ auth();
207
+ break;
208
+ case "help":
209
+ case "--help":
210
+ case "-h":
211
+ case void 0:
212
+ help();
213
+ break;
214
+ default:
215
+ fail(`Unknown command: ${cmd}`);
216
+ }
217
+ }
218
+ void main();
219
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["import * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport { spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), \"..\");\nconst MAESTRO_DIR = path.join(os.homedir(), \".maestro\");\nconst PID_PATH = path.join(MAESTRO_DIR, \"server.pid\");\nconst META_PATH = path.join(MAESTRO_DIR, \"server-meta.json\");\nconst LOG_PATH = path.join(MAESTRO_DIR, \"server.log\");\nconst TOKEN_PATH = path.join(MAESTRO_DIR, \"api-token\");\nconst SERVER_PATH = path.join(PACKAGE_ROOT, \"dist\", \"server.js\");\nconst DEFAULT_HOST = process.env.HOST || \"0.0.0.0\";\nconst DEFAULT_PORT = process.env.PORT || \"4800\";\n\ninterface ServerMeta {\n pid: number;\n host: string;\n port: string;\n logPath: string;\n startedAt: string;\n cwd: string;\n}\n\nfunction ensureMaestroDir(): void {\n fs.mkdirSync(MAESTRO_DIR, { recursive: true });\n}\n\nfunction fail(message: string): never {\n console.error(message);\n process.exit(1);\n}\n\nfunction preflight(): void {\n if (!fs.existsSync(SERVER_PATH)) {\n fail(`Maestro server bundle not found at ${SERVER_PATH}`);\n }\n}\n\nfunction readPid(): number | null {\n try {\n const raw = fs.readFileSync(PID_PATH, \"utf8\").trim();\n if (!raw) return null;\n const pid = Number(raw);\n return Number.isInteger(pid) && pid > 0 ? pid : null;\n } catch {\n return null;\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n if (process.platform === \"linux\") {\n try {\n const stat = fs.readFileSync(`/proc/${pid}/stat`, \"utf8\");\n const fields = stat.trim().split(\" \");\n if (fields[2] === \"Z\") {\n return false;\n }\n } catch {\n // Ignore /proc read failures and fall back to kill(0).\n }\n }\n return true;\n } catch (error) {\n return Boolean(\n error &&\n typeof error === \"object\" &&\n \"code\" in error &&\n (error as NodeJS.ErrnoException).code === \"EPERM\"\n );\n }\n}\n\nfunction readMeta(): ServerMeta | null {\n try {\n return JSON.parse(fs.readFileSync(META_PATH, \"utf8\")) as ServerMeta;\n } catch {\n return null;\n }\n}\n\nfunction writeMeta(meta: ServerMeta): void {\n ensureMaestroDir();\n fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2) + \"\\n\", \"utf8\");\n}\n\nfunction cleanupState(): void {\n try {\n fs.unlinkSync(PID_PATH);\n } catch {}\n try {\n fs.unlinkSync(META_PATH);\n } catch {}\n}\n\nfunction displayHost(host: string | undefined): string {\n if (!host || host === \"0.0.0.0\" || host === \"::\") {\n return \"127.0.0.1\";\n }\n return host;\n}\n\nfunction getStatus(): { running: boolean; pid: number | null; meta: ServerMeta | null } {\n const pid = readPid();\n const meta = readMeta();\n\n if (!pid) {\n return { running: false, pid: null, meta };\n }\n\n if (!isProcessAlive(pid)) {\n cleanupState();\n return { running: false, pid: null, meta };\n }\n\n return { running: true, pid, meta };\n}\n\nfunction start(): void {\n preflight();\n ensureMaestroDir();\n\n const current = getStatus();\n if (current.running) {\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is already running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n return;\n }\n\n const out = fs.openSync(LOG_PATH, \"a\");\n const env = {\n ...process.env,\n NODE_ENV: process.env.NODE_ENV || \"production\",\n HOST: DEFAULT_HOST,\n PORT: DEFAULT_PORT,\n MAESTRO_INSTALL_ROOT: PACKAGE_ROOT,\n };\n\n const child = spawn(process.execPath, [SERVER_PATH], {\n cwd: process.cwd(),\n detached: true,\n stdio: [\"ignore\", out, out],\n env,\n });\n\n child.unref();\n\n fs.writeFileSync(PID_PATH, `${child.pid}\\n`, \"utf8\");\n writeMeta({\n pid: child.pid ?? 0,\n host: env.HOST,\n port: env.PORT,\n logPath: LOG_PATH,\n startedAt: new Date().toISOString(),\n cwd: process.cwd(),\n });\n\n console.log(`Started Maestro (pid ${child.pid})`);\n console.log(`URL: http://${displayHost(env.HOST)}:${env.PORT}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function stop(): Promise<void> {\n const status = getStatus();\n if (!status.running || !status.pid) {\n console.log(\"Maestro is not running\");\n cleanupState();\n return;\n }\n\n process.kill(status.pid, \"SIGTERM\");\n\n const deadline = Date.now() + 10_000;\n while (Date.now() < deadline) {\n if (!isProcessAlive(status.pid)) {\n cleanupState();\n console.log(`Stopped Maestro (pid ${status.pid})`);\n return;\n }\n await sleep(200);\n }\n\n fail(`Timed out waiting for Maestro (pid ${status.pid}) to stop`);\n}\n\nfunction status(): void {\n const current = getStatus();\n if (!current.running) {\n console.log(\"Maestro is not running\");\n return;\n }\n\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction auth(): void {\n if (!fs.existsSync(TOKEN_PATH)) {\n fail(`Maestro API token not found at ${TOKEN_PATH}. Start Maestro first.`);\n }\n\n const token = fs.readFileSync(TOKEN_PATH, \"utf8\").trim();\n const current = getStatus();\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n\n console.log(`Server URL: http://${host}:${port}`);\n console.log(`API token: ${token}`);\n console.log(`Token path: ${TOKEN_PATH}`);\n}\n\nfunction help(): void {\n console.log(\"Usage: maestro <command>\");\n console.log(\"\");\n console.log(\"Commands:\");\n console.log(\" start Start the Maestro server in the background\");\n console.log(\" stop Stop the background Maestro server\");\n console.log(\" status Show whether the Maestro server is running\");\n console.log(\" auth Print the local Maestro API token\");\n}\n\nasync function main(): Promise<void> {\n const cmd = process.argv[2];\n\n switch (cmd) {\n case \"start\":\n start();\n break;\n case \"stop\":\n await stop();\n break;\n case \"status\":\n status();\n break;\n case \"auth\":\n auth();\n break;\n case \"help\":\n case \"--help\":\n case \"-h\":\n case undefined:\n help();\n break;\n default:\n fail(`Unknown command: ${cmd}`);\n }\n}\n\nvoid main();\n"],
5
+ "mappings": ";AAAA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,IAAM,eAAoB,aAAa,aAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,IAAI;AACpF,IAAM,cAAmB,UAAQ,WAAQ,GAAG,UAAU;AACtD,IAAM,WAAgB,UAAK,aAAa,YAAY;AACpD,IAAM,YAAiB,UAAK,aAAa,kBAAkB;AAC3D,IAAM,WAAgB,UAAK,aAAa,YAAY;AACpD,IAAM,aAAkB,UAAK,aAAa,WAAW;AACrD,IAAM,cAAmB,UAAK,cAAc,QAAQ,WAAW;AAC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