Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.
JavaScript agent-orchestrationagentic-workflowai-agentsai-codingclaude-codecode-reviewcodebuddycodexcoding-agentscursordeveloper-toolshuman-on-the-loopllmmcpmulti-agentsdlcself-hostedsopworkflow-automationworkflow-engine
feat(runtime): install Claude Code on first use instead of bundling it (0.3.2) (#100)
cocofhud9f7b84f57f7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ea22e9e6..663b84e3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,8 +2,9 @@Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. LoopForge Local packages use `local-vX.Y.Z` tags and are published by manually running the `release-local` workflow.-## Unreleased+## 0.3.2 — Claude Code installed on first use+- Published images no longer bundle Claude Code, which is proprietary. The first Main Bot conversation or SOP role that selects it installs the pinned `@anthropic-ai/[email protected]` from npm into `$LOOPFORGE_DATA_DIR/cli`; Docker sandboxes from the platform image read it through a read-only mount. That first use waits for the download (about a minute); later runs reuse it. Codex and CodeBuddy remain bundled.- Listen on `0.0.0.0` by default, including older installations without `LOOPFORGE_BIND`. The installer no longer asks for, or fails without, `LOOPFORGE_PUBLIC_URL`; it is optional and only changes the printed address.## 0.3.1 — published-image startupdiff --git a/Dockerfile b/Dockerfileindex ac4dd2e3..d9e4bb0e 100644--- a/Dockerfile+++ b/Dockerfile@@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cacheFROM node:22-bookwormRUN --mount=type=cache,target=/root/.npm apt-get update && apt-get install -y --no-install-recommends ca-certificates git bash curl python3 ripgrep \&& rm -rf /var/lib/apt/lists/* \- && npm install -g @openai/[email protected] @anthropic-ai/[email protected] @tencent-ai/[email protected]+ && npm install -g @openai/[email protected] @tencent-ai/[email protected]COPY --from=docker:27-cli /usr/local/bin/docker /usr/local/bin/dockerCOPY --from=docker:27-cli /usr/local/libexec/docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildxWORKDIR /appdiff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex 7fe1736c..7bedabfb 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -48,6 +48,6 @@ SOFTWARE.## Executor CLI packages-The Docker build downloads pinned Codex, Claude Code and CodeBuddy CLI packages from their provider registries. These packages and their bundled dependencies retain the licenses/notices shipped by their providers; they are not relicensed under LoopForge's MIT license. Provider accounts, credentials and service terms apply separately. The installed packages retain their original license/readme files in the image's npm package directories.+The Docker build downloads pinned Codex and CodeBuddy CLI packages from their provider registries. Claude Code is proprietary and is not included in published images: when a user first selects it, the platform installs the pinned `@anthropic-ai/claude-code` package from npm into the installation's data directory, subject to Anthropic's terms. These packages and their bundled dependencies retain the licenses/notices shipped by their providers; they are not relicensed under LoopForge's MIT license. Provider accounts, credentials and service terms apply separately. The installed packages retain their original license/readme files in the image's npm package directories.The platform source was contributed by the repository owner from the recorded upstream master and is distributed under the root MIT license.diff --git a/compose.yaml b/compose.yamlindex 229c9fea..596baa32 100644--- a/compose.yaml+++ b/compose.yaml@@ -21,7 +21,7 @@ services:profiles: [platform]# Published release stack: never builds. Bump the pinned tag (here and in# AGENTFLOW_ISOLATED_IMAGE) with each release; source builds use compose.dev.yaml.- image: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.1}+ image: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.2}ports:- "${LOOPFORGE_BIND:-0.0.0.0}:${AGENTFLOW_HTTP_PORT:-8090}:8080"environment:@@ -40,10 +40,12 @@ services:AGENTFLOW_PLATFORM_MCP_URL: ${AGENTFLOW_PLATFORM_MCP_URL:-http://platform:8080}AGENTFLOW_DOCKER_NETWORK: ${COMPOSE_PROJECT_NAME:-loopforge}_defaultAGENTFLOW_LOCAL_SANDBOX: docker- AGENTFLOW_ISOLATED_IMAGE: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.1}+ AGENTFLOW_ISOLATED_IMAGE: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.2}HOME: ${LOOPFORGE_DATA_DIR:?Run scripts/configure.sh first}/homeAGENTFLOW_RUNNER_BINARY: /app/bin/agentflow-runner-{os}-{arch}AGENTFLOW_GATE_MCP_BINARY: /app/bin/agentflow-gate-mcp-{os}-{arch}+ # Claude Code is not bundled; it is installed from npm here on first use.+ AGENTFLOW_RUNTIME_CLI_DIR: ${LOOPFORGE_DATA_DIR}/clicommand: ["-workspaces", "${LOOPFORGE_DATA_DIR}/workspaces"]volumes:- platform-data:/datadiff --git a/docs/deployment.md b/docs/deployment.mdindex 1e0030d5..a0c895a0 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -13,7 +13,7 @@ codebuddy --versionnpm install --global @openai/[email protected] @anthropic-ai/[email protected]```-Ensure the service can find `codebuddy` and Node.js on its PATH, or set `AGENTFLOW_CODEBUDDY_BIN` to the installed executable. Configure the model key and its network environment in personal settings. The no-key script demo does not need the CLI. The production Docker image already includes CodeBuddy, Codex and Claude Code; Docker sandboxes and connected runners have their own CLI requirements.+Ensure the service can find `codebuddy` and Node.js on its PATH, or set `AGENTFLOW_CODEBUDDY_BIN` to the installed executable. Configure the model key and its network environment in personal settings. The no-key script demo does not need the CLI. The production Docker image includes CodeBuddy and Codex. Claude Code is not redistributed: the first Main Bot conversation or SOP role that selects it installs the pinned `@anthropic-ai/claude-code` from npm into `$LOOPFORGE_DATA_DIR/cli`, so that first run waits for the download and later runs reuse it; Docker sandboxes and connected runners have their own CLI requirements.Stop the foreground service with Ctrl-C. Start it again with the same command. MySQL data stays in its Compose volume. `docker compose stop mysql` stops the database without deleting it.@@ -35,7 +35,7 @@ The installer checks Docker, Compose and Python (and offers to install Docker whRun it as the installation owner, including an ordinary Linux user. If that user cannot access Docker directly, the installer validates sudo and uses `sudo -n docker` consistently for Compose, schema installation and seeds. Before each operation it checks whether sudo credentials expired during a long build, prompting again in a terminal or failing with instructions in unattended mode. It does not require adding the user to the Docker group or logging out. For unattended installations run `sudo -v` first; `LOOPFORGE_YES=1` accepts installation prompts but does not bypass operating-system permissions. Without sudo or Docker access it fails immediately with instructions. Rootless Docker uses its active context's Unix socket; remote Docker contexts need a separately configured deployment because sandbox workspaces are local bind mounts.-`compose.yaml` is the published-image stack and never builds: `./start.sh`, `scripts/install.sh` and a plain `docker compose --profile platform up` all pull the GHCR release pinned there (currently `ghcr.io/tencent/loopforge:0.3.1`). The pin matches the checkout's migrations and seeds, so check out a release tag when you install. Set `LOOPFORGE_IMAGE` (for example to an `@sha256:` digest) only to override it; a value saved in `.env` takes precedence over later pin changes.+`compose.yaml` is the published-image stack and never builds: `./start.sh`, `scripts/install.sh` and a plain `docker compose --profile platform up` all pull the GHCR release pinned there (currently `ghcr.io/tencent/loopforge:0.3.2`). The pin matches the checkout's migrations and seeds, so check out a release tag when you install. Set `LOOPFORGE_IMAGE` (for example to an `@sha256:` digest) only to override it; a value saved in `.env` takes precedence over later pin changes.`./start.sh dev` (or `LOOPFORGE_BUILD_FROM_SOURCE=1 bash scripts/install.sh`) builds this checkout as `loopforge-platform:local` from `compose.dev.yaml`. It saves `COMPOSE_FILE=compose.yaml:compose.dev.yaml` in `.env`, so later runs and plain `docker compose` commands keep using the source build until `./start.sh release`. Source builds reuse npm, Go module and Go compiler caches.diff --git a/internal/httpapi/assistant_provider.go b/internal/httpapi/assistant_provider.goindex 0f478919..4322028d 100644--- a/internal/httpapi/assistant_provider.go+++ b/internal/httpapi/assistant_provider.go@@ -69,14 +69,19 @@ if not name.startswith("mcp__agentflow_session__"):sys.exit(2)`-func prepareAlternateAssistantCommand(req assistantCLIRequest, dir string) (runtime.CommandSpec, error) {- binary, kind, binding := "claude", "claude-code", runtime.BindClaudeCode+func prepareAlternateAssistantCommand(ctx context.Context, req assistantCLIRequest, dir string) (runtime.CommandSpec, error) {+ kind, binding := "claude-code", runtime.BindClaudeCodeif req.Executor == "codex" {- binary, kind, binding = "codex", "codex", runtime.BindCodex+ kind, binding = "codex", runtime.BindCodex}- bin, err := exec.LookPath(binary)- if err != nil {- return runtime.CommandSpec{}, fmt.Errorf("%s CLI 未安装", binary)+ var bin string+ var err error+ if req.Executor == "codex" {+ if bin, err = exec.LookPath("codex"); err != nil {+ return runtime.CommandSpec{}, fmt.Errorf("codex CLI 未安装")+ }+ } else if bin, err = runtime.ResolveClaudeCode(ctx); err != nil {+ return runtime.CommandSpec{}, err}sys := strings.TrimSpace(req.SystemPrompt)if sys == "" {@@ -161,7 +166,7 @@ func runAlternateAssistantCLI(ctx context.Context, req assistantCLIRequest, userreturn "", "", err}defer os.RemoveAll(dir)- command, err := prepareAlternateAssistantCommand(req, dir)+ command, err := prepareAlternateAssistantCommand(ctx, req, dir)if err != nil {return "", "", err}diff --git a/internal/runtime/claude_install.go b/internal/runtime/claude_install.gonew file mode 100644index 00000000..7447845f--- /dev/null+++ b/internal/runtime/claude_install.go@@ -0,0 +1,96 @@+package runtime++import (+ "context"+ "errors"+ "fmt"+ "os"+ "os/exec"+ "path/filepath"+ "strings"+ "sync"+)++// ClaudeCodeVersion is installed from npm on first use. Published platform+// images do not redistribute Claude Code, so each installation downloads it+// from Anthropic's registry package itself.+const ClaudeCodeVersion = "2.1.300"++var claudeInstallMu sync.Mutex++// RuntimeCLIDir is the shared directory (AGENTFLOW_RUNTIME_CLI_DIR) holding+// on-demand CLI installations. It must resolve to the same absolute path for+// the platform and the host Docker daemon, because sandboxes bind-mount it.+func RuntimeCLIDir() string {+ return strings.TrimSpace(os.Getenv("AGENTFLOW_RUNTIME_CLI_DIR"))+}++var claudeCodePackageBinary = filepath.Join("node_modules", "@anthropic-ai", "claude-code", "bin", "claude.exe")++func claudeCodeBinary(root string) string {+ return filepath.Join(root, "claude-code", ClaudeCodeVersion, claudeCodePackageBinary)+}++// ClaudeCodeBinDir is the npm bin directory exposing the on-demand `claude`.+func ClaudeCodeBinDir() string {+ return filepath.Join(RuntimeCLIDir(), "claude-code", ClaudeCodeVersion, "node_modules", ".bin")+}++// ResolveClaudeCode returns a claude executable for the platform process: one+// already on PATH, otherwise the pinned on-demand installation.+func ResolveClaudeCode(ctx context.Context) (string, error) {+ if path, err := exec.LookPath("claude"); err == nil {+ return path, nil+ }+ return EnsureClaudeCode(ctx)+}++// EnsureClaudeCode installs the pinned Claude Code release into+// RuntimeCLIDir once and returns its absolute binary path.+func EnsureClaudeCode(ctx context.Context) (string, error) {+ root := RuntimeCLIDir()+ if root == "" {+ return "", errors.New("claude CLI 未安装")+ }+ binary := claudeCodeBinary(root)+ if fileIsExecutable(binary) {+ return binary, nil+ }+ claudeInstallMu.Lock()+ defer claudeInstallMu.Unlock()+ if fileIsExecutable(binary) {+ return binary, nil+ }+ parent := filepath.Join(root, "claude-code")+ if err := os.MkdirAll(parent, 0o755); err != nil {+ return "", fmt.Errorf("prepare Claude Code directory: %w", err)+ }+ stage, err := os.MkdirTemp(parent, ".install-")+ if err != nil {+ return "", fmt.Errorf("prepare Claude Code install: %w", err)+ }+ defer os.RemoveAll(stage)+ // Sandboxes read the installation through a read-only bind mount.+ if err := os.Chmod(stage, 0o755); err != nil {+ return "", err+ }+ install := exec.CommandContext(ctx, "npm", "install", "--prefix", stage, "--no-audit", "--no-fund", "--omit=dev", "--save-exact", "@anthropic-ai/claude-code@"+ClaudeCodeVersion)+ install.Dir = stage+ if out, err := install.CombinedOutput(); err != nil {+ return "", fmt.Errorf("install Claude Code %s from npm: %w: %s", ClaudeCodeVersion, err, tailOutput(out))+ }+ staged := filepath.Join(stage, claudeCodePackageBinary)+ if out, err := exec.CommandContext(ctx, staged, "--version").CombinedOutput(); err != nil {+ return "", fmt.Errorf("installed Claude Code does not run on this platform: %w: %s", err, tailOutput(out))+ }+ target := filepath.Join(parent, ClaudeCodeVersion)+ if err := os.Rename(stage, target); err != nil && !fileIsExecutable(binary) {+ return "", fmt.Errorf("activate Claude Code install: %w", err)+ }+ return binary, nil+}++func fileIsExecutable(path string) bool {+ info, err := os.Stat(path)+ return err == nil && info.Mode().IsRegular() && info.Mode().Perm()&0o111 != 0+}diff --git a/internal/runtime/claude_install_test.go b/internal/runtime/claude_install_test.gonew file mode 100644index 00000000..0c134724--- /dev/null+++ b/internal/runtime/claude_install_test.go@@ -0,0 +1,137 @@+package runtime++import (+ "context"+ "os"+ "path/filepath"+ "strings"+ "testing"++ "agentflow/internal/domain"+)++// fakeNPM lays out the package the way npm and Claude Code's postinstall do.+const fakeNPM = `#!/bin/sh+printf '%s\n' "$*" >> "$NPM_TEST_LOG"+[ "$NPM_TEST_FAIL" = 1 ] && { echo 'npm ERR! registry unreachable'; exit 1; }+prefix=$3+mkdir -p "$prefix/node_modules/@anthropic-ai/claude-code/bin" "$prefix/node_modules/.bin"+printf '#!/bin/sh\necho 2.1.300\n' > "$prefix/node_modules/@anthropic-ai/claude-code/bin/claude.exe"+chmod 755 "$prefix/node_modules/@anthropic-ai/claude-code/bin/claude.exe"+ln -s ../@anthropic-ai/claude-code/bin/claude.exe "$prefix/node_modules/.bin/claude"+`++func useFakeCommands(t *testing.T, scripts map[string]string) {+ t.Helper()+ bin := t.TempDir()+ for name, script := range scripts {+ if err := os.WriteFile(filepath.Join(bin, name), []byte(script), 0o755); err != nil {+ t.Fatal(err)+ }+ }+ t.Setenv("PATH", bin+string(os.PathListSeparator)+"/usr/bin:/bin")+}++func TestEnsureClaudeCodeInstallsPinnedReleaseOnce(t *testing.T) {+ root := t.TempDir()+ log := filepath.Join(t.TempDir(), "npm.log")+ t.Setenv("AGENTFLOW_RUNTIME_CLI_DIR", root)+ t.Setenv("NPM_TEST_LOG", log)+ useFakeCommands(t, map[string]string{"npm": fakeNPM})+ for range 2 {+ binary, err := EnsureClaudeCode(context.Background())+ if err != nil {+ t.Fatal(err)+ }+ if binary != claudeCodeBinary(root) {+ t.Fatalf("binary %q", binary)+ }+ }+ calls, _ := os.ReadFile(log)+ if strings.Count(string(calls), "\n") != 1 || !strings.Contains(string(calls), "@anthropic-ai/claude-code@"+ClaudeCodeVersion) {+ t.Fatalf("npm calls: %s", calls)+ }+ if target, err := os.Readlink(filepath.Join(ClaudeCodeBinDir(), "claude")); err != nil || !strings.HasSuffix(target, "claude.exe") {+ t.Fatalf("bin link %q %v", target, err)+ }+ if info, err := os.Stat(filepath.Join(root, "claude-code", ClaudeCodeVersion)); err != nil || info.Mode().Perm() != 0o755 {+ t.Fatalf("sandboxes cannot read the installation: %v %v", info, err)+ }+ if staged, _ := filepath.Glob(filepath.Join(root, "claude-code", ".install-*")); len(staged) != 0 {+ t.Fatalf("staging directories left behind: %v", staged)+ }+}++func TestEnsureClaudeCodeReportsInstallFailureWithoutActivating(t *testing.T) {+ root := t.TempDir()+ t.Setenv("AGENTFLOW_RUNTIME_CLI_DIR", root)+ t.Setenv("NPM_TEST_LOG", filepath.Join(t.TempDir(), "npm.log"))+ t.Setenv("NPM_TEST_FAIL", "1")+ useFakeCommands(t, map[string]string{"npm": fakeNPM})+ if _, err := EnsureClaudeCode(context.Background()); err == nil || !strings.Contains(err.Error(), "registry unreachable") {+ t.Fatalf("error %v", err)+ }+ if _, err := os.Stat(filepath.Join(root, "claude-code", ClaudeCodeVersion)); !os.IsNotExist(err) {+ t.Fatalf("failed install was activated: %v", err)+ }+}++func TestResolveClaudeCodePrefersPathAndRequiresInstallDir(t *testing.T) {+ t.Setenv("AGENTFLOW_RUNTIME_CLI_DIR", "")+ useFakeCommands(t, nil)+ if _, err := ResolveClaudeCode(context.Background()); err == nil {+ t.Fatal("missing CLI without an install directory must fail")+ }+ useFakeCommands(t, map[string]string{"claude": "#!/bin/sh\n"})+ if path, err := ResolveClaudeCode(context.Background()); err != nil || filepath.Base(path) != "claude" {+ t.Fatalf("PATH claude: %q %v", path, err)+ }+}++func TestDockerSandboxRunsOnDemandClaudeCodeFromMountedDirectory(t *testing.T) {+ root := t.TempDir()+ log := filepath.Join(t.TempDir(), "docker.log")+ t.Setenv("AGENTFLOW_ISOLATED_IMAGE", "loopforge-platform:tested")+ t.Setenv("AGENTFLOW_RUNTIME_CLI_DIR", root)+ t.Setenv("NPM_TEST_LOG", filepath.Join(t.TempDir(), "npm.log"))+ t.Setenv("DOCKER_TEST_LOG", log)+ useFakeCommands(t, map[string]string{"npm": fakeNPM, "docker": `#!/bin/sh+printf '%s\n' "$*" >> "$DOCKER_TEST_LOG"+case "$*" in+ "image inspect loopforge-platform:tested") exit 0 ;;+ "inspect "*) exit 1 ;;+ "exec "*) echo /workspace ;;+esac+`})+ sandbox := &dockerSandbox{id: "claude-test", name: "agentflow-claude-test", workspace: t.TempDir(), dockerfile: domain.DockerfileDefinition{Content: IsolatedDockerfile}}+ if err := sandbox.ensureStarted(context.Background()); err != nil {+ t.Fatal(err)+ }+ commands, _ := os.ReadFile(log)+ if !strings.Contains(string(commands), "--mount type=bind,src="+root+",dst="+root+",readonly") {+ t.Fatalf("runtime CLI directory not mounted read-only: %s", commands)+ }+ for _, test := range []struct {+ command CommandSpec+ want string+ }{+ {CommandSpec{Provider: "claude-code", Argv: []string{"claude", "-p", "hi"}}, ClaudeCodeBinDir()},+ {CommandSpec{Provider: "claude-code", Argv: []string{"/custom/claude", "-p"}}, ""},+ {CommandSpec{Provider: "codex", Argv: []string{"codex", "exec"}}, ""},+ } {+ got, err := sandbox.onDemandCLIPath(context.Background(), test.command)+ if err != nil || got != test.want {+ t.Fatalf("%v: %q %v", test.command.Argv, got, err)+ }+ }+ if !fileIsExecutable(claudeCodeBinary(root)) {+ t.Fatal("Claude Code was not installed before the sandbox exec")+ }+ custom := &dockerSandbox{dockerfile: domain.DockerfileDefinition{Content: "FROM custom\n"}}+ if got, _ := custom.onDemandCLIPath(context.Background(), CommandSpec{Provider: "claude-code", Argv: []string{"claude"}}); got != "" {+ t.Fatalf("custom images keep their own Claude Code: %q", got)+ }+ if !strings.Contains(dockerMCPCallLaunch, "PATH=$PATH:$AGENTFLOW_RUNTIME_CLI_PATH") {+ t.Fatal("on-demand CLIs must be appended after the image PATH")+ }+}diff --git a/internal/runtime/sandbox_docker.go b/internal/runtime/sandbox_docker.goindex 52809601..d2116092 100644--- a/internal/runtime/sandbox_docker.go+++ b/internal/runtime/sandbox_docker.go@@ -145,6 +145,13 @@ func (s *dockerSandbox) execOnce(ctx context.Context, command CommandSpec, sinkfor _, environment := range appendEnvironment(nil, s.profile.Environment, command.environment) {args = append(args, "-e", environment)}+ cliPath, err := s.onDemandCLIPath(ctx, command)+ if err != nil {+ return "", err+ }+ if cliPath != "" {+ args = append(args, "-e", "AGENTFLOW_RUNTIME_CLI_PATH="+cliPath)+ }args = append(args, s.name)args = append(args, dockerWorkspaceExecArgv(command.Argv)...)return runCommand(exec.CommandContext(ctx, "docker", args...), sink)@@ -168,8 +175,25 @@ if [ -x /workspace/.agentflow/runtime/bin/agentflow ]; thenPATH=/workspace/.agentflow/runtime/bin:$PATHexport PATHfi+if [ -n "${AGENTFLOW_RUNTIME_CLI_PATH:-}" ] && [ -d "$AGENTFLOW_RUNTIME_CLI_PATH" ]; then+ PATH=$PATH:$AGENTFLOW_RUNTIME_CLI_PATH+ export PATH+fi`+// onDemandCLIPath installs Claude Code for sandboxes of the published runtime+// image, which does not bundle it, and returns the mounted bin directory. It is+// appended to PATH so a CLI shipped by an older image still takes precedence.+func (s *dockerSandbox) onDemandCLIPath(ctx context.Context, command CommandSpec) (string, error) {+ if command.Provider != "claude-code" || len(command.Argv) == 0 || command.Argv[0] != "claude" || RuntimeCLIDir() == "" || isolatedRuntimeImage(s.dockerfile) == "" {+ return "", nil+ }+ if _, err := EnsureClaudeCode(ctx); err != nil {+ return "", err+ }+ return ClaudeCodeBinDir(), nil+}+func dropShellLoginFlag(argv []string) []string {if len(argv) == 0 {return argv@@ -629,6 +653,12 @@ func (s *dockerSandbox) ensureStarted(ctx context.Context) error {return err}args = append(args, stateArgs...)+ if cliDir := RuntimeCLIDir(); cliDir != "" && image == isolatedRuntimeImage(s.dockerfile) {+ if err := os.MkdirAll(cliDir, 0o755); err != nil {+ return fmt.Errorf("prepare runtime CLI directory: %w", err)+ }+ args = append(args, "--mount", "type=bind,src="+cliDir+",dst="+cliDir+",readonly")+ }if p.ReadOnlyRootFS {args = append(args, "--read-only", "--tmpfs", "/tmp:rw,noexec,nosuid,size=256m")}diff --git a/scripts/test-runtime-image.sh b/scripts/test-runtime-image.shindex 7d82fbe5..69f3f165 100755--- a/scripts/test-runtime-image.sh+++ b/scripts/test-runtime-image.sh@@ -22,7 +22,7 @@ git --versionssh -Vunzip -v >/dev/nullcodex --version-claude --version+if command -v claude >/dev/null; then printf 'Claude Code must not be bundled; it installs on first use.\n' >&2; exit 1; ficodebuddy --versionprintf 'Runtime image compatibility checks passed.\n'CHECK