diff --git a/BUGS.md b/BUGS.md new file mode 100644 index 000000000..a92116f23 --- /dev/null +++ b/BUGS.md @@ -0,0 +1,3 @@ +# Bug tracker + +Full bug list: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd7d1de9..6ccc74709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # aicodeman +## 20260925-1326 + +- Added optional clipboard support alongside the GitHub CLI in Docker images. + ## 1.33.0 ### Minor Changes diff --git a/docker/README.md b/docker/README.md index 87aa2f2de..eef4a2b61 100644 --- a/docker/README.md +++ b/docker/README.md @@ -94,6 +94,10 @@ They are not `.env` settings: turning a CLI on is a per-host choice, which is wh The Azure CLI is the large one, about 600 MB of the roughly 670 MB the pair adds. A CLI left off leaves nothing functional behind: no apt repository, no package, no `azure-devops` extension and no credential-helper entry, so git for that host behaves exactly as it does without this feature. With both off the image is functionally unchanged; it still carries the `AZURE_EXTENSION_DIR` variable, an empty extensions directory and one small layer that copies and then removes the helper script. +When GitHub CLI is enabled, the images also install the small `xclip` helper so +`gh auth login` can copy its device-login code where an X11 clipboard is +available. It is not installed when `CODEMAN_INSTALL_GH=0`. + ### Signing in With a CLI on, the system Git configuration routes credentials through it: diff --git a/docker/agent.Dockerfile b/docker/agent.Dockerfile index f7b460580..262fe56b5 100644 --- a/docker/agent.Dockerfile +++ b/docker/agent.Dockerfile @@ -58,7 +58,10 @@ RUN set -eux; \ chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg; \ echo "deb [arch=${arch} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ > /etc/apt/sources.list.d/github-cli.list; \ - pkgs="${pkgs} gh"; \ + # GitHub CLI copies its device-login code with xclip when available. Keep + # this dependency inside the existing opt-in GitHub CLI branch so images + # without gh do not gain desktop-clipboard tooling. \ + pkgs="${pkgs} gh xclip"; \ fi; \ if [ "${CODEMAN_INSTALL_AZ}" = 1 ]; then \ curl -fsSL -o /etc/apt/keyrings/microsoft.asc \ diff --git a/docker/server.Dockerfile b/docker/server.Dockerfile index 09b4607a8..316f6b015 100644 --- a/docker/server.Dockerfile +++ b/docker/server.Dockerfile @@ -117,7 +117,10 @@ RUN set -eux; \ chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg; \ echo "deb [arch=${arch} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ > /etc/apt/sources.list.d/github-cli.list; \ - pkgs="${pkgs} gh"; \ + # GitHub CLI copies its device-login code with xclip when available. Keep + # this dependency inside the existing opt-in GitHub CLI branch so images + # without gh do not gain desktop-clipboard tooling. \ + pkgs="${pkgs} gh xclip"; \ fi; \ if [ "${CODEMAN_INSTALL_AZ}" = 1 ]; then \ curl -fsSL -o /etc/apt/keyrings/microsoft.asc \ diff --git a/test/agent-image-build-args-parity.test.ts b/test/agent-image-build-args-parity.test.ts index 030235a8f..fb617d0de 100644 --- a/test/agent-image-build-args-parity.test.ts +++ b/test/agent-image-build-args-parity.test.ts @@ -144,4 +144,11 @@ describe('optional gh / az in the agent image: both producers pass the same swit expect(dockerfile, file).toMatch(/^ARG CODEMAN_INSTALL_AZ=0$/m); } }); + + it('installs clipboard support only with the optional GitHub CLI', () => { + for (const file of ['../docker/agent.Dockerfile', '../docker/server.Dockerfile']) { + const dockerfile = readFileSync(fileURLToPath(new URL(file, import.meta.url)), 'utf-8'); + expect(dockerfile, file).toMatch(/if \[ "\$\{CODEMAN_INSTALL_GH\}" = 1 \]; then[\s\S]*?pkgs="\$\{pkgs\} gh xclip"/); + } + }); });