Skip to content

Commit bbbe214

Browse files
BCeZnclaude
andcommitted
docs: clarify env field reuses EnvironmentConfig.env, covers both session and harbor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e62c5a5 commit bbbe214

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/dev/agent/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ rock/sdk/agent/
131131
```
132132
JobConfig (Pydantic, rock/sdk/agent/models/job/config.py)
133133
134-
│ ── Rock environment (not serialized to Harbor YAML) ──
134+
│ ── Rock environment (Rock sandbox + Harbor env, not serialized to Harbor YAML) ──
135135
├── environment: RockEnvironmentConfig
136136
│ ├── (from SandboxConfig) image, memory, cpus, cluster, base_url, startup_timeout, ...
137-
│ ├── (from HarborEnvConfig) type, force_build, override_cpus, override_memory_mb, ...
138-
│ ├── env: dict[str, str] # env vars injected into sandbox bash session
137+
│ ├── (from EnvironmentConfig) type, force_build, override_cpus, override_memory_mb, ...
138+
│ ├── env: dict[str, str] # reuses EnvironmentConfig.env injected into sandbox session and passed to harbor
139139
│ ├── setup_commands: list[str] # commands to run before harbor
140140
│ ├── file_uploads: list[tuple] # files to upload: (local_path, sandbox_path)
141141
│ └── auto_stop: bool # close sandbox after completion
@@ -447,7 +447,7 @@ JobConfig 分为两部分:Harbor 原生字段直接透传给 `harbor jobs star
447447
| `environment.base_url` | `str` | env var | Rock admin URL |
448448
| `environment.setup_commands` | `list[str]` | `[]` | harbor 运行前的准备命令 |
449449
| `environment.file_uploads` | `list[tuple[str, str]]` | `[]` | 上传文件/目录:(local_path, sandbox_path) |
450-
| `environment.env` | `dict[str, str]` | `{}` | sandbox session 环境变量(OSS keys 等) |
450+
| `environment.env` | `dict[str, str]` | `{}` | 复用 EnvironmentConfig.env — 注入 sandbox session,同时传给 harbor |
451451
| `environment.auto_stop` | `bool` | `False` | 完成后自动关闭 sandbox |
452452

453453
#### Harbor 原生字段(核心)

rock/sdk/agent/models/job/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class JobConfig(BaseModel):
134134
and passed to ``harbor jobs start -c``.
135135
"""
136136

137-
# ── Rock environment (sandbox + lifecycle) ──
137+
# ── Rock environment (Rock sandbox config + Harbor EnvironmentConfig, not serialized to Harbor YAML) ──
138138
environment: RockEnvironmentConfig = Field(default_factory=RockEnvironmentConfig)
139139

140140
# ── Harbor native fields ──

0 commit comments

Comments
 (0)