* feat: basalt_mcp server on a shared devtools inspector client
Add the basalt_mcp package (an MCP server for live DB inspection in a running
debug app) and refactor the DevTools inspector so both the MCP server and the
DevTools extension consume one shared client + DTO layer instead of each
re-implementing the ext.basalt.* wire protocol.
Core (basalt):
- Split lib/src/devtools/ into protocol/ · dto/ · host/ · client/.
- Add BasaltExtension (method-name enum, single source of truth), an
InspectorTransport seam, and a transport-agnostic InspectorClient exposed via
a new package:basalt/devtools_client.dart entrypoint.
- Harden DTO fromJson (json_read) so wire-decoded JSON parses; add
RegisteredInstance.fromJson; restore SqlResultDto.truncated.
- Drop backend knowledge from the inspector: RegisteredInstance loses `backend`,
and InspectorService takes placeholders/quoting/encoding from
Connection.dialect (also fixes DateTime encoding on the raw path).
- Decompose InspectorService into small SRP collaborators (SchemaReader,
TableReader, RowUpdater, SqlRunner, WhereClause, ParamBinder, SchemaLookup).
basalt_mcp:
- Depends on basalt; supplies a VmServiceTransport (package:vm_service) to the
shared InspectorClient, with IsolateFinder for app discovery.
- One BasaltTool class per MCP tool + a ToolRegistrar with a uniform error guard
(replaces the 220-line inline cascade); split runner/exceptions/logging.
- Tests over a fake InspectorTransport; connect docs + tool descriptions cover
Dart MCP DTD discovery of the VM service URI.
basalt_devtools_extension:
- Delete the duplicate lib/src/models/*; consume the shared InspectorClient via
a ServiceManagerTransport and core DTOs.
Also add basalt_mcp to the workspace, CI matrix, publish tags, and README.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(basalt_mcp): set process exit code instead of returning it from main
Dart ignores the value returned from main, so returning 1 on arg-parse or
startup failure left the process exit code at 0 — a supervisor or CI checking
the code saw success. Assign exitCode (as tool/smoke.dart already does).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(release): basalt 0.0.3; bump devtools extension build (internal)
- basalt 0.0.2 -> 0.0.3: shared DevTools inspector client
(package:basalt/devtools_client.dart), BasaltExtension, hardened DTO fromJson,
and the dev-only breaking removal of RegisteredInstance.backend (see CHANGELOG).
- basalt_devtools_extension: config.yaml version 0.0.1 -> 0.0.2 and pubspec
build 1.0.0+1 -> 1.0.0+2. Internal only — the extension is publish_to: none
and has no release tag, so nothing republishes; the bump just marks the new
build that consumes the shared client.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>