@ai-support-agent/cli 0.0.23-beta.0 → 0.0.23-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/docker/Dockerfile +45 -23
  2. package/package.json +1 -1
package/docker/Dockerfile CHANGED
@@ -1,5 +1,8 @@
1
1
  FROM node:24-slim
2
2
 
3
+ # =============================================================================
4
+ # Layer 1: OS packages (most stable — rarely changes)
5
+ # =============================================================================
3
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
7
  ca-certificates curl unzip git openssh-client vim \
5
8
  default-mysql-client postgresql-client \
@@ -22,7 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
22
25
 
23
26
  ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
24
27
 
25
- # Python document processing tools (installed in system scope, no venv needed in container)
28
+ # =============================================================================
29
+ # Layer 2: Python tools (stable — version-pinned)
30
+ # =============================================================================
26
31
  RUN pip3 install --no-cache-dir --break-system-packages \
27
32
  # PDF: read, write, merge, split, extract text
28
33
  'pypdf>=6.7.2,<7' \
@@ -39,17 +44,9 @@ RUN pip3 install --no-cache-dir --break-system-packages \
39
44
  # Character encoding detection (for legacy files)
40
45
  chardet==5.*
41
46
 
42
- # Node.js document processing tools (global)
43
- RUN npm install -g \
44
- # Word (.docx) to HTML/markdown conversion
45
- mammoth@1 \
46
- # Excel (.xlsx) read/write (SheetJS community edition)
47
- xlsx@0.18 \
48
- # CSV parsing and generation
49
- csv-parse@5 csv-stringify@6 \
50
- # Markdown to HTML and vice versa
51
- marked@15 turndown@7 \
52
- && npm cache clean --force
47
+ # =============================================================================
48
+ # Layer 3: System CLIs and tools (stable — external binary downloads)
49
+ # =============================================================================
53
50
 
54
51
  # AWS CLI v2
55
52
  RUN curl -fSL "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o /tmp/awscliv2.zip \
@@ -78,38 +75,63 @@ RUN ARCH=$(dpkg --print-architecture) && \
78
75
  fi
79
76
  ENV PATH="$PATH:/opt/mssql-tools18/bin"
80
77
 
81
- # GitHub CLI
78
+ # GitHub CLI + GitLab CLI (combined to reduce apt-get update calls)
82
79
  RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
83
80
  -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
84
81
  && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
85
82
  > /etc/apt/sources.list.d/github-cli.list \
86
83
  && apt-get update \
87
84
  && apt-get install -y --no-install-recommends gh \
88
- && rm -rf /var/lib/apt/lists/*
89
-
90
- # GitLab CLI
91
- RUN ARCH=$(dpkg --print-architecture) \
85
+ && rm -rf /var/lib/apt/lists/* \
86
+ && ARCH=$(dpkg --print-architecture) \
92
87
  && GLAB_VERSION=$(curl -sL "https://gitlab.com/api/v4/projects/34675721/releases/permalink/latest" | sed -n 's/.*"tag_name":"v\([^"]*\)".*/\1/p') \
93
88
  && curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_${ARCH}.deb" \
94
89
  -o /tmp/glab.deb \
95
90
  && dpkg -i /tmp/glab.deb \
96
91
  && rm /tmp/glab.deb
97
92
 
93
+ # =============================================================================
94
+ # Layer 4: Node.js global tools (stable — version-pinned)
95
+ # =============================================================================
96
+ RUN npm install -g \
97
+ # Word (.docx) to HTML/markdown conversion
98
+ mammoth@1 \
99
+ # Excel (.xlsx) read/write (SheetJS community edition)
100
+ xlsx@0.18 \
101
+ # CSV parsing and generation
102
+ csv-parse@5 csv-stringify@6 \
103
+ # Markdown to HTML and vice versa
104
+ marked@15 turndown@7 \
105
+ && npm cache clean --force
106
+
98
107
  # code-server (VS Code Server)
99
108
  RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/usr/local \
100
109
  && code-server --version
101
110
 
102
- # Claude Code CLI + AI Support Agent CLI + Backlog MCP Server
111
+ # Playwright: install Chromium browser binary + OS dependencies (fonts, libX11, etc.)
112
+ # Browser binary is architecture-independent and rarely changes, so cache it before npm packages.
113
+ # The playwright npm package will be installed later as peer of @ai-support-agent/cli.
114
+ # Use /opt/playwright-browsers so all users (root, node, arbitrary UID) can access the browser.
115
+ ENV PLAYWRIGHT_BROWSERS_PATH=/opt/playwright-browsers
116
+ RUN npx playwright install --with-deps chromium \
117
+ && chmod -R 755 /opt/playwright-browsers
118
+
119
+ # =============================================================================
120
+ # Layer 5: Application packages (changes on every version bump)
121
+ # ARG placed here so layers above remain cached when AGENT_VERSION changes.
122
+ # =============================================================================
103
123
  ARG AGENT_VERSION=latest
104
124
  RUN npm install -g @anthropic-ai/claude-code @ai-support-agent/cli@${AGENT_VERSION} backlog-mcp-server \
105
125
  && npm cache clean --force
106
126
 
107
- # Playwright (Chromium only) install as peer of @ai-support-agent/cli so require('playwright') resolves
108
- # 1. Install playwright package next to the CLI's node_modules
109
- # 2. Install Chromium browser binary + OS dependencies (fonts, libX11, etc.)
127
+ # Install playwright npm package as peer of @ai-support-agent/cli so require('playwright') resolves.
128
+ # Browser binary is already installed above; this only adds the Node.js bindings (~3MB).
110
129
  RUN cd /usr/local/lib/node_modules/@ai-support-agent/cli \
111
- && npm install playwright \
112
- && npx playwright install --with-deps chromium
130
+ && npm install playwright
131
+
132
+ # =============================================================================
133
+ # Layer 6: Permissions and runtime setup (lightweight, changes rarely)
134
+ # =============================================================================
113
135
 
114
136
  # Fix npm cache/global directory permissions for runtime user (may run as non-root)
115
137
  # The npm cache and global lib are created as root during build; runtime updates need write access.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-support-agent/cli",
3
- "version": "0.0.23-beta.0",
3
+ "version": "0.0.23-beta.1",
4
4
  "description": "AI Support Agent CLI client",
5
5
  "main": "dist/index.js",
6
6
  "bin": {