test: extension-host activation smoke (@vscode/test-cli)#2
Merged
Conversation
Real-VS-Code smoke proving the packaged extension activates, registers agentage.connectEditor, and contributes the default mcpUrl - the gap the vitest unit tests (logic-only, mocked vscode) can't cover. Wired into CI behind Xvfb; uploads the .vsix artifact for the e2e vscode project.
vreshch
added a commit
that referenced
this pull request
Jun 21, 2026
… your memory over MCP (#1) * feat: Agentage Memory VS Code extension v0.0.1 Connect VS Code to your Agentage Memory in the cloud and search it over MCP. - One command (Agentage: Search Memory): live search-as-you-type over memory.agentage.io/mcp (Streamable HTTP), opens the hit read-only. - OAuth 2.1 + PKCE + DCR sign-in; token in SecretStorage; loopback callback. - Gear (settings) + sign-out buttons in the search box; agentage.mcpUrl setting. - esbuild bundle, vitest unit tests, dual-registry (Marketplace + Open VSX) CI. - Official agentage rocket-A icon. * docs: add demo.gif of the search flow + wire into README * docs: rebuild demo.gif as a Copilot Chat scenario (Q3 milestones from memory) * refactor: Agentage extension - connect-only over MCP - Rename to Agentage (displayName + id 'agentage.agentage'); memory is the current scope, room to grow. - Add 'Agentage: Connect Memory to this editor': registers the MCP server with the host editor's AI (VS Code install deeplink; Cursor/Windsurf config files, merged not clobbered). VS Code/Cursor/Windsurf detection via env.uriScheme. - Remove the in-process Search Memory command + its client/auth/doc stack and the @modelcontextprotocol/sdk dependency (host editor handles MCP + OAuth). - Bundle 280KB -> 6.3KB; README/CHANGELOG/CONTRIBUTING rewritten. * chore: rename repo references to vscode-agentage * test: integration tests driving connectEditor against a mocked vscode + temp HOME Asserts the real command writes the correct mcp.json per host (Cursor url, Windsurf serverUrl, merge-preserving), opens the VS Code mcp/install deeplink, handles unknown hosts, and honors agentage.mcpUrl. * fix: pre-submission review - P0 config-clobber + P1s - P0: mergeServer now throws ConfigParseError on an unparseable/odd-shaped existing config; connectEditor refuses to write and offers Open/Copy instead (no data loss). - P1: stripJsonc handles trailing commas string-aware (no more corrupting values containing ',}'); array/non-object guards. - P1: fold VSCodium into the mcp/install deeplink; actionable manual fallback with Setup guide + recovery buttons; relabel Open-config button to the file name. - P1: engines.vscode ^1.99.0 (was ^1.85.0) + README note that one-click needs 1.101+. - P2: publish.yml tag<->version assert; ci.yml vsce-package gate. - Tests: 13 core + 7 integration (clobber-safety, comma round-trip, VSCodium deeplink). * chore: align with golden-standard (prettier-vscode) - esbuild problem-matcher, gh release on publish, drop stale vsce flag * feat: auto-install the MCP server on setup (no command needed) - VS Code: native MCP provider (contributes.mcpServerDefinitionProviders + registerMcpServerDefinitionProvider, stable since 1.99) registered at activation (onStartupFinished) - the server appears in the MCP list automatically; VS Code runs OAuth on first use (one-time trust + sign-in; auth'd servers don't auto-start). - Cursor/Windsurf: autoConnectForks writes their config silently + idempotently on activation (hasServerEntry skip; never clobbers; errors swallowed). - Manual command kept for re-connect / unknown forks. engines stays ^1.99.0. - Tests: 15 core + 3 provider + 10 connect-editor = 28. README/CHANGELOG/CONTRIBUTING updated. * ci: re-trigger checks * test: add extension-host activation smoke (@vscode/test-cli) (#2) Real-VS-Code smoke proving the packaged extension activates, registers agentage.connectEditor, and contributes the default mcpUrl - the gap the vitest unit tests (logic-only, mocked vscode) can't cover. Wired into CI behind Xvfb; uploads the .vsix artifact for the e2e vscode project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a real-VS-Code extension-host smoke so a broken
activate()/ manifest / regression can't ship green — the gap the vitest unit tests (logic-only, mockedvscode) can't cover.test-host/activation.test.js(@vscode/test-cli): the packaged extension activates, registersagentage.connectEditor, the command launches, andagentage.mcpUrldefaults to the prod endpoint.test:hostscript; CI runs it behind Xvfb and uploads the packaged.vsixas theagentage-vsixartifact for the e2evscodeproject..vscodeignorekeepstest-host/+ the runner out of the published package.Verified
npm run test:host→ 4/4 green against real VS Code 1.125.1 (local,DISPLAY=:0).npm test(vitest) still green (20);npx vsce package→ 8 files, notest-hostleak.Note
On the VS Code path
connectEditorawaits a user info-dialog that never resolves headlessly, so R3 asserts "launches without rejecting early" (handler runs), not full resolution. Driving the OS install dialog is out of scope.Part of the
vscode-connect-e2efeature (T01). Stacks on #1.