File size: 858 Bytes
bc0cd17
 
 
 
 
 
 
 
 
ece5049
bc0cd17
 
 
ece5049
 
 
bc0cd17
 
f822501
bc0cd17
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM node:22-bookworm-slim

ARG PI_VERSION=0.84.2

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates curl git openssh-client ripgrep \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/chat-ui-agent
COPY patch-pi-rpc.mjs /opt/chat-ui-agent/
RUN npm init -y \
    && npm install --omit=dev --no-audit --no-fund \
      "@earendil-works/pi-coding-agent@${PI_VERSION}" \
      "ws@8.21.3" \
    && node /opt/chat-ui-agent/patch-pi-rpc.mjs \
      /opt/chat-ui-agent/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js \
    && ln -s /opt/chat-ui-agent/node_modules/.bin/pi /usr/local/bin/pi

COPY bridge.mjs bridge-turn-fence.mjs runtime-health.mjs approval-gate.mjs approval-policy.mjs pi-args.mjs /opt/chat-ui-agent/

ENV PI_TELEMETRY=0
EXPOSE 7860
CMD ["node", "/opt/chat-ui-agent/runtime-health.mjs"]