@jmanuelcorral/bond-app 0.3.2 → 0.3.3
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/app/mods/bond-settings/main.js +14 -0
- package/package.json +1 -1
- package/runner/Dockerfile +14 -6
- package/runner/setup.sh +21 -12
- package/runner/versions.env +11 -1
- package/src/core/agy-login.ts +12 -0
|
@@ -881,6 +881,7 @@ export default class BondSettings extends View {
|
|
|
881
881
|
|
|
882
882
|
/** Opens the credential or login dialog of an agent on top of this one. */
|
|
883
883
|
openCredential(agent) {
|
|
884
|
+
if (LOGIN_TEXT[agent] && this.imageMissing()) return;
|
|
884
885
|
const c = (this.creds ?? []).find((x) => x.agent === agent);
|
|
885
886
|
openOverlay({
|
|
886
887
|
mod: "bond-settings", kind: "dialog", modal: true, width: 480, height: 0.92,
|
|
@@ -1090,7 +1091,20 @@ export default class BondSettings extends View {
|
|
|
1090
1091
|
|
|
1091
1092
|
// ---- Issue #4 (P1): the Azure session for the runs ---------------------------------------
|
|
1092
1093
|
|
|
1094
|
+
/**
|
|
1095
|
+
* The logins (claude, codex, copilot, agy, Azure) run in the runner image: before it is built
|
|
1096
|
+
* there is nothing to run them in. Say so and go to Imagen instead of a Docker pull error.
|
|
1097
|
+
*/
|
|
1098
|
+
imageMissing() {
|
|
1099
|
+
if (this.setup?.image?.present !== false) return false;
|
|
1100
|
+
notify({ title: "Primero, la imagen del runner", body: "Los logins de los agentes se hacen dentro de ella. Constrúyela en Imagen (tarda unos minutos) y vuelve a iniciar sesión.", level: "warning" });
|
|
1101
|
+
if (this.view === "wizard") this.step = WIZARD_STEPS.indexOf("image") + 1;
|
|
1102
|
+
else this.section = "image";
|
|
1103
|
+
return true;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1093
1106
|
openAzureLogin() {
|
|
1107
|
+
if (this.imageMissing()) return;
|
|
1094
1108
|
openOverlay({ mod: "bond-settings", kind: "dialog", modal: true, width: 480, height: 0.92, props: { view: "agy-login", agent: "azure" } });
|
|
1095
1109
|
}
|
|
1096
1110
|
|
package/package.json
CHANGED
package/runner/Dockerfile
CHANGED
|
@@ -15,10 +15,13 @@ FROM node:22-bookworm-slim@sha256:5ec23b7c622b00547753bc6ffd78085dd868a68aeb41c8
|
|
|
15
15
|
# also pass the matching HC_SHA256 (releases.herdr.dev/core/<version>/manifest.json).
|
|
16
16
|
ARG HC_VERSION=0.1.17
|
|
17
17
|
ARG HC_SHA256=82ec44043f6894bfdb716b979b87cda43fd7fa46b0104e7b7bd93e64d1a9b877
|
|
18
|
+
# The same release for arm64 (an image built on a Mac with Apple Silicon); same manifest.
|
|
19
|
+
ARG HC_SHA256_ARM64=3a37a454ec63494cf4306db26481fe9db96673d888723701d24f8a992ae8ab8c
|
|
18
20
|
# herdr: pinned release binary, verified by checksum (as in P0). A rebuild that changes
|
|
19
21
|
# HERDR_VERSION must also pass the matching HERDR_SHA256.
|
|
20
22
|
ARG HERDR_VERSION=v0.9.3
|
|
21
23
|
ARG HERDR_SHA256=18a8dc65f1c2fa485884344356dea1cfd911c6f06cf46fa78e193f4087f4dba7
|
|
24
|
+
ARG HERDR_SHA256_ARM64=4de7aa3e25678812e92960de64f7c2aaa1bca1f0f80a3c5e559837e231e1f5c0
|
|
22
25
|
# P4 (image plan): bond comes from setup.sh --with-bond with the BOND_VERSION pin in
|
|
23
26
|
# versions.env (1.16.4+: `bond tui` exists; runner/SPIKE-BOND.md). Non-empty here
|
|
24
27
|
# overrides the pin file, like PI_VERSION below.
|
|
@@ -45,18 +48,23 @@ RUN apt-get update \
|
|
|
45
48
|
&& apt-get install -y --no-install-recommends git ca-certificates procps curl \
|
|
46
49
|
&& rm -rf /var/lib/apt/lists/*
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
&&
|
|
51
|
+
# The image's own architecture (x86_64, or aarch64 on Apple Silicon): its binary and checksum.
|
|
52
|
+
RUN arch="$(uname -m)" \
|
|
53
|
+
&& case "$arch" in x86_64) sum="${HC_SHA256}" ;; aarch64) sum="${HC_SHA256_ARM64}" ;; *) echo "unsupported architecture $arch" >&2; exit 1 ;; esac \
|
|
54
|
+
&& curl -fsSL -o /tmp/hc.tar.gz \
|
|
55
|
+
"https://releases.herdr.dev/core/${HC_VERSION}/herdr-core-linux-${arch}.tar.gz" \
|
|
56
|
+
&& echo "${sum} /tmp/hc.tar.gz" | sha256sum -c - \
|
|
51
57
|
&& mkdir -p /tmp/hc && tar -xzf /tmp/hc.tar.gz -C /tmp/hc \
|
|
52
58
|
&& install -m 0755 /tmp/hc/herdr-core /usr/local/bin/herdr-core \
|
|
53
59
|
&& ln -s herdr-core /usr/local/bin/hc \
|
|
54
60
|
&& rm -rf /tmp/hc /tmp/hc.tar.gz \
|
|
55
61
|
&& hc --version
|
|
56
62
|
|
|
57
|
-
RUN
|
|
58
|
-
|
|
59
|
-
&&
|
|
63
|
+
RUN arch="$(uname -m)" \
|
|
64
|
+
&& case "$arch" in x86_64) sum="${HERDR_SHA256}" ;; aarch64) sum="${HERDR_SHA256_ARM64}" ;; *) echo "unsupported architecture $arch" >&2; exit 1 ;; esac \
|
|
65
|
+
&& curl -fsSL -o /usr/local/bin/herdr \
|
|
66
|
+
"https://github.com/herdrdev/herdr/releases/download/${HERDR_VERSION}/herdr-linux-${arch}" \
|
|
67
|
+
&& echo "${sum} /usr/local/bin/herdr" | sha256sum -c - \
|
|
60
68
|
&& chmod 0755 /usr/local/bin/herdr && herdr --version
|
|
61
69
|
|
|
62
70
|
# The agent CLIs, supi and bond no longer come from here: setup.sh installs them with
|
package/runner/setup.sh
CHANGED
|
@@ -496,6 +496,13 @@ tool_apt_packages() {
|
|
|
496
496
|
esac
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
# La arquitectura de la imagen (amd64 o arm64: un Mac con Apple Silicon construye arm64).
|
|
500
|
+
# Cada descarga elige su fichero y su sha256 con ella; una arquitectura sin sumas se rechaza.
|
|
501
|
+
IMAGE_ARCH="$(dpkg --print-architecture 2>/dev/null || echo amd64)"
|
|
502
|
+
case "$IMAGE_ARCH" in amd64|arm64) ;; *) die "arquitectura no soportada para las herramientas: $IMAGE_ARCH (solo amd64 y arm64)" ;; esac
|
|
503
|
+
# arch_pick <valor amd64> <valor arm64>
|
|
504
|
+
arch_pick() { if [ "$IMAGE_ARCH" = arm64 ]; then printf '%s' "$2"; else printf '%s' "$1"; fi; }
|
|
505
|
+
|
|
499
506
|
# Descarga $1 en $2 y comprueba su sha256 ($3); nunca deja un fichero sin verificar.
|
|
500
507
|
fetch_verified() {
|
|
501
508
|
local url="$1" dest="$2" sum="$3"
|
|
@@ -516,9 +523,9 @@ clone_pinned() {
|
|
|
516
523
|
install_tool_shell() {
|
|
517
524
|
ln -sf /usr/bin/batcat /usr/local/bin/bat
|
|
518
525
|
local tmp; tmp="$(mktemp -d)"
|
|
519
|
-
fetch_verified "https://github.com/dandavison/delta/releases/download/${DELTA_VERSION}/git-delta_${DELTA_VERSION}
|
|
526
|
+
fetch_verified "https://github.com/dandavison/delta/releases/download/${DELTA_VERSION}/git-delta_${DELTA_VERSION}_${IMAGE_ARCH}.deb" "$tmp/delta.deb" "$(arch_pick "$DELTA_SHA256" "$DELTA_SHA256_ARM64")"
|
|
520
527
|
dpkg -i "$tmp/delta.deb" >/dev/null
|
|
521
|
-
fetch_verified "https://github.com/starship/starship/releases/download/${STARSHIP_VERSION}/starship
|
|
528
|
+
fetch_verified "https://github.com/starship/starship/releases/download/${STARSHIP_VERSION}/starship-$(arch_pick x86_64 aarch64)-unknown-linux-musl.tar.gz" "$tmp/starship.tgz" "$(arch_pick "$STARSHIP_SHA256" "$STARSHIP_SHA256_ARM64")"
|
|
522
529
|
tar -xzf "$tmp/starship.tgz" -C /usr/local/bin starship
|
|
523
530
|
rm -rf "$tmp"
|
|
524
531
|
# oh-my-zsh compartido y de solo lectura en /opt; cada usuario lo carga desde su .zshrc.
|
|
@@ -555,7 +562,7 @@ ZSHRC
|
|
|
555
562
|
|
|
556
563
|
install_tool_rust() {
|
|
557
564
|
local tmp; tmp="$(mktemp -d)"
|
|
558
|
-
fetch_verified "https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}
|
|
565
|
+
fetch_verified "https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/$(arch_pick x86_64 aarch64)-unknown-linux-gnu/rustup-init" "$tmp/rustup-init" "$(arch_pick "$RUSTUP_SHA256" "$RUSTUP_SHA256_ARM64")"
|
|
559
566
|
chmod 0755 "$tmp/rustup-init"
|
|
560
567
|
chown_if_runner "$tmp" "$tmp/rustup-init"
|
|
561
568
|
# En el home de runner (cargo install escribe ahí); los proxies van al PATH del sistema.
|
|
@@ -583,7 +590,7 @@ install_tool_dotnet() {
|
|
|
583
590
|
chmod go+r "$keyring"
|
|
584
591
|
# shellcheck disable=SC1091
|
|
585
592
|
. /etc/os-release
|
|
586
|
-
echo "deb [arch
|
|
593
|
+
echo "deb [arch=${IMAGE_ARCH} signed-by=$keyring] https://packages.microsoft.com/debian/${VERSION_ID}/prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft-prod.list
|
|
587
594
|
apt-get update -qq && apt-get install -y -qq --no-install-recommends dotnet-sdk-8.0 >/dev/null
|
|
588
595
|
}
|
|
589
596
|
|
|
@@ -612,7 +619,7 @@ install_tool_group() {
|
|
|
612
619
|
case "$1" in
|
|
613
620
|
esenciales)
|
|
614
621
|
ln -sf /usr/bin/fdfind /usr/local/bin/fd
|
|
615
|
-
fetch_verified "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/
|
|
622
|
+
fetch_verified "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${IMAGE_ARCH}" /usr/local/bin/yq "$(arch_pick "$YQ_SHA256" "$YQ_SHA256_ARM64")"
|
|
616
623
|
chmod 0755 /usr/local/bin/yq ;;
|
|
617
624
|
busqueda)
|
|
618
625
|
command -v npm >/dev/null 2>&1 || die "ast-grep se instala con npm y npm no está en el PATH"
|
|
@@ -621,13 +628,14 @@ install_tool_group() {
|
|
|
621
628
|
shell) install_tool_shell ;;
|
|
622
629
|
python)
|
|
623
630
|
tmp="$(mktemp -d)"
|
|
624
|
-
|
|
631
|
+
local uv_triple; uv_triple="$(arch_pick x86_64 aarch64)-unknown-linux-gnu"
|
|
632
|
+
fetch_verified "https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-${uv_triple}.tar.gz" "$tmp/uv.tgz" "$(arch_pick "$UV_SHA256" "$UV_SHA256_ARM64")"
|
|
625
633
|
tar -xzf "$tmp/uv.tgz" -C "$tmp"
|
|
626
|
-
install -m 0755 "$tmp
|
|
634
|
+
install -m 0755 "$tmp/uv-${uv_triple}/uv" "$tmp/uv-${uv_triple}/uvx" /usr/local/bin/
|
|
627
635
|
rm -rf "$tmp" ;;
|
|
628
636
|
go)
|
|
629
637
|
tmp="$(mktemp -d)"
|
|
630
|
-
fetch_verified "https://go.dev/dl/go${GO_VERSION}.linux
|
|
638
|
+
fetch_verified "https://go.dev/dl/go${GO_VERSION}.linux-${IMAGE_ARCH}.tar.gz" "$tmp/go.tgz" "$(arch_pick "$GO_SHA256" "$GO_SHA256_ARM64")"
|
|
631
639
|
rm -rf /usr/local/go && tar -xzf "$tmp/go.tgz" -C /usr/local
|
|
632
640
|
ln -sf /usr/local/go/bin/go /usr/local/bin/go
|
|
633
641
|
ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt
|
|
@@ -641,18 +649,19 @@ install_tool_group() {
|
|
|
641
649
|
# descargarlos la primera vez y un agente se quedaría esperando esa respuesta.
|
|
642
650
|
as_runner env COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack install -g "pnpm@$PNPM_VERSION" "yarn@$YARN_VERSION" >/dev/null
|
|
643
651
|
tmp="$(mktemp -d)"
|
|
644
|
-
|
|
652
|
+
local bun_dir; bun_dir="bun-linux-$(arch_pick x64 aarch64)"
|
|
653
|
+
fetch_verified "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/${bun_dir}.zip" "$tmp/bun.zip" "$(arch_pick "$BUN_SHA256" "$BUN_SHA256_ARM64")"
|
|
645
654
|
unzip -q "$tmp/bun.zip" -d "$tmp"
|
|
646
|
-
install -m 0755 "$tmp/bun
|
|
655
|
+
install -m 0755 "$tmp/${bun_dir}/bun" /usr/local/bin/bun
|
|
647
656
|
ln -sf /usr/local/bin/bun /usr/local/bin/bunx
|
|
648
657
|
rm -rf "$tmp" ;;
|
|
649
658
|
db) ;;
|
|
650
659
|
docker) install_tool_docker ;;
|
|
651
660
|
cloud)
|
|
652
|
-
fetch_verified "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/
|
|
661
|
+
fetch_verified "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${IMAGE_ARCH}/kubectl" /usr/local/bin/kubectl "$(arch_pick "$KUBECTL_SHA256" "$KUBECTL_SHA256_ARM64")"
|
|
653
662
|
chmod 0755 /usr/local/bin/kubectl
|
|
654
663
|
tmp="$(mktemp -d)"
|
|
655
|
-
fetch_verified "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}
|
|
664
|
+
fetch_verified "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${IMAGE_ARCH}.zip" "$tmp/tf.zip" "$(arch_pick "$TERRAFORM_SHA256" "$TERRAFORM_SHA256_ARM64")"
|
|
656
665
|
unzip -q "$tmp/tf.zip" -d "$tmp" && install -m 0755 "$tmp/terraform" /usr/local/bin/terraform
|
|
657
666
|
rm -rf "$tmp" ;;
|
|
658
667
|
esac
|
package/runner/versions.env
CHANGED
|
@@ -35,29 +35,39 @@ AZURE_CLI_VERSION=
|
|
|
35
35
|
# Lo que sale de apt (Debian bookworm) va sin pin: lo fija la base de la imagen. Lo que se
|
|
36
36
|
# descarga lleva versión y sha256 (de los ficheros de checksums oficiales de cada proyecto,
|
|
37
37
|
# salvo delta, que no los publica: sha256 tomado al fijar la versión). Cambiar una versión
|
|
38
|
-
# exige su checksum.
|
|
38
|
+
# exige su checksum. Cada fichero lleva también la suma de su versión arm64 (_ARM64: imágenes
|
|
39
|
+
# construidas en un Mac con Apple Silicon), de la misma fuente oficial. oh-my-zsh y sus plugins se clonan en un commit fijado (git lo verifica).
|
|
39
40
|
YQ_VERSION=v4.54.3
|
|
40
41
|
YQ_SHA256=129534601871538efe0ba4c5e62a34fb1d5f469bcb975c4fddeb467d82974973
|
|
42
|
+
YQ_SHA256_ARM64=89f69310b61b68d1245065a1241d1fc843f7a36cd6103ffd77ad987613bd1b67
|
|
41
43
|
AST_GREP_VERSION=0.51.3
|
|
42
44
|
DELTA_VERSION=0.22.0
|
|
43
45
|
DELTA_SHA256=109eac8927a80a7801e025901dcee8d56aa50a8de1805a111d98b5d6dbe5d647
|
|
46
|
+
DELTA_SHA256_ARM64=968964e9eb8a2e0b83b3aa27e29ce2ce61ace9ab51d4c37726f73d5559153fa2
|
|
44
47
|
STARSHIP_VERSION=v1.27.0
|
|
45
48
|
STARSHIP_SHA256=10c8eb4cb3b761d9bf59ea828444c2dab36c900b7d69a69e08814b286969df89
|
|
49
|
+
STARSHIP_SHA256_ARM64=341f5cbf24699fa0b27ec88965ad25f862ea09e15d35a543fd6ffdff1d2aa00d
|
|
46
50
|
OHMYZSH_COMMIT=6c31a91a3e82b4055b36cc088c2f27f81119ba60
|
|
47
51
|
ZSH_AUTOSUGGESTIONS_COMMIT=e52ee8ca55bcc56a17c828767a3f98f22a68d4eb
|
|
48
52
|
ZSH_SYNTAX_HIGHLIGHTING_COMMIT=db085e4661f6aafd24e5acb5b2e17e4dd5dddf3e
|
|
49
53
|
UV_VERSION=0.13.9
|
|
50
54
|
UV_SHA256=a7fbaff2b9a271d85c1bdb540941090fd1ce011797b4abeb48e4dcd39c2471d5
|
|
55
|
+
UV_SHA256_ARM64=0797542018e541a9288855df555c8077eed06f7a47d206362030480e8ecc9f3d
|
|
51
56
|
GO_VERSION=1.27.4
|
|
52
57
|
GO_SHA256=7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840
|
|
58
|
+
GO_SHA256_ARM64=3392582988a273a87ab5043ee1b2c9c17a2c3c00580bf9326c47a2e0aaaeac92
|
|
53
59
|
RUSTUP_VERSION=1.29.3
|
|
54
60
|
RUSTUP_SHA256=b1c8cb14e30889e7e2999e6b69e62d9e9b9ffc0f4df8180564d306d9680e6c55
|
|
61
|
+
RUSTUP_SHA256_ARM64=9f608c142e0e38a78957d0661ba1dfaf0b6fb37184cfaa4b9a0aa57af6184282
|
|
55
62
|
PNPM_VERSION=12.23.0
|
|
56
63
|
YARN_VERSION=4.19.0
|
|
57
64
|
BUN_VERSION=1.4.5
|
|
58
65
|
BUN_SHA256=94559b3b528995a49452f9f2404cec74f2efd7d06e0a000a8cd214b02c3666eb
|
|
66
|
+
BUN_SHA256_ARM64=18656a3bf0ea5641f5796ae4213b75255579a70a0fded2f337933785568cdf84
|
|
59
67
|
KUBECTL_VERSION=v1.37.2
|
|
60
68
|
KUBECTL_SHA256=c04487523e7aa7d1493f7808174c899db93d7a9cf57531420cd76b9bd415f8f4
|
|
69
|
+
KUBECTL_SHA256_ARM64=fcc16f63186659d9722014b7e02d5fdd2d4e669cb8c0ab66365d7d3b8ba03509
|
|
61
70
|
DEVCONTAINERS_CLI_VERSION=0.91.0
|
|
62
71
|
TERRAFORM_VERSION=1.17.2
|
|
63
72
|
TERRAFORM_SHA256=e6f16b2f0b137ee5729caa8c4e79a3bae4ee261acd198a1fcfa8584a6296605b
|
|
73
|
+
TERRAFORM_SHA256_ARM64=858e08c181a76b6b223e8c767a8e983922eebe2d062db949a2de66ce040c368c
|
package/src/core/agy-login.ts
CHANGED
|
@@ -26,9 +26,18 @@ export interface AgyLoginDriver {
|
|
|
26
26
|
|
|
27
27
|
export class DefaultAgyLoginDriver implements AgyLoginDriver {
|
|
28
28
|
async spawnContainer(containerName: string, image: string): Promise<void> {
|
|
29
|
+
// The runner image is built on this machine (Ajustes → Imagen), never pulled: without it,
|
|
30
|
+
// `docker run` went to Docker Hub and failed with «pull access denied».
|
|
31
|
+
try {
|
|
32
|
+
await execFileAsync('docker', ['image', 'inspect', image]);
|
|
33
|
+
} catch {
|
|
34
|
+
throw new Error(`${RUNNER_IMAGE_MISSING} (${image})`);
|
|
35
|
+
}
|
|
29
36
|
await execFileAsync('docker', [
|
|
30
37
|
'run',
|
|
31
38
|
'-d',
|
|
39
|
+
'--pull',
|
|
40
|
+
'never',
|
|
32
41
|
'--name',
|
|
33
42
|
containerName,
|
|
34
43
|
'--label',
|
|
@@ -127,6 +136,9 @@ export class DefaultAgyLoginDriver implements AgyLoginDriver {
|
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
|
|
139
|
+
/** The logins run the agent's CLI in the runner image: it has to be built first. */
|
|
140
|
+
export const RUNNER_IMAGE_MISSING = 'Falta la imagen del runner: los logins de los agentes se hacen dentro de ella. Constrúyela en Ajustes → Imagen (tarda unos minutos) y vuelve a iniciar sesión';
|
|
141
|
+
|
|
130
142
|
/** What a login is, per agent: the same container + tmux pilot, different CLI and result. */
|
|
131
143
|
/** What a spec may do in the login container besides reading its screen. */
|
|
132
144
|
export interface LoginContext {
|