smol-symphony 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/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "smol-symphony",
3
+ "version": "0.1.0",
4
+ "description": "Long-running orchestrator that dispatches coding agents (Claude, Codex, OpenCode) into per-issue smolvm microVMs over ACP, with MCP-driven completion and a live HTMX dashboard.",
5
+ "keywords": [
6
+ "orchestrator",
7
+ "agent",
8
+ "acp",
9
+ "mcp",
10
+ "smolvm",
11
+ "claude",
12
+ "codex",
13
+ "opencode",
14
+ "issue-tracker"
15
+ ],
16
+ "type": "module",
17
+ "license": "MIT",
18
+ "author": "Didrik A. Rognstad <didrik.rognstad@gmail.com>",
19
+ "homepage": "https://github.com/dizk/smol-symphony#readme",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/dizk/smol-symphony.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/dizk/smol-symphony/issues"
26
+ },
27
+ "bin": {
28
+ "symphony": "dist/bin/symphony.js"
29
+ },
30
+ "files": [
31
+ "dist/",
32
+ "WORKFLOW.md",
33
+ "WORKFLOW.template.md",
34
+ "AGENTS.md",
35
+ "SPEC.md",
36
+ "PRODUCT.md",
37
+ "DESIGN.md",
38
+ "scripts/build-vm.sh",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc",
44
+ "start": "tsx src/bin/symphony.ts",
45
+ "dev": "tsx watch src/bin/symphony.ts",
46
+ "typecheck": "tsc --noEmit",
47
+ "test": "node --test --import tsx tests/*.test.ts",
48
+ "prepublishOnly": "npm run typecheck && npm test && npm run build"
49
+ },
50
+ "dependencies": {
51
+ "@agentclientprotocol/sdk": "^0.22.1",
52
+ "chokidar": "^4.0.3",
53
+ "liquidjs": "^10.21.1",
54
+ "yaml": "^2.6.1"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^22.10.5",
58
+ "tsx": "^4.19.2",
59
+ "typescript": "^5.7.3"
60
+ },
61
+ "engines": {
62
+ "node": ">=20"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public",
66
+ "provenance": true
67
+ }
68
+ }
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+ # Build the per-issue smolvm VM image used by symphony.
3
+ #
4
+ # Result: ./.vm/symphony.smolmachine + .smolmachine asset bundle.
5
+ # Inside: node:20-bookworm-slim + git/ripgrep + the three ACP-capable coding agents:
6
+ # * codex (musl + glibc) and @zed-industries/codex-acp (glibc-only prebuilt)
7
+ # * claude-agent-acp (pure JS adapter for Claude Code)
8
+ # * opencode-ai (ships an ACP server: `opencode acp`)
9
+ #
10
+ # We use a debian (glibc) base so the glibc-linked codex-acp prebuilt works. Alpine almost
11
+ # works but its musl loader rejects codex-acp's prebuilt binary.
12
+
13
+ set -euo pipefail
14
+
15
+ VM_NAME="${VM_NAME:-symphony-template}"
16
+ OUT_DIR="${OUT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/.vm}"
17
+ OUT_FILE="${OUT_FILE:-$OUT_DIR/symphony.smolmachine}"
18
+ CPUS="${CPUS:-2}"
19
+ MEM_MIB="${MEM_MIB:-4096}"
20
+ BASE_IMAGE="${BASE_IMAGE:-node:20-bookworm-slim}"
21
+
22
+ mkdir -p "$OUT_DIR"
23
+
24
+ log() { printf '\033[1;36m[build-vm]\033[0m %s\n' "$*" >&2; }
25
+
26
+ log "removing any previous template VM '$VM_NAME'"
27
+ if smolvm machine ls --json 2>/dev/null | grep -q "\"name\":\"$VM_NAME\""; then
28
+ smolvm machine stop --name "$VM_NAME" >/dev/null 2>&1 || true
29
+ smolvm machine delete "$VM_NAME" -f >/dev/null
30
+ fi
31
+
32
+ log "creating template VM (base=$BASE_IMAGE)"
33
+ smolvm machine create "$VM_NAME" --image "$BASE_IMAGE" --cpus "$CPUS" --mem "$MEM_MIB" --net >/dev/null
34
+ smolvm machine start --name "$VM_NAME" >/dev/null
35
+
36
+ log "installing system packages"
37
+ smolvm machine exec --name "$VM_NAME" -- /usr/bin/apt-get update >/dev/null
38
+ smolvm machine exec --name "$VM_NAME" -- /usr/bin/apt-get install -y --no-install-recommends git ripgrep ca-certificates curl >/dev/null
39
+
40
+ log "installing ACP-capable coding agents via npm"
41
+ smolvm machine exec --name "$VM_NAME" -- /usr/local/bin/npm install -g \
42
+ @openai/codex \
43
+ @anthropic-ai/claude-code \
44
+ @agentclientprotocol/claude-agent-acp \
45
+ @zed-industries/codex-acp \
46
+ opencode-ai >&2
47
+
48
+ log "verifying agents inside VM"
49
+ smolvm machine exec --name "$VM_NAME" -- bash -lc '
50
+ set -e
51
+ which codex claude claude-agent-acp codex-acp opencode
52
+ codex --version
53
+ claude --version
54
+ opencode --version
55
+ ' >&2
56
+
57
+ log "stopping template VM"
58
+ smolvm machine stop --name "$VM_NAME" >/dev/null
59
+
60
+ log "packing -> $OUT_FILE"
61
+ smolvm pack create --from-vm "$VM_NAME" -o "$OUT_FILE" --cpus "$CPUS" --mem "$MEM_MIB" >&2
62
+
63
+ log "cleaning up template VM"
64
+ smolvm machine delete "$VM_NAME" -f >/dev/null
65
+
66
+ log "done: $OUT_FILE.smolmachine"
67
+ ls -lh "$OUT_FILE" "$OUT_FILE.smolmachine" 2>/dev/null >&2 || true