feat(agent): migrate OpenCode 2 runtime and sandbox tools
Upgrade the runtime and native plugin API to OpenCode 2.0.24. Restore session-scoped learning, credential renewal, typed project queries and controlled frontend actions from the legacy Agent. Replace host Shell execution with an approved Landlock/seccomp executor and persistent per-session workspaces. Add typed Bocha search and Tianditu geocoding bridges using the owning session credential. Require a working kernel sandbox before startup and persist workspace files in deployments. Validation completed before this commit: TypeScript checks, 150 Bun tests, Docker build and UID 10001 sandbox execution, native Shell approval and session recovery. Tianditu succeeded; Bocha currently reports exhausted account quota. Unrelated investigation-report contract work is excluded.
This commit is contained in:
+6
-1
@@ -20,7 +20,9 @@ RUN sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http:/
|
||||
jq \
|
||||
unzip \
|
||||
python3 \
|
||||
python3-venv && \
|
||||
python3-venv \
|
||||
libseccomp2 \
|
||||
ripgrep && \
|
||||
ln -sf /usr/bin/python3 /usr/local/bin/python && \
|
||||
mkdir -p /root/.config/pip && \
|
||||
printf "[global]\nindex-url = %s\ntrusted-host = %s\n" "$PIP_INDEX_URL" "$PIP_TRUSTED_HOST" > /root/.config/pip/pip.conf && \
|
||||
@@ -43,6 +45,8 @@ RUN sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http:/
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=bun-bin /usr/local/bin/bun /usr/local/bin/bun
|
||||
ENV PATH="/root/.bun/bin:$PATH"
|
||||
RUN bun add --global --trust --exact @opencode/cli@2.0.24 && opencode2 --version
|
||||
|
||||
FROM base AS deps
|
||||
|
||||
@@ -59,6 +63,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /app/.opencode/node_modules ./.opencode/node_modules
|
||||
COPY package.json bun.lock ./
|
||||
COPY tsconfig.json opencode.json README.md .gitignore ./
|
||||
COPY scripts ./scripts
|
||||
COPY src ./src
|
||||
COPY .opencode ./.opencode
|
||||
RUN bun run check
|
||||
|
||||
Reference in New Issue
Block a user