Repository navigation
Conversation
默认跟随请求模型,调用方窗口经内部字段送到当前 job,面板值可热配置。
窗口在入站清理前提取,再经内部字段进入 native body。
窗口必须在 settings 删除前提取,再传给 native body。
A replaced helper keeps the old inode and the listen port. Ownership now treats that process as down and the next start or fleet refresh stops every helper bound to the proxy config, including one the pidfile no longer names.
Fleet refresh now waits for every helper bound to the proxy config to exit before binding the new one. install.sh no longer treats a failed refresh as a successful upgrade.
账本列出文件里的真实配置项,claude.setting 可编辑后播种。遥测开/关与进程状态分开,种子页打开时 2 秒刷新。
编辑框只显示当前槽文件的原文。文件缺失或为空都保持空白,不再回退到策略文本或默认串。
GET /seed-settings 不再用策略默认串填补不存在的文件。空文件仍返回空串,策略字段保持独立。
settings.json 的 env 改成输入框,播种时写回。缺少 CLAUDE_CODE_ATTRIBUTION_HEADER 时默认 0。
默认不拉取。打开后读取本槽 telemetry-upload.log,sidecar 在每次上传后追加正文。
theme 可编辑并随播种写回。autoUpdates 与 grove_enabled 由播种固定,只读显示,不再被环境项过滤掉。
落盘前去掉邮箱、账号、组织和设备标识。超过四十行时原子替换,不再无限追加。
调试开关会改变查询键。保存成功按种子前缀失效,避免日志继续显示旧记录。
batch 日志改为 PostBatch 发出的 BatchRequest。身份字段仍在包装内删除。
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fb2bd5f. Configure here.
| concurrency: 1, | ||
| routing: ctx.routingConfig, | ||
| }) | ||
| service = report.items?.[0] || report |
There was a problem hiding this comment.
Seed save restarts kin-egress
High Severity
Toggling telemetry on a seed save now runs fleet telemetry, which copies Go binaries and restarts kin-egress as well as the sidecar. Seed PUT is supposed to write seed files and bounce only the telemetry child, not take the slot’s exit down or treat a config edit as a fleet binary roll.
Additional Locations (2)
Triggered by learned rule: Slot-bin v3; telemetry fleet restarts Go only
Reviewed by Cursor Bugbot for commit fb2bd5f. Configure here.
| const egress = await restartLocalEgress(projectRoot, vm, egressOpts) | ||
| if (!egress.ok) return egress | ||
| return { ...telemetry, egress: egress.egress } | ||
| } |
There was a problem hiding this comment.
Fleet egress restarts race
High Severity
Local fleet telemetry restarts kin-egress per VM with default concurrency 4 and no lock on the proxy run dir. Two slots that share a proxy can stop and spawn the helper at once; the losing process exits and the pidfile can record it, leaving the port busy or not_running.
Additional Locations (1)
Triggered by learned rule: kin-egress reload waits for old process exit
Reviewed by Cursor Bugbot for commit fb2bd5f. Configure here.
| const out = applyRequiredSeedEnv(env, pol) | ||
| // 2.1.283+ sends x-claude-code-prompt-id only when this is set. Default on. | ||
| out.CLAUDE_CODE_GATEWAY_HINT_HEADERS = '1' | ||
| if (out.CLAUDE_CODE_ATTRIBUTION_HEADER == null) out.CLAUDE_CODE_ATTRIBUTION_HEADER = '0' |
There was a problem hiding this comment.
Seed env TZ edits discarded
Medium Severity
The seed page now treats every settings.json env key as editable, including TZ and LANG, and saves them as extra_env. Slot write still overwrites those keys from the VM timezone and locale after the merge, so those form edits never land in the file.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit fb2bd5f. Configure here.
|
已部署到线上,PR 仍未合并。
|
|
发版已拒(厨房水槽 dirty,同 #606)。勿合、勿 tip。 处理:
— vm2api代码 |
| claude_setting = fs | ||
| .readFileSync(path.join(homeDir, '.claude', 'claude.setting'), 'utf8') | ||
| .replace(/\r\n?/g, '\n') | ||
| .replace(/\n+$/g, '') |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
Host GET /api/panel/vms/:id/seed-settings now readFileSyncs cli-home/.claude/claude.setting (and, with ?debug=1, vms/<id>/run/telemetry-upload.log). PUT save writes the same claude.setting path via writeSlotSeedFiles using writeFileSync. Both directories are guest-writable bind mounts (/home/kincli, /run/kin). Cluster host I/O already treats the final path component as attacker-controlled and requires O_NOFOLLOW / temp+rename so a guest cannot redirect the control plane.
Impact: A process in the slot can replace those names with a symlink (for example to a sibling slot's credentials.json or internal.token). An admin opening or saving the seed page then leaks or overwrites the target in the host namespace. A FIFO on the same path can also stall the shared Node process.
Reviewed by Cursor Security Reviewer for commit fb2bd5f. Configure here.
从 tip 拣出 #610 种子增量:settings.json env/theme 可编辑播种;契约 env(TZ/LANG/kill-switch/Bedrock/Vertex/gateway hint)与 autoUpdates/grove 只读;缺 CLAUDE_CODE_ATTRIBUTION_HEADER 默认 0。调试上传独立 query,切换不丢未保存编辑;Go sidecar 写脱敏 telemetry-upload.log。 不含锁定确认流、空 TZ 跟 SOCKS5、VERSION。勿 tip。




Summary
settings.json显示配置。env 可直接编辑,theme可改;autoUpdates和grove_enabled只读,播种时固定。缺少CLAUDE_CODE_ATTRIBUTION_HEADER时默认0。claude_setting返回null,空文件保持空串,不再用默认串冒充。PostBatch的events包装;落盘前去掉邮箱、账号、组织和设备标识。Test plan
pnpm -C web exec vitest run src/features/vm/seed-settings.test.ts src/features/vm/seed-policy-card.test.tspnpm -C web exec tsc -bnode --test test/unit/panel-vm-seed-settings.test.mjs test/unit/seed-policy.test.mjscd worker && go test ./internal/telemetry/不合并。
Note
High Risk
Touches fleet/container migration, egress process ownership, and outbound beta pinning on threaded Claude hops—failures can leave stale egress binaries or wrong API gates while VMs keep running.
Overview
Redesigns the VM seed tab so admins edit what is actually on disk: live
settings.jsonenv/theme rows, an editableclaude.settingfile, reject-client toggles, and a telemetry lamp that separates policy on/off from whether the sidecar process is running (2s refresh). Saving is an explicit 播种; optional 调试上传 (?debug=1) shows the last 40 redacted telemetry upload lines from the slot run dir.Backend seed API returns
claude_settingfrom the slot file (null if missing), accepts it on PUT, writes seed files includingclaude.setting, and when telemetry policy changes on a running VM runs a telemetry-only fleet update instead of a full slot reload. Go telemetry now appends redacted upload audit lines totelemetry-upload.log.Go slot services move to a persistent per-slot
slot-binbind at/opt/kin-live(layout v3): install/upgrade andfleet-update/fleet-services.mjspublishkin-worker/kin-egressand restart those processes without rebuilding VMs; remote slots can migrate legacy containers (rename to*-legacy-*). kin-egress lifecycle is stricter about deleted binaries and stale PIDs holding ports.Protocol/routing extras: thread continue turns reuse pinned Anthropic betas from the create turn;
auto_compact_windowis configurable in panel compat and forwarded into kernel/CLI hop bodies; mid-conversation output-config beta whenthreadis present.Reviewed by Cursor Bugbot for commit fb2bd5f. Configure here.