feat: agent browser (#200)

* feat: agent browser

* chore: complete docker and action config

* feat: more actions

* feat: browser tab switch

* fix: browser build

* fix: lint

* fix: migrations
This commit is contained in:
Acbox Liu
2026-03-07 15:06:00 +08:00
committed by GitHub
parent 21999b49f4
commit bafd327b6b
67 changed files with 3586 additions and 47 deletions
+34
View File
@@ -0,0 +1,34 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM oven/bun:1 AS builder
WORKDIR /build
COPY apps/browser/package.json apps/browser/bun.lock* ./apps/browser/
COPY packages/config/package.json ./packages/config/package.json
RUN echo '{"name":"@memoh/monorepo","private":true,"workspaces":["apps/*","packages/*"]}' > package.json
RUN cd apps/browser && bun install
COPY packages/config/ ./packages/config/
COPY apps/browser/ ./apps/browser/
RUN cd apps/browser && bun run build
FROM mcr.microsoft.com/playwright:v1.50.0-noble
WORKDIR /app
COPY --from=builder /build/apps/browser/dist /app/dist
COPY --from=builder /build/apps/browser/node_modules /app/node_modules
COPY --from=builder /build/apps/browser/package.json /app/package.json
COPY --from=builder /build/node_modules /node_modules
RUN npx playwright install --with-deps chromium
EXPOSE 8083
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD curl -sf http://127.0.0.1:8083/health || exit 1
CMD ["node", "dist/index.js"]