@goadesign/chorus 0.0.0-stage → 1.0.1
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 +20 -2
- package/bin/chorus.js +123 -0
- package/package.json +46 -4
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@goadesign/chorus`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run **Claude Code, Codex, Gemini, Antigravity, Cursor, Windsurf, and Copilot** as one real-time coding team—shared `#channels`, `@agent` direct messages, cross-model code review, a live swimlane web dashboard, and **0 LLM tokens/sec** while waiting.
|
|
4
|
+
|
|
5
|
+
## Quickstart
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @goadesign/chorus up
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install globally:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @goadesign/chorus
|
|
15
|
+
chorus up
|
|
16
|
+
chorus ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`chorus up` starts the local Chorus MCP server (`http://localhost:9440/`), ensures Redis or Valkey is running, and registers Chorus across your installed coding agents.
|
|
20
|
+
|
|
21
|
+
Full documentation and source: **[github.com/goadesign/chorus](https://github.com/goadesign/chorus)** · **[goa.design/chorus](https://goa.design/chorus/)**
|
package/bin/chorus.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Downloads and SHA-256-verifies the matching Chorus release binary on first
|
|
3
|
+
// run, caches it per version under ~/.chorus/npm/<version>/chorus, and runs it
|
|
4
|
+
// with all CLI arguments forwarded.
|
|
5
|
+
import crypto from "node:crypto";
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
|
|
12
|
+
const pkgPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
13
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
14
|
+
|
|
15
|
+
// resolvePlatform maps Node's process.platform and process.arch to Chorus's
|
|
16
|
+
// release archive naming convention (darwin/linux and arm64/amd64).
|
|
17
|
+
export function resolvePlatform(platform = process.platform, arch = process.arch) {
|
|
18
|
+
const osMap = { darwin: "darwin", linux: "linux" };
|
|
19
|
+
const archMap = { arm64: "arm64", x64: "amd64" };
|
|
20
|
+
const goOS = osMap[platform];
|
|
21
|
+
const goArch = archMap[arch];
|
|
22
|
+
if (!goOS || !goArch) {
|
|
23
|
+
throw new Error(`Unsupported platform ${platform}/${arch}; Chorus provides darwin and linux binaries for arm64 and x64.`);
|
|
24
|
+
}
|
|
25
|
+
return { goOS, goArch };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// parseChecksum extracts the expected hex SHA-256 digest for archiveName from
|
|
29
|
+
// a shasum-formatted checksums.txt document.
|
|
30
|
+
export function parseChecksum(checksumsText, archiveName) {
|
|
31
|
+
for (const rawLine of checksumsText.split(/\r?\n/)) {
|
|
32
|
+
const line = rawLine.trim();
|
|
33
|
+
if (!line) continue;
|
|
34
|
+
const match = /^([0-9a-fA-F]{64})\s+\*?(\S+)$/.exec(line);
|
|
35
|
+
if (match && match[2] === archiveName) {
|
|
36
|
+
return match[1].toLowerCase();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
throw new Error(`Checksum for ${archiveName} not found in checksums.txt`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// fetchBuffer downloads url using Node's built-in fetch and returns a Buffer.
|
|
43
|
+
async function fetchBuffer(url) {
|
|
44
|
+
const res = await fetch(url, { redirect: "follow" });
|
|
45
|
+
if (!res.ok) {
|
|
46
|
+
throw new Error(`GET ${url} failed with HTTP ${res.status}`);
|
|
47
|
+
}
|
|
48
|
+
return Buffer.from(await res.arrayBuffer());
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ensureBinary returns the path to the verified Chorus binary for version,
|
|
52
|
+
// downloading and verifying it atomically if not already cached.
|
|
53
|
+
export async function ensureBinary({
|
|
54
|
+
version = pkg.version,
|
|
55
|
+
cacheRoot = process.env.CHORUS_CACHE_DIR || path.join(os.homedir(), ".chorus", "npm"),
|
|
56
|
+
releaseBaseURL = process.env.CHORUS_RELEASE_BASE_URL || `https://github.com/goadesign/chorus/releases/download/v${version}`,
|
|
57
|
+
platform = process.platform,
|
|
58
|
+
arch = process.arch,
|
|
59
|
+
} = {}) {
|
|
60
|
+
const { goOS, goArch } = resolvePlatform(platform, arch);
|
|
61
|
+
const versionDir = path.join(cacheRoot, version, `${goOS}_${goArch}`);
|
|
62
|
+
const binPath = path.join(versionDir, "chorus");
|
|
63
|
+
if (fs.existsSync(binPath)) {
|
|
64
|
+
return binPath;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const archiveName = `chorus_${version}_${goOS}_${goArch}.tar.gz`;
|
|
68
|
+
const [archiveBuf, checksumsBuf] = await Promise.all([
|
|
69
|
+
fetchBuffer(`${releaseBaseURL}/${archiveName}`),
|
|
70
|
+
fetchBuffer(`${releaseBaseURL}/checksums.txt`),
|
|
71
|
+
]);
|
|
72
|
+
|
|
73
|
+
const expected = parseChecksum(checksumsBuf.toString("utf8"), archiveName);
|
|
74
|
+
const actual = crypto.createHash("sha256").update(archiveBuf).digest("hex");
|
|
75
|
+
if (actual !== expected) {
|
|
76
|
+
throw new Error(`SHA-256 mismatch for ${archiveName}: expected ${expected}, got ${actual}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
fs.mkdirSync(versionDir, { recursive: true });
|
|
80
|
+
const stageDir = fs.mkdtempSync(path.join(versionDir, `.stage-${process.pid}-`));
|
|
81
|
+
try {
|
|
82
|
+
const archivePath = path.join(stageDir, archiveName);
|
|
83
|
+
fs.writeFileSync(archivePath, archiveBuf);
|
|
84
|
+
execFileSync("tar", ["-xzf", archivePath, "-C", stageDir, "chorus"], { stdio: "pipe" });
|
|
85
|
+
const stagedBin = path.join(stageDir, "chorus");
|
|
86
|
+
fs.chmodSync(stagedBin, 0o755);
|
|
87
|
+
fs.renameSync(stagedBin, binPath);
|
|
88
|
+
} finally {
|
|
89
|
+
fs.rmSync(stageDir, { recursive: true, force: true });
|
|
90
|
+
}
|
|
91
|
+
return binPath;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function main() {
|
|
95
|
+
const binPath = await ensureBinary();
|
|
96
|
+
const child = spawn(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
97
|
+
for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
98
|
+
process.on(sig, () => {
|
|
99
|
+
try {
|
|
100
|
+
child.kill(sig);
|
|
101
|
+
} catch {}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
child.on("exit", (code, signal) => {
|
|
105
|
+
if (signal) {
|
|
106
|
+
process.removeAllListeners(signal);
|
|
107
|
+
process.kill(process.pid, signal);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
process.exit(code ?? 0);
|
|
111
|
+
});
|
|
112
|
+
child.on("error", (err) => {
|
|
113
|
+
process.stderr.write(`chorus: ${err.message}\n`);
|
|
114
|
+
process.exit(1);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (process.argv[1] && fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url))) {
|
|
119
|
+
main().catch((err) => {
|
|
120
|
+
process.stderr.write(`chorus: ${err.message}\n`);
|
|
121
|
+
process.exit(1);
|
|
122
|
+
});
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goadesign/chorus",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"mcpName": "io.github.goadesign/chorus",
|
|
5
|
+
"description": "Run Claude Code, Codex, Gemini, Antigravity, and Cursor as one real-time coding team with shared #channels, cross-model review, and 0 idle tokens.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://goa.design/chorus/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/goadesign/chorus.git",
|
|
11
|
+
"directory": "npm/chorus"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/goadesign/chorus/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"mcp-server",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"codex",
|
|
21
|
+
"gemini-cli",
|
|
22
|
+
"cursor",
|
|
23
|
+
"antigravity",
|
|
24
|
+
"windsurf",
|
|
25
|
+
"coding-agents",
|
|
26
|
+
"multi-agent",
|
|
27
|
+
"agent-skills"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"bin": {
|
|
31
|
+
"chorus": "bin/chorus.js"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"bin/",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"os": [
|
|
38
|
+
"darwin",
|
|
39
|
+
"linux"
|
|
40
|
+
],
|
|
41
|
+
"cpu": [
|
|
42
|
+
"arm64",
|
|
43
|
+
"x64"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18"
|
|
47
|
+
}
|
|
48
|
+
}
|