@jmanuelcorral/bond-app 0.1.5 → 0.2.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/README.md +280 -23
- package/app/brand/TOKENS.md +5 -5
- package/app/layouts/bond.json +10 -14
- package/app/mods/bond-agents/api.js +35 -0
- package/app/mods/bond-agents/branch.svg +1 -0
- package/app/mods/bond-agents/brand.js +53 -2
- package/app/mods/bond-agents/config.js +4 -0
- package/app/mods/bond-agents/eye-off.svg +1 -0
- package/app/mods/bond-agents/eye.svg +1 -0
- package/app/mods/bond-agents/main.js +308 -327
- package/app/mods/bond-agents/model.js +376 -5
- package/app/mods/bond-board/api.js +35 -0
- package/app/mods/bond-board/branch.svg +1 -0
- package/app/mods/bond-board/brand.js +53 -2
- package/app/mods/bond-board/config.js +4 -0
- package/app/mods/bond-board/main.js +1000 -449
- package/app/mods/bond-board/model.js +170 -28
- package/app/mods/bond-pane/close.svg +1 -0
- package/app/mods/bond-pane/hide.svg +1 -0
- package/app/mods/bond-pane/main.js +103 -0
- package/app/mods/bond-pane/mod.json +1 -0
- package/app/mods/bond-pane/model.js +18 -0
- package/app/mods/bond-pane/split-down.svg +1 -0
- package/app/mods/bond-pane/split-right.svg +1 -0
- package/app/mods/bond-pane/unzoom.svg +1 -0
- package/app/mods/bond-pane/zoom.svg +1 -0
- package/app/mods/bond-settings/api.js +35 -0
- package/app/mods/bond-settings/brand.js +53 -2
- package/app/mods/bond-settings/config.js +4 -0
- package/app/mods/bond-settings/main.js +1216 -272
- package/app/mods/bond-settings/mod.json +1 -1
- package/app/mods/bond-status/api.js +35 -0
- package/app/mods/bond-status/brand.js +53 -2
- package/app/mods/bond-status/config.js +4 -0
- package/app/mods/bond-status/main.js +37 -15
- package/app/mods/bond-status/model.js +19 -1
- package/app/mods/bond-tabs/brand.js +53 -2
- package/app/mods/bond-tabs/main.js +45 -3
- package/app/mods/bond-titlebar/brand.js +53 -2
- package/app/mods/bond-titlebar/main.js +85 -29
- package/app/mods/bond-titlebar/version.js +3 -0
- package/app/themes/bond-dark.json +5 -5
- package/app/themes/bond-light.json +5 -5
- package/package.json +1 -1
- package/runner/Dockerfile +16 -2
- package/runner/SPIKE-BOND.md +6 -2
- package/runner/entrypoint.sh +16 -0
- package/runner/setup.sh +439 -8
- package/runner/versions.env +32 -1
- package/scripts/app-install.ts +322 -27
- package/src/cli.ts +562 -21
- package/src/config.ts +15 -3
- package/src/core/agy-login.ts +683 -0
- package/src/core/delivery.ts +125 -6
- package/src/core/doctor.ts +748 -0
- package/src/core/hub-session.ts +108 -91
- package/src/core/hub.ts +40 -8
- package/src/core/orchestrator.ts +1481 -187
- package/src/core/paths.ts +107 -0
- package/src/core/permissions.ts +143 -0
- package/src/core/pr-source.ts +147 -0
- package/src/core/repo-host.ts +60 -0
- package/src/core/service-windows.ts +180 -0
- package/src/core/service.ts +861 -0
- package/src/core/setup-install.ts +1380 -0
- package/src/core/setup.ts +62 -1
- package/src/core/watchdog.ts +6 -6
- package/src/db/database.ts +54 -7
- package/src/db/settings-repo.ts +332 -7
- package/src/db/ticket-repo.ts +73 -25
- package/src/index.ts +4 -4
- package/src/runner/azure-devops-client.ts +273 -0
- package/src/runner/docker-client.ts +93 -9
- package/src/runner/github-client.ts +148 -3
- package/src/runner/hc-client.ts +33 -5
- package/src/runner/image-builder.ts +123 -5
- package/src/runner/jira-client.ts +368 -0
- package/src/runner/tool-catalog.ts +84 -0
- package/src/server/app.ts +467 -8
- package/src/types.ts +140 -2
|
@@ -4,15 +4,24 @@
|
|
|
4
4
|
// minimize, maximize/restore and close; on macOS the traffic lights stay, so it leaves room.
|
|
5
5
|
//
|
|
6
6
|
// Top Navigation Bar matching opendesign:
|
|
7
|
-
// - Left: Bond logo (isotype + wordmark) and version chip (
|
|
7
|
+
// - Left: Bond logo (isotype + wordmark) and version chip (version.js, from package.json)
|
|
8
8
|
// - Center: Global metrics banner: Tablero: N tickets, per-state dot counters, Gasto: $x / $y
|
|
9
9
|
// - Right: Search input ("Buscar ticket o rama..."), + Nuevo Ticket (primary), Theme switcher (sun icon), Settings (layout.toggle)
|
|
10
10
|
import { View, div, svg, image } from "gpui-kit";
|
|
11
11
|
import { h_flex, Input, InputState } from "gpui-base";
|
|
12
|
-
import { run, theme, layout, window as win, shared, setShared, openOverlay } from "herdr";
|
|
13
|
-
import { logo, UI, stateColor, isDark } from "./brand.js";
|
|
12
|
+
import { run, theme, layout, window as win, shared, setShared, openOverlay, appHome, readTextFile, writeTextFile, settings, notify } from "herdr";
|
|
13
|
+
import { logo, UI, stateColor, isDark, settingsOverlay, createOverlay, markColor } from "./brand.js";
|
|
14
|
+
import { VERSION } from "./version.js";
|
|
14
15
|
|
|
15
16
|
const ICONS = "mods/bond-titlebar";
|
|
17
|
+
/** The counters of the title bar: column, singular, plural (the board's words). */
|
|
18
|
+
const COUNT_CHIPS = [
|
|
19
|
+
["ready", "listo", "listos"],
|
|
20
|
+
["running", "en curso", "en curso"],
|
|
21
|
+
["waiting", "en espera", "en espera"],
|
|
22
|
+
["finished", "terminado", "terminados"],
|
|
23
|
+
["error", "con error", "con error"],
|
|
24
|
+
];
|
|
16
25
|
// Costes fuera por defecto (decisión 2026-11-19); mismo flag que CONFIG.costs en
|
|
17
26
|
// los mods de API — los mods no comparten carpeta, así que se duplica (como brand.js).
|
|
18
27
|
// Cuando haya configuración en Ajustes, esto será ese valor.
|
|
@@ -20,6 +29,37 @@ const COSTS = false;
|
|
|
20
29
|
const LOGO_H = 16; // isotype height
|
|
21
30
|
|
|
22
31
|
// A control inside the draggable bar: its presses are its own, not the window's.
|
|
32
|
+
/**
|
|
33
|
+
* Light/dark: the bond layout pairs bond-light and bond-dark ({light, dark}), so the theme
|
|
34
|
+
* follows the window's appearance; `app.theme` would only swap one half of the pair. The
|
|
35
|
+
* button flips `appearance` in herdr-app's settings.json (live), keeping the rest of it.
|
|
36
|
+
*/
|
|
37
|
+
export function nextAppearance(text, dark) {
|
|
38
|
+
let conf = {};
|
|
39
|
+
try {
|
|
40
|
+
conf = text ? JSON.parse(text) : {};
|
|
41
|
+
} catch {
|
|
42
|
+
return null; // a settings.json we can't read is not ours to rewrite
|
|
43
|
+
}
|
|
44
|
+
if (!conf || typeof conf !== "object" || Array.isArray(conf)) return null;
|
|
45
|
+
return JSON.stringify({ ...conf, appearance: dark ? "light" : "dark" }, null, 2) + "\n";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function toggleAppearance(cx, darkNow) {
|
|
49
|
+
const dark = typeof settings().dark === "boolean" ? settings().dark : darkNow;
|
|
50
|
+
const path = `${appHome()}/settings.json`;
|
|
51
|
+
cx.spawn(async () => {
|
|
52
|
+
try {
|
|
53
|
+
const text = await readTextFile(path);
|
|
54
|
+
const next = nextAppearance(text, dark);
|
|
55
|
+
if (next === null) throw new Error("settings.json no es JSON válido");
|
|
56
|
+
await writeTextFile(path, next, text);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
notify({ title: "No se pudo cambiar el modo", body: String(e?.message ?? e), level: "error" });
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
23
63
|
function own(el) {
|
|
24
64
|
return el
|
|
25
65
|
.on_mouse_down("left", (_e, cx) => cx.stop_propagation())
|
|
@@ -42,7 +82,7 @@ export default class BondTitlebar extends View {
|
|
|
42
82
|
init(_props, cx) {
|
|
43
83
|
const filter = shared(FILTER_KEY) ?? {};
|
|
44
84
|
const initialSearch = String(filter.text ?? shared("bond.search") ?? "");
|
|
45
|
-
this.search = InputState.new({ value: initialSearch, placeholder: "Buscar ticket o rama
|
|
85
|
+
this.search = InputState.new({ value: initialSearch, placeholder: "Buscar ticket o rama…" });
|
|
46
86
|
this.search.on("change", (_e, cx) => {
|
|
47
87
|
const val = this.search.value();
|
|
48
88
|
setShared("bond.search", val);
|
|
@@ -77,6 +117,20 @@ export default class BondTitlebar extends View {
|
|
|
77
117
|
);
|
|
78
118
|
}
|
|
79
119
|
|
|
120
|
+
/** Settings opens the Ajustes dialog (a modal, not a block of the layout any more). */
|
|
121
|
+
settingsButton() {
|
|
122
|
+
const t = theme();
|
|
123
|
+
return own(
|
|
124
|
+
h_flex().id("bt-settings").flex_none().h(26).px(8).gap(5).rounded(UI.radius).items_center().cursor_pointer()
|
|
125
|
+
.text_size(UI.text.small).font_family(UI.fontSans).font_medium()
|
|
126
|
+
.bg(t.raised).text_color(t.muted).border_1().border_color(t.border)
|
|
127
|
+
.hover((s) => s.bg(t.hover).text_color(t.foreground))
|
|
128
|
+
.on_click(() => openOverlay(settingsOverlay()))
|
|
129
|
+
.child(svg(`${ICONS}/settings.svg`).size(13))
|
|
130
|
+
.child("Ajustes"),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
80
134
|
panelButton(id, icon, label, node) {
|
|
81
135
|
const t = theme();
|
|
82
136
|
const n = findNode(layout(), node);
|
|
@@ -109,23 +163,26 @@ export default class BondTitlebar extends View {
|
|
|
109
163
|
const counts = stats?.counts ?? { ready: 0, running: 0, waiting: 0, finished: 0, error: 0 };
|
|
110
164
|
const costText = `$${Number(stats?.cost ?? 0).toFixed(2)}`;
|
|
111
165
|
const budgetText = `/ $${Number(stats?.budget ?? 0).toFixed(2)}`;
|
|
166
|
+
// One chip per state with its name (no bare dots): a click filters the board to that
|
|
167
|
+
// column (shared FILTER_KEY.column), a second click clears it. Error only when it has some.
|
|
168
|
+
const filter = shared(FILTER_KEY) ?? {};
|
|
112
169
|
const countsBlock = hasStats
|
|
113
|
-
? h_flex().gap(
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
170
|
+
? h_flex().gap(2).items_center()
|
|
171
|
+
.children(COUNT_CHIPS.filter(([id]) => id !== "error" || counts.error > 0).map(([id, one, many]) => {
|
|
172
|
+
const n = Number(counts[id] ?? 0);
|
|
173
|
+
const on = filter.column === id;
|
|
174
|
+
const color = stateColor(t, id);
|
|
175
|
+
return own(h_flex().id(`count-${id}`).h(20).px(6).gap(4).items_center().rounded(UI.radius).cursor_pointer()
|
|
176
|
+
.bg(on ? t.selected : t.raised).border_1().border_color(on ? color : t.raised)
|
|
177
|
+
.hover((s) => s.bg(t.hover))
|
|
178
|
+
.tooltip(on ? "Quitar el filtro" : `Ver solo ${many}`)
|
|
179
|
+
.on_click((_e, cx) => {
|
|
180
|
+
setShared(FILTER_KEY, { ...(shared(FILTER_KEY) ?? {}), column: on ? null : id });
|
|
181
|
+
cx.notify();
|
|
182
|
+
})
|
|
183
|
+
.child(div().size(6).rounded(3).flex_none().bg(n > 0 ? color : t.dim))
|
|
184
|
+
.child(div().text_color(n > 0 ? t.foreground : t.dim).child(`${n} ${n === 1 ? one : many}`)));
|
|
185
|
+
}))
|
|
129
186
|
: div().px(2).text_color(t.dim).child("—");
|
|
130
187
|
|
|
131
188
|
return h_flex().id("bond-titlebar").size_full().items_center().bg(t.chrome).px(10).gap(8)
|
|
@@ -137,7 +194,7 @@ export default class BondTitlebar extends View {
|
|
|
137
194
|
.child(image(l.isotype).w(LOGO_H * l.isotypeRatio).h(LOGO_H).flex_none())
|
|
138
195
|
.child(image(l.wordmark).w(wordH * l.wordmarkRatio).h(wordH).flex_none())
|
|
139
196
|
.child(div().px(5).py(1).rounded(UI.radius).bg(t.raised).border_1().border_color(t.border)
|
|
140
|
-
.text_size(UI.text.tiny).font_family("JetBrains Mono").font_medium().text_color(t.accent).child(
|
|
197
|
+
.text_size(UI.text.tiny).font_family("JetBrains Mono").font_medium().text_color(t.accent).child(`v${VERSION}`))
|
|
141
198
|
)
|
|
142
199
|
.child(div().flex_1())
|
|
143
200
|
// Center: Global Metrics Banner
|
|
@@ -148,7 +205,7 @@ export default class BondTitlebar extends View {
|
|
|
148
205
|
h_flex().gap(3).items_center()
|
|
149
206
|
.child(div().text_color(t.muted).child("Tablero:"))
|
|
150
207
|
.child(hasStats
|
|
151
|
-
? div().font_bold().font_family(UI.fontSans).text_color(t.foreground).child(`${totalTickets} tickets`)
|
|
208
|
+
? div().font_bold().font_family(UI.fontSans).text_color(t.foreground).child(`${totalTickets} ${totalTickets === 1 ? "ticket" : "tickets"}`)
|
|
152
209
|
: div().font_bold().font_family(UI.fontSans).text_color(t.dim).child("—"))
|
|
153
210
|
)
|
|
154
211
|
.child(div().text_color(t.border).child("|"))
|
|
@@ -188,9 +245,9 @@ export default class BondTitlebar extends View {
|
|
|
188
245
|
.text_size(UI.text.small).font_family(UI.fontSans).font_semibold()
|
|
189
246
|
.cursor_pointer().hover((s) => s.opacity(0.85))
|
|
190
247
|
.on_click(() => {
|
|
191
|
-
openOverlay(
|
|
248
|
+
openOverlay(createOverlay());
|
|
192
249
|
})
|
|
193
|
-
.child("+ Nuevo
|
|
250
|
+
.child("+ Nuevo ticket")
|
|
194
251
|
)
|
|
195
252
|
)
|
|
196
253
|
// Theme Switcher button (sun icon; switches bond-light / bond-dark)
|
|
@@ -199,14 +256,13 @@ export default class BondTitlebar extends View {
|
|
|
199
256
|
div().id("btn-theme-toggle").size(26).rounded(UI.radius).bg(t.raised).border_1().border_color(t.border)
|
|
200
257
|
.flex().items_center().justify_center().cursor_pointer()
|
|
201
258
|
.hover((s) => s.bg(t.hover))
|
|
202
|
-
.
|
|
203
|
-
|
|
204
|
-
})
|
|
205
|
-
.child(svg(`${ICONS}/sun.svg`).size(14).text_color(t.bond_waiting ?? "#f59e0b"))
|
|
259
|
+
.tooltip(isDark(t) ? "Modo claro" : "Modo oscuro")
|
|
260
|
+
.on_click((_e, cx) => toggleAppearance(cx, isDark(t)))
|
|
261
|
+
.child(svg(`${ICONS}/sun.svg`).size(14).text_color(markColor(t, "sun")))
|
|
206
262
|
)
|
|
207
263
|
)
|
|
208
264
|
// Settings button
|
|
209
|
-
.child(this.
|
|
265
|
+
.child(this.settingsButton())
|
|
210
266
|
// Agentes button (keeps layout.toggle agents)
|
|
211
267
|
.child(this.panelButton("bt-agents", "agents", "Agentes", "agents"))
|
|
212
268
|
)
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"bond_cyan": "#0284c7",
|
|
35
35
|
"bond_indigo": "#8b5cf6",
|
|
36
36
|
"bond_ready": "#94a3b8",
|
|
37
|
-
"bond_running": "#
|
|
38
|
-
"bond_waiting": "#
|
|
39
|
-
"bond_finished": "#
|
|
37
|
+
"bond_running": "#34d399",
|
|
38
|
+
"bond_waiting": "#facc15",
|
|
39
|
+
"bond_finished": "#38bdf8",
|
|
40
40
|
"bond_error": "#ef4444",
|
|
41
41
|
"bond_verifying": "#818cf8",
|
|
42
|
-
"bond_pr_ready": "#
|
|
43
|
-
"bond_blocked": "#
|
|
42
|
+
"bond_pr_ready": "#38bdf8",
|
|
43
|
+
"bond_blocked": "#facc15",
|
|
44
44
|
"bond_failed": "#ef4444"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"bond_cyan": "#0284c7",
|
|
35
35
|
"bond_indigo": "#4f46e5",
|
|
36
36
|
"bond_ready": "#64748b",
|
|
37
|
-
"bond_running": "#
|
|
38
|
-
"bond_waiting": "#
|
|
39
|
-
"bond_finished": "#
|
|
37
|
+
"bond_running": "#047857",
|
|
38
|
+
"bond_waiting": "#a16207",
|
|
39
|
+
"bond_finished": "#0369a1",
|
|
40
40
|
"bond_error": "#dc2626",
|
|
41
41
|
"bond_verifying": "#4f46e5",
|
|
42
|
-
"bond_pr_ready": "#
|
|
43
|
-
"bond_blocked": "#
|
|
42
|
+
"bond_pr_ready": "#0369a1",
|
|
43
|
+
"bond_blocked": "#a16207",
|
|
44
44
|
"bond_failed": "#dc2626"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/package.json
CHANGED
package/runner/Dockerfile
CHANGED
|
@@ -32,6 +32,14 @@ ARG SKIP_AZ=1
|
|
|
32
32
|
ARG SKIP_GH=0
|
|
33
33
|
# Optional override of the pi pin in versions.env (empty = use the pin file).
|
|
34
34
|
ARG PI_VERSION=
|
|
35
|
+
# Plan bond-app-ajustes-imagen P2: developer tool groups (setup.sh --tools) and extra
|
|
36
|
+
# Debian packages (--apt-extra), comma separated. Default: the catalog's default groups.
|
|
37
|
+
ARG TOOLS=esenciales,busqueda,shell
|
|
38
|
+
ARG APT_EXTRA=
|
|
39
|
+
# The recipe's fingerprint (src/runner/image-builder.ts runnerRecipeHash), computed by the
|
|
40
|
+
# orchestrator and kept as a label: Ajustes marks the image stale when this recipe changes.
|
|
41
|
+
ARG RECIPE=
|
|
42
|
+
LABEL dev.bond-app.recipe="${RECIPE}"
|
|
35
43
|
|
|
36
44
|
RUN apt-get update \
|
|
37
45
|
&& apt-get install -y --no-install-recommends git ca-certificates procps curl \
|
|
@@ -71,6 +79,12 @@ RUN ln -sf /home/runner/.pi/agent/trust.json /home/runner/.pi/agent/trusted.json
|
|
|
71
79
|
# P2 (image plan): setup.sh lives in the image too (criterion: the image carries the
|
|
72
80
|
# script and the /opt/runner-agents manifest). The build stages optional config and
|
|
73
81
|
# credentials next to the Dockerfile (image-builder.ts); ".none" means "nothing staged".
|
|
82
|
+
# D-BB/D-CC: BOND_APP=1 before setup.sh, so `bond setup` (as runner) installs the hc
|
|
83
|
+
# variant of bond-delegate/bond-team; declared after it, the build saw no variable and
|
|
84
|
+
# baked the classic Herdr skills. It is a flag, not a secret (D7).
|
|
85
|
+
ENV BOND_TEAM_NO_TABLE=1 \
|
|
86
|
+
BOND_APP=1 \
|
|
87
|
+
COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
74
88
|
COPY setup.sh versions.env credentials.example.env /opt/runner/
|
|
75
89
|
COPY config.example /opt/runner/config.example
|
|
76
90
|
COPY build-config /tmp/build-config
|
|
@@ -81,6 +95,8 @@ RUN chmod 0755 /opt/runner/setup.sh \
|
|
|
81
95
|
&& set -- --agents "${AGENTS}" --with-bond \
|
|
82
96
|
&& if [ "${SKIP_AZ}" = "1" ]; then set -- "$@" --skip-az; fi \
|
|
83
97
|
&& if [ "${SKIP_GH}" = "1" ]; then set -- "$@" --skip-gh; fi \
|
|
98
|
+
&& if [ -n "${TOOLS}" ]; then set -- "$@" --tools "${TOOLS}"; fi \
|
|
99
|
+
&& if [ -n "${APT_EXTRA}" ]; then set -- "$@" --apt-extra "${APT_EXTRA}"; fi \
|
|
84
100
|
&& { [ -f /tmp/build-config/.none ] || set -- "$@" --config /tmp/build-config; } \
|
|
85
101
|
&& { [ -f /tmp/build-creds/.none ] || set -- "$@" --credentials /tmp/build-creds/env; } \
|
|
86
102
|
&& /opt/runner/setup.sh "$@" \
|
|
@@ -91,7 +107,5 @@ RUN chmod 0755 /usr/local/lib/runner/*.sh \
|
|
|
91
107
|
&& ln -s /usr/local/lib/runner/runner-clone.sh /usr/local/bin/runner-clone \
|
|
92
108
|
&& ln -s /usr/local/lib/runner/healthcheck.sh /usr/local/bin/runner-health
|
|
93
109
|
|
|
94
|
-
ENV BOND_TEAM_NO_TABLE=1
|
|
95
|
-
|
|
96
110
|
HEALTHCHECK --interval=2s --timeout=2s --start-period=5s --retries=3 CMD ["/usr/local/bin/runner-health"]
|
|
97
111
|
ENTRYPOINT ["/usr/local/lib/runner/entrypoint.sh"]
|
package/runner/SPIKE-BOND.md
CHANGED
|
@@ -32,9 +32,13 @@ bond tui --agent pi -- "responde SOLO: hola"
|
|
|
32
32
|
|
|
33
33
|
1. **Versión de bond**: la fijada en la imagen (`1.15.0`) **no tiene comando `tui`**.
|
|
34
34
|
Existe desde `1.16.4` (package npm con scope `@jmanuelcorral/bond`). P4 sube el pin.
|
|
35
|
-
2. **Fiar la carpeta en pi**: pi pregunta «Trust project folder?» la primera vez. Resuelto
|
|
35
|
+
2. **Fiar la carpeta en pi y agy**: pi pregunta «Trust project folder?» la primera vez. Resuelto
|
|
36
36
|
horneando/inyectando `~/.pi/agent/trust.json` con el workdir (`/workspace` ya está en
|
|
37
|
-
la imagen actual).
|
|
37
|
+
la imagen actual). En agy, la confianza de carpetas se persiste en
|
|
38
|
+
`~/.gemini/antigravity-cli/settings.json` bajo `"trustedWorkspaces": ["/workspace", "/workspace/repo"]`,
|
|
39
|
+
y el onboarding en `~/.gemini/antigravity-cli/cache/onboarding.json` con
|
|
40
|
+
`{"consumerOnboardingComplete":true,"enterpriseOnboardingComplete":true,"onboardingComplete":true}`,
|
|
41
|
+
ambos horneados automáticamente por `runner/setup.sh` al instalar agy.
|
|
38
42
|
3. **Repo con `.bond/bond.toml`**: llega **por git** con el clone del workdir. Si no lo
|
|
39
43
|
tiene, bond ofrece `bond init` (interactivo) → el lanzador no debe usar bond en repos
|
|
40
44
|
sin bond hasta que haya flag para eso.
|
package/runner/entrypoint.sh
CHANGED
|
@@ -2,8 +2,24 @@
|
|
|
2
2
|
# Container entrypoint (P3): nothing listens. PID 1 is docker's init (--init) and this
|
|
3
3
|
# keeps the container alive as the unprivileged `runner` user; hc's core is started on
|
|
4
4
|
# demand by `hc machine add --via 'docker exec -i -u runner ...'` from the host.
|
|
5
|
+
#
|
|
6
|
+
# Plan bond-app-ajustes-imagen P4: with BOND_DIND=1 (only tickets with «Docker en el run»,
|
|
7
|
+
# whose container runs --privileged with its own /var/lib/docker volume) dockerd starts here
|
|
8
|
+
# as root first; runner reaches it through the docker group (setup.sh, group «docker»).
|
|
5
9
|
set -euo pipefail
|
|
6
10
|
cd /workspace
|
|
11
|
+
if [ "${BOND_DIND:-0}" = "1" ]; then
|
|
12
|
+
if command -v dockerd >/dev/null 2>&1; then
|
|
13
|
+
dockerd >/var/log/dockerd.log 2>&1 &
|
|
14
|
+
for _ in $(seq 1 60); do
|
|
15
|
+
[ -S /var/run/docker.sock ] && break
|
|
16
|
+
sleep 0.5
|
|
17
|
+
done
|
|
18
|
+
[ -S /var/run/docker.sock ] || echo "entrypoint: dockerd no arrancó (mira /var/log/dockerd.log)" >&2
|
|
19
|
+
else
|
|
20
|
+
echo "entrypoint: BOND_DIND=1 pero la imagen no lleva docker (grupo «docker» de Ajustes → Imagen)" >&2
|
|
21
|
+
fi
|
|
22
|
+
fi
|
|
7
23
|
exec setpriv --reuid=runner --regid=runner --init-groups \
|
|
8
24
|
env -i HOME=/home/runner USER=runner PATH=/usr/local/bin:/usr/bin:/bin TERM=xterm-256color \
|
|
9
25
|
sleep infinity
|