Skip to content

Add acpbox to bobshell image, preconfigured to run bob acp - #56

Merged
jonpspri merged 1 commit into
mainfrom
bobshell-acpbox
Oct 13, 2026
Merged

jonpspri merged 1 commit into
mainfrom
bobshell-acpbox

Conversation

@jonpspri

Copy link
Copy Markdown
Collaborator

Summary

Adds the acpbox executable to the infra/bobshell image: an OpenAI-compatible HTTP gateway to the Agent Client Protocol, installed from PyPI on UBI 10's Python 3.12. The image is preconfigured so acpbox spawns one bob acp --trust process per gateway worker, exposing Bob Shell behind an OpenAI-style /v1 API on TCP 8080.

Changes

  • Containerfile
    • New layer: microdnf install python3 python3-pip → pip3 install acpbox (system-wide, /usr/local/bin/acpbox) → pip removed + dnf cache cleaned to keep the runtime image lean
    • ARG ACPBOX_VERSION pin, mirroring the existing BOB_VERSION pattern
    • ENV ACPBOX_ACP_COMMAND='["bob","acp","--trust"]' and ACPBOX_ACP_WORKSPACE=/workspace (acpbox's ./workspace default would wrongly resolve to /workspace/workspace here)
    • EXPOSE 8080 documenting the OpenAI-compatible API port
  • README.md — acpbox bullet (incl. --trust rationale) and ACPBOX_VERSION pinning example

Gotchas found (documented in Containerfile comments)

  1. Docker ENV quoting: ENV X=["bob","acp"] loses its inner double quotes to Docker's parser, producing invalid JSON that crashes acpbox at startup. Single quotes survive.
  2. bob acp ignores ~/.bob/trustedFolders.json (tested both TRUST_PARENT and TRUST_FULL), so --trust is the only headless path. Blast radius stays /workspace: acpbox pins every session's cwd to ACPBOX_ACP_WORKSPACE, and API clients cannot choose it.

Verification (built and smoke-tested locally)

  • docker build passes, including in-build command -v acpbox and python3 -c "import acpbox.main" checks
  • As runtime user 1001: acpbox boots, logs Starting ACP agent (one per worker): ['bob', 'acp', '--trust'], reaches Application startup complete, serves http://0.0.0.0:8080
  • GET /v1/models completes the ACP handshake and session creation in /workspace (trust accepted), failing only on Authentication required — expected without BOB_API_KEY, which the compose setup supplies via secrets
  • bob chat/bob --version paths unchanged (2.0.6)

Install acpbox (OpenAI-compatible HTTP gateway to the Agent Client
Protocol) from PyPI on UBI Python 3.12, and preconfigure it to spawn
one 'bob acp --trust' process per gateway worker with sessions rooted
at the pre-trusted /workspace. Expose TCP 8080 (acpbox's default
OpenAI-compatible API port). pip is removed after install to keep the
runtime image lean; ACPBOX_VERSION build arg pins the package.

Notes:
- ACPBOX_ACP_COMMAND uses single quotes because Docker's ENV parser
  strips inner double quotes, corrupting the JSON array.
- 'bob acp' rejects untrusted workspaces and does not read
  trustedFolders.json, so --trust is required headless; acpbox pins
  the session cwd, so only /workspace is trusted in practice.

Signed-off-by: Jonathan Springer <jps@s390x.com>
@jonpspri
jonpspri merged commit cc2e11b into main Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant