The plugin's MCP surface (dist/mcp/server.js, ~9.8MB) was never turned on
(the enable_mcp default was false, README says most users do not need it) and
its only consumer was .zcode-plugin's .mcp.json. Meanwhile every source change
had to rebuild and re-commit a fresh 9.8MB minified version — 129 versions,
~556MB of blob history — for a tool nobody used.
What goes away:
- .mcp.json, dist/mcp/server.js, scripts/build-plugin.mjs, the `build:plugin`
script, and the CI "Build MCP Plugin & Verify" step (and its bundle gate).
- plugin.json drops `mcpServers` and the `enable_mcp` userConfig: the plugin
now ships skills only.
- bump-version and the PR template stop rebuilding/reminding about the bundle.
What stays:
- The local MCP: `seal-use mcp` runs the stdio server from source/the binary,
and `seal-use mcp-config` still prints the snippet for Cursor/Claude
Desktop/Codex. src/server.ts keeps its in-process tests (6/6) — only the
"boot the packaged bundle" test is dropped, since there is no artifact.
- The embedded skill images in the compiled binary: build:binary still runs
generate-embedded-skill, so `seal-use skill install` writes all 6 real PNGs
(verified: 22 files, valid PNG signatures).
Docs updated (README, AGENTS, issue-pr rule, PR template, SKILL.md) so no
reference to dist/mcp or build:plugin remains outside historical proposals
and CHANGELOG.
The repo had no linter: style and hygiene were convention-only, and the
dead-symbol cleanup needed for noUnusedLocals was invisible until tsc was
reconfigured. Pin oxlint 1.86.0 as a devDependency, add `bun run lint`, and
run it in CI right after the type check. The codebase is at zero warnings,
and AGENTS.md documents the new gate.
- Gate rules push behind --yes at CLI and domain layers (fail-closed on
dryRun=false without confirm)
- Raise webhook replay partial failure as CliError so exit 1 survives
cli.ts exitCode overwrite; route webhook stdout through printJson for
exit-12 protection and --output-file support
- Narrow MCP read-only allowlist: drop config mode/lint (write forms are
indistinguishable under token-prefix matching; config get covers reads)
- Extract redactSensitiveText to core, extend credential patterns, apply
to HTTP sendError/500 and domain error messages
- Pass release TAG_NAME via env instead of inline ${{ }} interpolation
to close script injection through crafted tag names
- Track .zcodeignore so enterprise credential exclusions travel with the
repo
- Add .agents/rules/security-posture.md documenting usability-first
accepted risks (loopback adapter auth, update verification, mutation
command gates, skill dump stdout); register skill dump as a documented
stdout Markdown exception in AGENTS.md and cli-protocol.md
- Rebuild dist/mcp/server.js
ci.yml triggered on push/pull_request for both main and master. master does
not exist on the remote (GitHub's default is main, and the stale remote branch
was deleted), so that filter could never match.
Left alone deliberately: AGENTS.md and bump-version.ts referring to
codex/release-vX.Y.Z, which describe the naming pattern for future release
branches rather than a specific existing one.
The committed MCP bundle is the only thing that ships, but nothing checked
that it matched src/. The gate could not be added while CI ran
'bun-version: latest': that resolved to 1.4.2, and the minifier allocates
identifiers differently across Bun releases, so the runner rebuilt the
macOS/1.3.14-built bundle into different bytes — identical code, renamed
variables (N/S, A/I, q/p). Measured on #116.
Pin bun-version to 1.3.14 in both workflows, matching the local toolchain and
the @types/bun/bun-types already declared in package.json, then add the diff
gate alongside the existing boot check.
The boot check stays: a bundle that cannot start is invisible to a byte diff
when it is in sync with its broken source, which is exactly how #114 shipped.
CI disproved the freshness gate on the first run: an ubuntu rebuild of the
macOS-built committed dist/mcp/server.js differs, and the diff is entirely
minified identifier renaming (N->S, A->I, q->p) with identical code. The
minifier does not allocate names reproducibly across platforms and Bun
versions, so a byte-for-byte gate cannot work here without pinning the
toolchain and matching runners.
Keep the check that does hold: boot the freshly built bundle and complete an
MCP handshake. Booting is what #114 actually needed — the byte diff would not
have caught that bug either, since the broken bundle was in sync with its
broken source.
The committed bundle is the only thing that ships, but CI only checked that
it compiled — never that it matched src/, and never that it could start.
- Fail when a fresh build differs from the committed dist/mcp/server.js,
mirroring the existing dist/openapi.json gate, with the same actionable
error. This is viable now: the bundle is byte-reproducible with the current
toolchain (a rebuild of the committed file is byte-identical). Before the
#114 rebuild it was not, which is why this was previously left out.
- Keep booting the freshly built bundle through a handshake, since a bundle
that cannot start is invisible to source-level tests.
seal_cli could reach every CLI command, so its tool annotations had to be
all-or-nothing: destructiveHint true on a tool that mostly reads, which meant
clients could not auto-approve anything, and there was no way to gate the
mutating minority. Split it in two:
- seal_cli read-only, readOnlyHint true / destructiveHint false.
- seal_cli_write mutations, publishing, credential minting, self-update and
server commands; destructiveHint true.
The boundary is enforced rather than advertised. seal_cli runs only commands
on an explicit allow-list (84 entries, src/cli/read-only.ts) and fails closed
on anything unclassified, including commands added to the CLI later. Matching
reuses the CLI's own parseArgs and compares whole tokens, so a read prefix
cannot smuggle a mutation (corps listing is refused) and a bare allow-listed
command does not cover its subcommands. Refusals name seal_cli_write.
Deliberately excluded from the read-only set even though they look harmless:
anything writing local config (corps switch, config test-dir), minting or
printing credentials (auth keys, corps extract-keys), self-updating (update),
or standing up a long-running server (http, mcp, service run). seal-use
tool <name> is excluded too, since the 98-entry internal tool registry is not
itself classified.
A test asserts every allow-listed command still exists in the help registry,
so the list cannot silently rot.
Also, per the note that MCP is an optional, default-off path, the skill now
says so explicitly: the CLI is primary, a missing seal_cli* tool is the normal
default rather than a fault, and enabling it is the user's choice in the plugin
settings. Corrected skill docs that presented internal tool-registry names
(seal_webhook_get, seal_webhook_update, ...) as if they were MCP tools; the MCP
server exposes only the two seal_cli* tools.
CI: the MCP build step now boots the freshly built bundle and completes a
handshake, instead of only checking that it compiles. A bundle that cannot
start is invisible to source-level tests, which is how the previous unbootable
entry point shipped. No byte-for-byte dist diff gate here: the committed
bundle is not byte-reproducible with the current toolchain (~186 lines of drift
rebuilding the unmodified release commit), and such a gate would not have
caught that bug anyway, since the broken bundle was in sync with its source.