bernstein-orchestrator 1.4.11

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.
Files changed (4) hide show
  1. package/README.md +33 -0
  2. package/index.js +45 -0
  3. package/install.js +59 -0
  4. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # bernstein-orchestrator
2
+
3
+ Declarative agent orchestration for engineering teams.
4
+
5
+ Orchestrate multiple AI coding agents (Claude Code, Codex, Gemini CLI, Cursor)
6
+ in parallel. One YAML config, deterministic scheduling, verified output.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install -g bernstein-orchestrator
12
+ ```
13
+
14
+ Requires Python 3.12+. The wrapper delegates to the
15
+ [bernstein PyPI package](https://pypi.org/project/bernstein/).
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ bernstein run plans/my-project.yaml
21
+ bernstein status
22
+ bernstein agents
23
+ ```
24
+
25
+ ## Links
26
+
27
+ - [GitHub](https://github.com/chernistry/bernstein)
28
+ - [PyPI](https://pypi.org/project/bernstein/)
29
+ - [Documentation](https://github.com/chernistry/bernstein#readme)
30
+
31
+ ## License
32
+
33
+ Apache-2.0
package/index.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execFileSync, execSync } = require("child_process");
5
+ const args = process.argv.slice(2);
6
+
7
+ function which(cmd) {
8
+ try {
9
+ return execSync(`command -v ${cmd}`, { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
10
+ } catch {
11
+ return null;
12
+ }
13
+ }
14
+
15
+ function run(cmd, cmdArgs) {
16
+ try {
17
+ execFileSync(cmd, cmdArgs, { stdio: "inherit" });
18
+ process.exit(0);
19
+ } catch (err) {
20
+ process.exit(err.status || 1);
21
+ }
22
+ }
23
+
24
+ // Strategy 1: pipx run (isolated, no global install conflict)
25
+ if (which("pipx")) {
26
+ run("pipx", ["run", "bernstein", ...args]);
27
+ }
28
+
29
+ // Strategy 2: uvx (fast, uv-based)
30
+ if (which("uvx")) {
31
+ run("uvx", ["bernstein", ...args]);
32
+ }
33
+
34
+ // Strategy 3: direct python -m invocation (if already pip-installed)
35
+ const python = which("python3") || which("python");
36
+ if (python) {
37
+ run(python, ["-m", "bernstein", ...args]);
38
+ }
39
+
40
+ console.error(
41
+ "Error: bernstein requires Python 3.12+.\n" +
42
+ "Install Python from https://www.python.org/ then run:\n" +
43
+ " pip install bernstein"
44
+ );
45
+ process.exit(1);
package/install.js ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execSync } = require("child_process");
5
+
6
+ function which(cmd) {
7
+ try {
8
+ return execSync(`command -v ${cmd}`, { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
9
+ } catch {
10
+ return null;
11
+ }
12
+ }
13
+
14
+ function checkPythonVersion() {
15
+ const python = which("python3") || which("python");
16
+ if (!python) return false;
17
+ try {
18
+ const version = execSync(`${python} -c "import sys; print(sys.version_info[:2])"`, {
19
+ encoding: "utf8",
20
+ stdio: ["pipe", "pipe", "ignore"],
21
+ }).trim();
22
+ // version looks like "(3, 12)"
23
+ const match = version.match(/\((\d+),\s*(\d+)\)/);
24
+ if (match) {
25
+ const [, major, minor] = match.map(Number);
26
+ return major >= 3 && minor >= 12;
27
+ }
28
+ } catch {}
29
+ return false;
30
+ }
31
+
32
+ const hasPipx = !!which("pipx");
33
+ const hasUvx = !!which("uvx");
34
+ const hasPython = checkPythonVersion();
35
+
36
+ if (!hasPython) {
37
+ console.warn(
38
+ "\n" +
39
+ " WARNING: bernstein requires Python >= 3.12\n" +
40
+ " Install Python from https://www.python.org/\n"
41
+ );
42
+ process.exit(0); // don't fail npm install
43
+ }
44
+
45
+ if (!hasPipx && !hasUvx) {
46
+ console.warn(
47
+ "\n" +
48
+ " TIP: Install pipx for best experience:\n" +
49
+ " python3 -m pip install --user pipx\n" +
50
+ " pipx ensurepath\n" +
51
+ "\n" +
52
+ " Alternatively, install uv: https://docs.astral.sh/uv/\n" +
53
+ "\n" +
54
+ " Without pipx/uvx, bernstein will fall back to python -m bernstein\n" +
55
+ " (requires: pip install bernstein)\n"
56
+ );
57
+ }
58
+
59
+ console.log("bernstein-orchestrator: Python runtime check passed.");
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "bernstein-orchestrator",
3
+ "version": "1.4.11",
4
+ "description": "Declarative agent orchestration for engineering teams (Python wrapper)",
5
+ "keywords": [
6
+ "ai",
7
+ "agents",
8
+ "orchestration",
9
+ "multi-agent",
10
+ "coding",
11
+ "cli"
12
+ ],
13
+ "license": "Apache-2.0",
14
+ "author": "Alex Chernysh <alex@alexchernysh.com>",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/alexchernysh/bernstein.git"
18
+ },
19
+ "homepage": "https://pypi.org/project/bernstein/",
20
+ "bin": {
21
+ "bernstein": "index.js"
22
+ },
23
+ "scripts": {
24
+ "postinstall": "node install.js"
25
+ },
26
+ "engines": {
27
+ "node": ">=16"
28
+ },
29
+ "os": [
30
+ "darwin",
31
+ "linux",
32
+ "win32"
33
+ ],
34
+ "files": [
35
+ "index.js",
36
+ "install.js",
37
+ "README.md"
38
+ ]
39
+ }