Releases: GCS-ZHN/mcp-sentinel
Release list
v1.2.0
v1.1.0
v0.4.1
Bug Fixes
-
Session expiry reconnection (#1): MCP Streamable HTTP sessions that expire (HTTP 404 "Session not found") now trigger automatic reconnection. The dead client is evicted from the connection cache, a fresh transport is created, and the failed tool call is retried exactly once. Previously, expired sessions caused the sentinel to fail permanently with no recovery path.
Per the MCP Streamable HTTP spec § Session Management, clients MUST re-initialize when receiving HTTP 404 with a session ID. The
@modelcontextprotocol/sdkthrowsStreamableHTTPErroron 404 but does not auto-reconnect — this plugin now fulfills that obligation.
Features
- Resilient reconnection:
callToolhandles transient network errors (ECONNREFUSED, ECONNRESET, ETIMEDOUT,fetch failed) and server faults (5xx) by reconnecting and retrying once. - Concurrency safety:
getOrCreateClientuses promise-sharing to deduplicate concurrent connection attempts. AWeakMapfallback prevents the second concurrent poll from failing when another poll already evicted the dead client — critical for multi-session environments. - Mock server HTTP mode:
tests/mock-mcp-server.ts --transport=httpsupports Streamable HTTP with configurable session expiry for integration testing.
Internal
- Full TSDoc/JSDoc comments on all 9 source modules
- 84 tests, typecheck + build green
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Features
- pollLog FIFO cap:
SENTINEL_MAX_POLL_LOGenv var limits per-task poll history entries. Oldest trimmed first. Unset/zero/negative = unlimited. - Task TTL auto-cleanup:
SENTINEL_TASK_TTL_MSenv var auto-removes completed/errored/cancelled tasks from memory after N ms. Unset/zero/negative = never cleanup. - Structured logging: All sentinel events (poll, error, timeout, completion, cancel, cleanup) now emit to opencode log via
client.app.log()at debug/info/warn/error levels. Log failures are non-fatal.
Internal
- New
src/services/sentinel-config.tsfor env var parsing - New
src/services/logger.tswrapping opencodeclient.app.log() cleanup()now clears both interval timers and TTL timeout timers- 69 unit tests (up from 47) covering config, logger, and TTL integration
- E2E testing framework: 3-group concurrent
pty_spawntests with prompt templates inAGENTS.md - README updated with environment variable configuration section
Full Changelog: v0.3.2...v0.4.0
v0.3.2
Bug Fixes
- Runtime guards for numeric ranges —
intervalis now clamped to a minimum of 1000ms in the handler (preventssetIntervalflooding when schema validation is bypassed) timeoutsemantics —timeout=0or negative is now treated as "no limit" (infinite wait),timeout>0is clamped to a minimum of 5000ms. Previouslytimeout=0could trigger an immediate timeoutmcp_sentinel_attachtimeout — sametimeout=0→ no limit semantics applied to the attach tool
Schema Changes
timeoutparameter inmcp_sentinel_pollandmcp_sentinel_attach:.min()relaxed to 0 (handler enforces semantics: 0 = no limit, >0 = min 5000ms)
Testing
- E2E test prompts added to
tests/e2e-test-prompts.md— 15 test scenarios covering normal flow, error handling, numeric edge cases, and pagination
Install
opencode plugin -g opencode-mcp-sentinelv0.3.1
Bug Fixes
- Version management — MCP client version now reads from
package.jsonat compile time instead of hardcoded string, ensuring release version always matches - MCP error extraction — raw MCP error responses now extract text content cleanly instead of
JSON.stringifyon the array, preserving field names likepath: ["job_id"]for debugging - Input validation — all tools now validate inputs strictly: empty strings rejected, JSON parse errors caught,
untilvalidated as object type,startSentinelwrapped in try/catch mcp_sentinel_statusfallback —actionparameter now defaults to"status", switch hasdefaultcase returning error string (was silently returningundefined)- Mock CI server —
inputSchemaupgraded toz.object({...}).strict()to reject unknown parameters with proper MCP error codes
Documentation
- AGENTS.md — comprehensive development standards: core error handling principles, input validation patterns, testing requirements, release conventions
- Explicit authorization required for push/release operations
Install
opencode plugin -g opencode-mcp-sentinelv0.3.0
Breaking Changes
- Tool rename:
poll_mcp→mcp_sentinel_poll,poll_status→mcp_sentinel_status,poll_attach→mcp_sentinel_attach,poll_read→mcp_sentinel_read - Status parameter rename:
poll_id→idinmcp_sentinel_status
Features
mcp_sentinel_attach— block agent until sentinel completes, withctx.abortsupportmcp_sentinel_read— read raw MCP poll outputs withoffset/limitpagination- Cancel status — cancelled sentinels now report
cancelledinstead ofcompleted - Mock CI server — 8 stages (init → lint → build → unit-test → integration-test → package → deploy-staging → deploy-prod), 16+ polls for realistic long task simulation
- Sentinel IDs — ID prefix changed from
poll_tosentinel_
Internal
- Full rename from
poll-*tosentinel-*naming convention (files, types, functions) - CI workflow:
typecheck→build→teston PRs - Release workflow: added
bun teststep before publish
Install
opencode plugin -g opencode-mcp-sentinelv0.2.0
Changes
c3a345c release: v0.2.0 — poll_attach blocking wait, long mock server, no default timeout
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Changes
d140e0e fix: correct repository url for provenance
Full Changelog: https://github.com/GCS-ZHN/opencode-mcp-sentinel/commits/v0.1.0