@runuai/host 0.9.10 → 0.9.11
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.
|
@@ -9,28 +9,55 @@
|
|
|
9
9
|
"workbench.welcomePage.walkthroughs.openOnInstall": false,
|
|
10
10
|
"window.commandCenter": false,
|
|
11
11
|
"chat.commandCenter.enabled": false,
|
|
12
|
+
"chat.viewSessions.enabled": false,
|
|
13
|
+
"chat.disableAIFeatures": true,
|
|
12
14
|
"update.mode": "none",
|
|
13
15
|
"extensions.autoCheckUpdates": false,
|
|
14
16
|
"extensions.autoUpdate": false,
|
|
15
17
|
"git.openRepositoryInParentFolders": "always",
|
|
16
|
-
"workbench.activityBar.location": "top",
|
|
17
|
-
"chat.viewSessions.enabled": false,
|
|
18
18
|
"workbench.secondarySideBar.defaultVisibility": "hidden",
|
|
19
|
+
|
|
20
|
+
"//4": "Colour theme. Overwritten at FIRST init by uai-init when the task",
|
|
21
|
+
"//5": "carries UAI_EDITOR_THEME (ADR-091); this value is the fallback for",
|
|
22
|
+
"//6": "tasks created before that shipped, or created outside a browser.",
|
|
19
23
|
"workbench.colorTheme": "Dark 2026",
|
|
20
24
|
|
|
21
|
-
"//
|
|
22
|
-
"//
|
|
23
|
-
"//
|
|
24
|
-
"//
|
|
25
|
+
"//7": "An editor, not an IDE (ADR-092). This pane is one of three in a",
|
|
26
|
+
"//8": "task's right panel and is often half a screen wide, so every bar it",
|
|
27
|
+
"//9": "does not need is width the code does. Cut here is chrome only: the",
|
|
28
|
+
"//10": "status bar, the layout buttons, the menu bar, the empty-editor",
|
|
29
|
+
"//11": "watermark, Open Editors, the minimap and the terminal's chat hint.",
|
|
30
|
+
"//12": "Breadcrumbs STAY: with the status bar gone they are the only thing",
|
|
31
|
+
"//13": "naming the path, and a tab reading 'route.ts' is worth little in a",
|
|
32
|
+
"//14": "repo with eleven of them.",
|
|
33
|
+
"workbench.statusBar.visible": false,
|
|
34
|
+
"workbench.layoutControl.enabled": false,
|
|
35
|
+
"window.menuBarVisibility": "hidden",
|
|
36
|
+
"workbench.editor.empty.hint": "hidden",
|
|
37
|
+
"explorer.openEditors.visible": 0,
|
|
38
|
+
"editor.minimap.enabled": false,
|
|
39
|
+
"terminal.integrated.initialHint": false,
|
|
40
|
+
|
|
41
|
+
"//15": "Hide the activity bar and its custom title strip. Explorer stays",
|
|
42
|
+
"//16": "open; the Editor pane's own toolbar provides the pointer route to",
|
|
43
|
+
"//17": "Terminal. Individual pins still live in the BROWSER's IndexedDB; the",
|
|
44
|
+
"//18": "guarded migration keeps the requested containers ready if a user",
|
|
45
|
+
"//19": "later restores the bar.",
|
|
46
|
+
"workbench.activityBar.location": "hidden",
|
|
47
|
+
|
|
48
|
+
"//22": "Workspace Trust — every task runs in an isolated container off the",
|
|
49
|
+
"//23": "user's own repos. The 'do you trust this folder?' prompt is pure",
|
|
50
|
+
"//24": "friction here; the user already trusts their code and the container",
|
|
51
|
+
"//25": "is the security boundary.",
|
|
25
52
|
"security.workspace.trust.enabled": false,
|
|
26
53
|
|
|
27
|
-
"//
|
|
28
|
-
"//
|
|
29
|
-
"//
|
|
30
|
-
"//
|
|
54
|
+
"//26": "Port forwarding — code-server's own auto-forward / 'Open in Browser'",
|
|
55
|
+
"//27": "popup can't reach anything useful here: dev servers are exposed",
|
|
56
|
+
"//28": "through uai's preview tunnel (ADR-025), not code-server's forwarder.",
|
|
57
|
+
"//29": "Disable it so the popup doesn't mislead.",
|
|
31
58
|
"remote.autoForwardPorts": false,
|
|
32
59
|
"remote.restoreForwardedPorts": false,
|
|
33
60
|
|
|
34
|
-
"//
|
|
61
|
+
"//30": "Integrated terminal uses zsh + oh-my-zsh (the node login shell).",
|
|
35
62
|
"terminal.integrated.defaultProfile.linux": "zsh"
|
|
36
63
|
}
|
|
@@ -219,11 +219,41 @@ cs_source_seed="$(dirname "${BASH_SOURCE[0]}")/code-server-settings.json"
|
|
|
219
219
|
if [ ! -f "$cs_seed" ] && [ -f "$cs_source_seed" ]; then
|
|
220
220
|
cs_seed="$cs_source_seed"
|
|
221
221
|
fi
|
|
222
|
+
|
|
223
|
+
# ADR-091: seed the Editor pane in the palette the task was created from.
|
|
224
|
+
# UAI_EDITOR_THEME carries a VS Code theme LABEL ("Quiet Light"), already
|
|
225
|
+
# resolved cloud-side from the theme registry — the container never maps a Uai
|
|
226
|
+
# palette id and never sees a raw user string. Unset is the normal state for a
|
|
227
|
+
# task created before this shipped or outside a browser; the seed's own baked
|
|
228
|
+
# default then stands.
|
|
229
|
+
#
|
|
230
|
+
# Applied ONLY while seeding. An existing settings.json is still left entirely
|
|
231
|
+
# alone, so a user's own editor tweaks survive a restart — which is also why
|
|
232
|
+
# changing the app's palette later does not re-theme an already-created task
|
|
233
|
+
# (docs/theming.md). If jq is missing or the filter fails, fall through to the
|
|
234
|
+
# plain copy: a themed editor is worth less than an editor that starts.
|
|
235
|
+
seed_code_server_settings() {
|
|
236
|
+
local seed="$1" dest="$2" theme="${UAI_EDITOR_THEME:-}"
|
|
237
|
+
if [ -n "$theme" ] && command -v jq >/dev/null 2>&1; then
|
|
238
|
+
if jq --arg theme "$theme" '.["workbench.colorTheme"] = $theme' \
|
|
239
|
+
"$seed" >"$dest.tmp" 2>/dev/null && [ -s "$dest.tmp" ]; then
|
|
240
|
+
mv "$dest.tmp" "$dest"
|
|
241
|
+
log "seeded code-server settings (theme: $theme)"
|
|
242
|
+
return 0
|
|
243
|
+
fi
|
|
244
|
+
rm -f "$dest.tmp"
|
|
245
|
+
log "warning: could not apply UAI_EDITOR_THEME=$theme; using image default"
|
|
246
|
+
fi
|
|
247
|
+
cp "$seed" "$dest" || return 1
|
|
248
|
+
log "seeded code-server settings"
|
|
249
|
+
}
|
|
250
|
+
|
|
222
251
|
if [ ! -f "$cs_user_dir/settings.json" ]; then
|
|
223
252
|
if [ ! -f "$cs_seed" ]; then
|
|
224
253
|
log "warning: code-server settings seed missing at $cs_seed"
|
|
225
|
-
elif mkdir -p "$cs_user_dir" &&
|
|
226
|
-
|
|
254
|
+
elif mkdir -p "$cs_user_dir" &&
|
|
255
|
+
seed_code_server_settings "$cs_seed" "$cs_user_dir/settings.json"; then
|
|
256
|
+
:
|
|
227
257
|
else
|
|
228
258
|
log "warning: could not seed code-server settings at $cs_user_dir/settings.json"
|
|
229
259
|
fi
|
|
@@ -238,6 +268,7 @@ else
|
|
|
238
268
|
--disable-workspace-trust \
|
|
239
269
|
--auth none \
|
|
240
270
|
--disable-telemetry \
|
|
271
|
+
--disable-update-check \
|
|
241
272
|
--bind-addr 0.0.0.0:8080 \
|
|
242
273
|
"$editor_root" \
|
|
243
274
|
>/tmp/code-server.log 2>&1 &
|
package/package.json
CHANGED
package/scripts/agent/task-up.sh
CHANGED
|
@@ -1081,6 +1081,13 @@ fi
|
|
|
1081
1081
|
# Projects may declare managed names, so skip them here rather than trust
|
|
1082
1082
|
# callers. They are also removed from the in-memory Compose override below.
|
|
1083
1083
|
#
|
|
1084
|
+
# UAI_EDITOR_THEME is reserved in BOTH places for the case that is easy to
|
|
1085
|
+
# miss: a task whose stored palette is null, on a project that happens to
|
|
1086
|
+
# declare that name. The cloud sends no theme, so the `preview_env` entry
|
|
1087
|
+
# that normally shadows a declared key is absent too — and without these two
|
|
1088
|
+
# lines a project would get to pick what the Editor pane looks like. Reserved,
|
|
1089
|
+
# the name is not emitted at all and uai-init seeds the image's own default.
|
|
1090
|
+
#
|
|
1084
1091
|
# Project values never enter the host environment. Emit an explicit empty
|
|
1085
1092
|
# default for every declared key; the stdin-only Compose override supplies
|
|
1086
1093
|
# decrypted values at `compose up` time.
|
|
@@ -1094,15 +1101,23 @@ fi
|
|
|
1094
1101
|
GIT_SSH | GIT_SSH_COMMAND | HOME | XDG_CONFIG_HOME | XDG_DATA_HOME | \
|
|
1095
1102
|
BASH_ENV | ENV | UAI_GIT_TRANSPORT | \
|
|
1096
1103
|
CLAUDE_CODE_OAUTH_TOKEN | ANTHROPIC_API_KEY | \
|
|
1097
|
-
ANTHROPIC_AUTH_TOKEN | XAI_API_KEY | PLAYWRIGHT_BROWSERS_PATH
|
|
1104
|
+
ANTHROPIC_AUTH_TOKEN | XAI_API_KEY | PLAYWRIGHT_BROWSERS_PATH | \
|
|
1105
|
+
UAI_EDITOR_THEME) continue ;;
|
|
1098
1106
|
esac
|
|
1099
1107
|
printf ' %s: ""\n' "$ekey"
|
|
1100
1108
|
done < <(jq -r '.[]' <<<"$union_env_keys_json")
|
|
1101
|
-
#
|
|
1102
|
-
#
|
|
1103
|
-
#
|
|
1104
|
-
#
|
|
1105
|
-
#
|
|
1109
|
+
# Cloud-computed literal env (ADR-025): a JSON object {VAR: value} on the
|
|
1110
|
+
# task row. Non-secret, so written LITERALLY (unlike the ${KEY:-}
|
|
1111
|
+
# pass-throughs above). Emitted last so it wins over any same-named declared
|
|
1112
|
+
# key. Two producers, both cloud-side and both opaque here:
|
|
1113
|
+
# - PUBLIC preview URLs under operator-chosen names (EXPO_PACKAGER_PROXY_URL
|
|
1114
|
+
# and friends), one per preview port that set `urlEnv`;
|
|
1115
|
+
# - UAI_EDITOR_THEME (ADR-091), the Editor pane's colour theme as a VS Code
|
|
1116
|
+
# theme LABEL ("Quiet Light"), already resolved from the palette the
|
|
1117
|
+
# creating browser snapshotted. The host never maps a Uai palette id.
|
|
1118
|
+
# UAI_EDITOR_THEME is absent for every task created before it shipped and for
|
|
1119
|
+
# any created outside a browser; uai-init then seeds the image's own default,
|
|
1120
|
+
# so the column staying null is a supported state, not a value to fill in.
|
|
1106
1121
|
preview_env_raw=$(jq -r '.[0].preview_env // "{}"' <<<"$task_json")
|
|
1107
1122
|
while IFS= read -r pe_entry; do
|
|
1108
1123
|
[ -n "$pe_entry" ] || continue
|
|
@@ -1188,7 +1203,8 @@ compose_env_override=$(printf '%s' "$project_env_json" | jq -c \
|
|
|
1188
1203
|
.ANTHROPIC_API_KEY,
|
|
1189
1204
|
.ANTHROPIC_AUTH_TOKEN,
|
|
1190
1205
|
.XAI_API_KEY,
|
|
1191
|
-
.PLAYWRIGHT_BROWSERS_PATH
|
|
1206
|
+
.PLAYWRIGHT_BROWSERS_PATH,
|
|
1207
|
+
.UAI_EDITOR_THEME
|
|
1192
1208
|
)
|
|
1193
1209
|
| delpaths($preview | keys | map([.]))
|
|
1194
1210
|
| {services:{app:{environment:.}}}
|
package/src/protocol.ts
CHANGED
|
@@ -199,11 +199,17 @@ export interface TaskCommandTask {
|
|
|
199
199
|
reviewerOrder?: string[];
|
|
200
200
|
agents: TaskAgent[];
|
|
201
201
|
/**
|
|
202
|
-
* Cloud-computed
|
|
203
|
-
*
|
|
204
|
-
* `
|
|
205
|
-
*
|
|
206
|
-
*
|
|
202
|
+
* Cloud-computed literal env to inject into the container at task-up.
|
|
203
|
+
* Non-secret by construction — written straight into the task's compose file,
|
|
204
|
+
* unlike the `${KEY:-}` pass-throughs used for credentials. Only present on
|
|
205
|
+
* task-up commands.
|
|
206
|
+
*
|
|
207
|
+
* Named for its first user, PUBLIC preview URLs keyed by the operator-chosen
|
|
208
|
+
* var name (e.g. `EXPO_PACKAGER_PROXY_URL`, present when a preview port set
|
|
209
|
+
* `urlEnv` and the cloud has a preview base domain). It now also carries
|
|
210
|
+
* `UAI_EDITOR_THEME` (ADR-091) — same shape, same guarantees, same one-way
|
|
211
|
+
* trip to `services.app.environment`, so it rides here rather than growing
|
|
212
|
+
* the protocol a second env channel. The host treats every entry as opaque.
|
|
207
213
|
*/
|
|
208
214
|
previewEnv?: Record<string, string>;
|
|
209
215
|
/** ADR-062: owning org — locates the org shared-files root on the host. */
|