Repository navigation
Closed
Labels
CLISentry CLI and CLI documentationMCPSentry MCP tools, transports, and documentationenhancementNew feature or request
Description
Part of #1357. Plan: cli-first-mcp task 6.2 (design, tasks). Can start now; informed by #1882.
Why
Everything the CLI persists (stored accounts, defaults, version checks, pagination cursor stacks, caches) exists for a long-lived single-user install. A server needs none of it. createSentrySDK({ token }) already sets the token per invocation, and with an env token the auth code never reads the accounts table.
Scope
getDatabase()callers (23 files, 20 inlib/db/) get a null store: reads miss, writes do nothing. An in-memory SQLite database isn't an option because workerd has no driver for the CLI's adapter.- Turn off the response cache,
.sentryclircand config-directory reads, custom CA and header files, version checks, and telemetry state. - Stateless pagination: list commands already return
nextCursorand accept a raw cursor; rejectnext/prevkeywords in this mode.
Done when
- Tests run an exposed read command, a write command, and a paginated list with persistence off and no config directory.
Spike findings (#1882)
- Returning
nullfor every read breaks schema setup indb/schema.ts(row.count). The mode must skip database setup entirely, not just stub reads. node:sqliteexists on workerd butDatabaseSyncthrows "Illegal constructor".- Env inheritance:
buildIsolatedEnv()copiesprocess.env, which on Workers holds the worker's vars and secrets. With the worker'sSENTRY_DSNset,issue listwith no target resolved to that DSN's org and project. Add an SDK option to start from an empty env, and use it on hosted. - Telemetry: library-mode
@sentry/nodeposted 18 envelopes to the CLI's DSN for 12 calls. Turn it off in this mode. formatters/spleen-font.tsreads its font withreadFileSyncat module load; make it lazy.fsis workerd's virtual FS:homedir()/tmpdir()are/tmp(one request), cwd is/bundle(the worker's code).
via @BYK.
--
Metadata
Metadata
Assignees
Labels
CLISentry CLI and CLI documentationMCPSentry MCP tools, transports, and documentationenhancementNew feature or request
Activity
linear-code commentedon Nov 3, 2026
MCP-1175
feat(cli): Make SDK calls write no local state by default (#2074)