Skip to content

Replace manual disconnect teardown with owner resets - #91

Draft
ctoth wants to merge 3 commits into
masterfrom
agent/issue-78-disconnect-registry
Draft

Replace manual disconnect teardown with owner resets#91
ctoth wants to merge 3 commits into
masterfrom
agent/issue-78-disconnect-registry

Conversation

@ctoth

@ctoth ctoth commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a reusable, ordered disconnect-reset lifecycle and automatically register GMCP/MCP package resets
  • move session teardown from MudClient's manual feature roll-call to the feature owners while preserving history, input, preferences, editor state, and lifetime listeners
  • clear local transport state on disconnect and reject commands unless a live local stream or OPEN WebSocket is connected

Root cause and impact

Disconnect cleanup had accumulated as a centralized list in MudClient, so new stateful packages could be added without joining the teardown path. That left session state behind across reconnects. The local transport path also retained stale references, and command sends could reach closed or missing transports after local echo had already been recorded.

This PR makes disconnect ownership explicit at package registration, preserves the file-transfer-before-GMCP cleanup ordering, and surfaces closed-transport command failures without false local echo.

Validation

  • npm test — 104 files, 1,050 tests
  • npm run typecheck
  • staged Biome lint for each commit and precommit hook
  • npm run build
  • git diff --check origin/master..HEAD

Fixes #78
Fixes #60

@ctoth
ctoth force-pushed the agent/issue-78-disconnect-registry branch from 7471aa4 to d77a944 Compare July 29, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[epic] Teardown is a hand-maintained roll-call, not a registry close() leaves local mode armed; sends are silently swallowed

1 participant