Repository navigation
feat: add MCP onboarding and prepare 0.3.3 - #24
Merged
Merged
Conversation
Marionette's chrome sandbox exposes Services, Cc, and Ci, but cannot load resource:// modules on Zen 1.24b, so the explicit Services import failed before ownership could be proven. Read the environment through the sandbox globals, fall back to nsIEnvironment when Services is hidden, and fail with a clear message when neither is available. Refs #15
Batch verification can paint and record two highlights on the same tab at once. Interleaved steps left an overlay host that clear could not find in the live suite. Evidence and clear now run through a per-tab lock so the paint and record sequence for one quote finishes before the next starts.
Set ZEN_MCP_TEST_HEADFUL=1 to drop --headless. Isolation still comes from the launcher's own -no-remote, so the visible run exercises the production launch path instead of a test-only shortcut.
Add live checks for background tab activation, evidence re-highlighting from Show source, Stop from the progress card, split view cleanup, and essentials keeping their original space. Each check drives the real bridge UI and asserts the user-visible result, not just the tool response. Covers #16, #17, #18, #19, #23
`zen-mcp onboard` lists the supported MCP clients, preselects the ones found on this machine, and merges only the `zen-mcp` stdio entry into each selected client's configuration. Standard JSON clients get `mcpServers`, VS Code gets `servers` with `type: stdio`, Zed gets `context_servers`, and Codex gets `[mcp_servers.zen-mcp]`. JSON files are merged key by key. JSONC files are spliced in place so comments and trailing commas survive, and TOML tables are replaced without touching other servers. Rerunning updates the existing entry instead of adding a duplicate, and an invalid file is reported without being written. `--clients` skips the picker for scripts and non-TTY shells, `--command` sets the command clients should run, and `--clients other` prints a paste-ready runbook with paths, entry shapes, merge rules, validation, and a completion report. Tests cover detection and paths, JSON and JSONC merges, TOML merges, invalid files, picker movement and toggling, and the runbook. README and configuration docs describe the command.
Bump the package, lockfile, README tarball example, and advertised server version to 0.3.3. Complete the changelog with the onboarding picker and every fix since 0.3.2: launch ownership and error reporting, POSIX process names, tab focus, evidence repaint, essentials, split cleanup, evidence matching, batch audit, Stop delivery, and per-tab evidence serialization.
Resolve the tab's current URL and require http(s) plus the domain allowlist before calling Zen's Glance manager. Pass a content principal for the URL instead of the system principal, and keep the host pre-check for explicit URLs. Adds fake-manager unit coverage and a live regression for allowed and privileged tabs.
Reject malformed safety settings and unrecognized safety environment values instead of falling back to a weaker policy. Block the three UI card tools in read-only mode, and cap tab-id arrays at 100 per call. Updates the docs and changelog for 0.3.3.
The host re-checked the URL it requested, so a redirect could leave the allowlist after Glance opened. Read the committed glance URL, close the preview when it is outside the list, and keep watching location changes for a later redirect. Malformed autoLaunch and autoAttachWindows values now stop startup instead of falling back to true.
Owner
Author
|
The macOS Node 24 job was auto-cancelled twice after 15 minutes in the queue with no runner assigned (runner_name and runner_group are empty, zero steps). The other five checks pass on this commit, including macOS Node 22 and Node 24 on Windows and Ubuntu. This is a GitHub runner scheduling failure, not a test failure, so we are merging with macOS Node 22 as the macOS evidence. |
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.
Summary
zen-mcp onboard, which finds common MCP clients, preselects them, and merges azen-mcpstdio server into each selected config. Existing servers, JSONC comments, trailing commas, and TOML tables are preserved, and rerunning updates the entry instead of duplicating it.Security fixes
http(s), checks the allowlist before the preview loads, and uses a content principal instead of the system principal. After the preview opens, the bridge reads the URL that actually committed; if it is outside the allowlist, the preview is closed and the call fails. A location change watch closes the preview if a later redirect leaves the list.autoLaunchandautoAttachWindows.zen_progress,zen_ask, andzen_notifyare mutating tools, so read-only mode blocks them.zen_tabs_close,zen_folder_create, andzen_folder_add_tabscaptabIdsat 100, surfaced asmaxItemsin the tool schemas.Known residual: an initial request to a redirect target can reach that host before Glance reads the committed URL and closes the preview, because the remote server decides the redirect. The allowlist prevents the preview from staying open or returning the off-list URL.
Test plan
npm run typechecknpm run buildnpm test: 279 tests, 274 pass, 5 skipped, 0 failZEN_MCP_E2E=1 npm run test:zen: 40/40 live checks on Windows with Zen 1.24bzen-mcp --versionreports 0.3.3,doctorpasses,onboard --helplists every clientThe live Zen suite is not part of CI. Nothing is tagged or published by this PR.