From 746613fd2ea9ae33d38f34bae4249d0a883b372a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:32:40 +0000 Subject: [PATCH 1/7] Add CI and release GitHub Actions workflows - ci.yml: runs lint, tests, and build on PRs against main (Node 18 & 20) - release.yml: packages the extension as .vsix and attaches it to the GitHub release https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- .github/workflows/ci.yml | 27 ++++++++++++++++++++++++++ .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ecc0620 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - run: npm ci + + - run: npm run lint + + - run: npm test + + - run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ad5d187 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + release: + types: [created] + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - run: npm ci + + - run: npm test + + - run: npm run build + + - name: Install vsce + run: npm install -g @vscode/vsce + + - name: Package extension + run: vsce package --out opencode-for-devcontainers-${{ github.event.release.tag_name }}.vsix + + - name: Upload .vsix to release + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "${{ github.event.release.tag_name }}" opencode-for-devcontainers-${{ github.event.release.tag_name }}.vsix From 7d60ee53d4f1882b8db178dad81512f868046d4e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:34:11 +0000 Subject: [PATCH 2/7] Remove extraneous npm-publish-github-packages workflow Superseded by the new ci.yml and release.yml workflows. https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- .../workflows/npm-publish-github-packages.yml | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml deleted file mode 100644 index ea2d329..0000000 --- a/.github/workflows/npm-publish-github-packages.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm test - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 497a68ad9ddff7d7eff28114d84faf175491ff01 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:36:27 +0000 Subject: [PATCH 3/7] Add ESLint configuration file The CI lint step failed because no ESLint config existed in the repo. https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- .eslintrc.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..27e1f74 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off" + }, + "ignorePatterns": ["dist/", "node_modules/", "esbuild.js"] +} From 61c381ae4aebe683c73c9ed82c55118f23b4bb03 Mon Sep 17 00:00:00 2001 From: Eric Nagley Date: Fri, 13 Feb 2026 01:38:04 -0500 Subject: [PATCH 4/7] Potential fix for code scanning alert no. 6: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecc0620..a38b537 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest From f65e50048dcd91696dc643a915af3c31929568f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:40:18 +0000 Subject: [PATCH 5/7] Allow underscore-prefixed unused params in ESLint config The mock file uses _-prefixed parameters to match VS Code interfaces without using them, which is standard practice for stubs. https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 27e1f74..a12b789 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,8 @@ "plugin:@typescript-eslint/recommended" ], "rules": { - "@typescript-eslint/no-explicit-any": "off" + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }] }, "ignorePatterns": ["dist/", "node_modules/", "esbuild.js"] } From 7212d5a5e1a6b6ed14205af5b4873548ffc03328 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:42:46 +0000 Subject: [PATCH 6/7] Remove unused imports flagged by ESLint https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- src/chat/opencodeBridge.test.ts | 2 +- src/chat/responseRenderer.test.ts | 2 +- src/chat/subagentTracker.test.ts | 1 - src/devcontainerManager.test.ts | 1 - src/devcontainerManager.ts | 2 +- src/shellWrapper.test.ts | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/chat/opencodeBridge.test.ts b/src/chat/opencodeBridge.test.ts index e1da6e3..0b7e075 100644 --- a/src/chat/opencodeBridge.test.ts +++ b/src/chat/opencodeBridge.test.ts @@ -7,7 +7,7 @@ import { Uri, EventEmitter, } from "../__mocks__/vscode"; -import { OpenCodeBridge, BridgeState } from "./opencodeBridge"; +import { OpenCodeBridge } from "./opencodeBridge"; import { DevcontainerState } from "../devcontainerManager"; import { Readable, Writable } from "stream"; diff --git a/src/chat/responseRenderer.test.ts b/src/chat/responseRenderer.test.ts index 0d3aecf..ac078aa 100644 --- a/src/chat/responseRenderer.test.ts +++ b/src/chat/responseRenderer.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, vi } from "vitest"; import { __resetMocks, __setMockConfig } from "../__mocks__/vscode"; import { ResponseRenderer } from "./responseRenderer"; -import { OpenCodeEvent, SubagentInfo, AgentConfig } from "./types"; +import { SubagentInfo, AgentConfig } from "./types"; let renderer: ResponseRenderer; let stream: { diff --git a/src/chat/subagentTracker.test.ts b/src/chat/subagentTracker.test.ts index 0f59aeb..a46c7f1 100644 --- a/src/chat/subagentTracker.test.ts +++ b/src/chat/subagentTracker.test.ts @@ -1,7 +1,6 @@ import { describe, it, expect, beforeEach, vi } from "vitest"; import { __resetMocks } from "../__mocks__/vscode"; import { SubagentTracker } from "./subagentTracker"; -import { OpenCodeEvent } from "./types"; let tracker: SubagentTracker; diff --git a/src/devcontainerManager.test.ts b/src/devcontainerManager.test.ts index b7983a8..7306184 100644 --- a/src/devcontainerManager.test.ts +++ b/src/devcontainerManager.test.ts @@ -1,5 +1,4 @@ import { describe, it, expect, beforeEach, vi } from "vitest"; -import * as childProcess from "child_process"; import { __resetMocks, __setMockConfig, diff --git a/src/devcontainerManager.ts b/src/devcontainerManager.ts index 9131a47..671a1fd 100644 --- a/src/devcontainerManager.ts +++ b/src/devcontainerManager.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode"; -import { ChildProcess, exec, spawn } from "child_process"; +import { exec } from "child_process"; import * as path from "path"; import * as fs from "fs"; import { getConfig, getWorkspaceFolder } from "./config"; diff --git a/src/shellWrapper.test.ts b/src/shellWrapper.test.ts index 2905efe..3568def 100644 --- a/src/shellWrapper.test.ts +++ b/src/shellWrapper.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeEach, afterEach, vi } from "vitest"; +import { describe, it, expect, beforeEach, afterEach } from "vitest"; import * as fs from "fs"; import * as os from "os"; import * as path from "path"; From eb2d5c42161ea609af58638ab201c65a18bf8f75 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 06:44:24 +0000 Subject: [PATCH 7/7] Drop Node 18 from CI matrix Node 18 is EOL; only test against Node 20. https://claude.ai/code/session_01JdJYbYwMCDDaVMcmLiDSeA --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a38b537..fe28596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,15 +10,12 @@ permissions: jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18, 20] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 20 cache: npm - run: npm ci