-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup
More file actions
executable file
·83 lines (69 loc) · 2.38 KB
/
Copy pathsetup
File metadata and controls
executable file
·83 lines (69 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
echo "==> Installing native build prerequisites"
sudo apt-get update -qq
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
build-essential \
ca-certificates \
curl \
dbus-x11 \
libasound2 \
libatk-bridge2.0-0 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnss3 \
libxkbcommon0 \
libxss1 \
novnc \
pkg-config \
python3 \
websockify \
x11vnc \
xauth \
xz-utils \
xvfb
if [ ! -r /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
echo "==> Installing Nix"
curl --proto '=https' --tlsv1.2 -fsSL https://artifacts.nixos.org/nix-installer \
| sh -s -- install --no-confirm
fi
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
export PATH="$HOME/.nix-profile/bin:$PATH"
if ! nix --extra-experimental-features nix-command store info >/dev/null 2>&1; then
echo "Nix is present but unusable; the installation may be incomplete." >&2
echo "Run /nix/nix-installer uninstall --no-confirm, then rerun .agents/setup." >&2
exit 1
fi
if ! command -v devenv >/dev/null 2>&1; then
echo "==> Installing devenv"
nixpkgs_revision="$(python3 -c 'import json; print(json.load(open("devenv.lock"))["nodes"]["nixpkgs-src"]["locked"]["rev"])')"
nix-env --install --attr devenv \
-f "https://github.com/NixOS/nixpkgs/archive/${nixpkgs_revision}.tar.gz"
fi
echo "==> Installing JavaScript dependencies"
devenv shell -- pnpm install --frozen-lockfile
echo "==> Ensuring the Electron runtime is downloaded"
devenv shell -- pnpm exec electron --version >/dev/null
echo "==> Fetching Rust dependencies"
devenv shell -- cargo fetch --locked
echo "==> Building the terminal PTY sidecar"
devenv shell -- pnpm -F @linkcode/daemon run build:rust
echo "==> Building the daemon bundle required by Electron development"
devenv shell -- pnpm -F @linkcode/daemon run build
if [[ -n "${LINEAR_API_KEY:-}" ]]; then
if ! amp mcp list | grep -Eq '^[[:space:]]*linear[[:space:]]'; then
echo "==> Configuring Linear MCP"
amp mcp add linear \
--header 'Authorization=Bearer ${LINEAR_API_KEY}' \
https://mcp.linear.app/mcp
else
echo "==> Linear MCP is already configured"
fi
else
echo "==> LINEAR_API_KEY is unavailable; skipping Linear MCP configuration"
fi
echo "==> Starting supervised Orb development services"
amp orb services ensure
echo "==> Orb setup complete"