Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a9f3a8f
ref(lint): Enable no-unnecessary-condition in cli
JoshuaKGoldberg Nov 11, 2026
5eec535
ref(lint): Fix no-unnecessary-condition in cli code from main
JoshuaKGoldberg Nov 13, 2026
af9b4cc
ref(tsconfig): Extend one shared base tsconfig from every package
JoshuaKGoldberg Nov 13, 2026
8b2f736
ref(tsconfig): Apply the same strictness everywhere except mcp-core
JoshuaKGoldberg Nov 13, 2026
727c72c
ref(tsconfig): Apply the same strictness to mcp-core
JoshuaKGoldberg Nov 13, 2026
ae119b3
fix(tsconfig): Keep the codemod's tsconfig standalone for jssg
JoshuaKGoldberg Nov 13, 2026
eacda7a
build: Move to TypeScript 7 and pnpm 12
sentry-junior[bot] Nov 14, 2026
77d6b5c
build(tsconfig): Apply one strict policy to every project
sentry-junior[bot] Nov 14, 2026
eae48f1
chore(lint): Extend type-aware safety rules
sentry-junior[bot] Nov 14, 2026
dc6ea03
ref(cli): Satisfy the strict policy and safety rules
sentry-junior[bot] Nov 14, 2026
857ee22
ref(mcp-core): Satisfy the strict policy and safety rules
sentry-junior[bot] Nov 14, 2026
fccb78f
ref(mcp-cloudflare): Satisfy the strict policy and safety rules
sentry-junior[bot] Nov 14, 2026
8340eed
ref(local): Satisfy the strict policy and safety rules
sentry-junior[bot] Nov 14, 2026
f21d9ef
ref: Satisfy the strict policy in the remaining packages
sentry-junior[bot] Nov 14, 2026
8290815
fix(cli): Keep the metric alert query filter safe for null rule names
JoshuaKGoldberg Nov 13, 2026
ed3902b
ref: Satisfy the strict policy on main's code
joshuarli Nov 18, 2026
cd196aa
test(cli): Restore SENTRY_HANDOFF in the PowerShell install test
sentry-junior[bot] Nov 18, 2026
00abc03
build: Run type-aware lint on tsrs-lint
joshuarli Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/cli-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
os: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
environment: ${{ github.ref == 'refs/heads/main' && 'production' || startsWith(github.ref, 'refs/heads/release/cli/') && 'cli-release' || '' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
PUBLIC_SENTRY_ENVIRONMENT: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/cli/')) && 'production' || 'development' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_24 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs-mcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jobs:
with:
node-version: "22"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-games-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jobs:
with:
node-version: "22"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jobs:
with:
node-version: "22"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
# Roach (see packages/mcp-server-evals/roach.json) needs Node 24.14+.
node-version: "24"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.23.4"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.23.4"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1

- name: Set up Node
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/recover-cloudflare-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
with:
node-version: "22"

- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
run_install: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
with:
node-version: "22"

- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "packages/mcp-cloudflare/**"
- "packages/mcp-core/**"
- "packages/mcp-server-mocks/**"
- "packages/mcp-server-tsconfig/**"
- "tsconfig.base.json"
- "packages/smoke-tests/**"
- "package.json"
- "pnpm-lock.yaml"
Expand All @@ -32,8 +32,8 @@ jobs:
with:
node-version: "22"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
persist-credentials: false
fetch-depth: 0
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand All @@ -71,14 +71,17 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run test:ci-projects
- run: pnpm run docs:check
# Type-aware lint resolves workspace packages through their built types;
# without them, imports from these packages read as error-typed values.
- run: pnpm --filter '@sentry/mcp-core...' --filter @sentry/logger --if-present run build
- run: pnpm run lint
- run: pnpm run check:generated
- name: Check generated files
Expand All @@ -100,7 +103,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down Expand Up @@ -131,7 +134,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down Expand Up @@ -231,7 +234,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION_22 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/token-cost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
with:
node-version: "22"

# pnpm/action-setup@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
# pnpm/action-setup@v6.1.1
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115
name: Install pnpm
with:
run_install: false
Expand Down
59 changes: 58 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,66 @@
"typescript/no-unnecessary-type-parameters": "error",
"typescript/no-useless-default-assignment": "error",
"jsx-a11y/interactive-supports-focus": "off",
"unicorn/prefer-spread": "error"
"unicorn/prefer-spread": "error",
"typescript/no-misused-promises": "error",
"typescript/switch-exhaustiveness-check": [
"error",
{
"considerDefaultExhaustiveForUnions": true
}
],
"typescript/only-throw-error": "error",
"typescript/prefer-promise-reject-errors": [
"error",
{ "allowThrowingUnknown": true }
],
"typescript/no-base-to-string": "error",
"typescript/no-unsafe-enum-comparison": "error"
},
"overrides": [
{
"files": [
"apps/{docs-mcp,games-api,local}/**/*.{ts,tsx}",
"packages/{codemod-cli3to4,logger,mcp-cloudflare,mcp-core,mcp-server,mcp-server-evals,mcp-server-mocks,mcp-test-client,smoke-tests,toolkit-core}/**/*.{ts,tsx}"
],
"excludeFiles": [
"**/*.test.{ts,tsx}",
"**/test/**",
"**/tests/**",
"**/test-utils/**",
"**/test-setup.ts",
"**/test-fixtures/**",
"**/test-fixtures.ts",
"**/*.config.{ts,mts}"
],
"rules": {
"typescript/no-explicit-any": "error",
"typescript/no-non-null-assertion": "error",
"typescript/no-unnecessary-condition": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-argument": "error",
"typescript/no-unsafe-call": "error",
"typescript/no-unsafe-member-access": "error",
"typescript/no-unsafe-return": "error"
}
},
{
"files": ["**/*.test.{ts,tsx,mjs}", "**/test/**/*.{ts,tsx}"],
"rules": {
"typescript/unbound-method": "off"
}
},
{
"files": ["apps/local/**/*.{ts,tsx,js,mjs,cjs}"],
"plugins": ["react"],
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": [
"warn",
{ "allowConstantExport": true }
]
}
},
{
"files": ["packages/mcp-cloudflare/src/client/**/*.tsx"],
"rules": {
Expand Down Expand Up @@ -157,6 +208,12 @@
"no-console": "error"
}
},
{
"files": ["packages/cli/**/*.{ts,tsx,js,mjs,cjs}"],
"rules": {
"typescript/no-unnecessary-condition": "error"
}
},
{
"files": ["packages/cli/script/**/*.ts"],
"rules": {
Expand Down
32 changes: 32 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// pnpm install hooks. Keep each change narrow and say when it can go.

// TypeScript 7 has no JavaScript compiler API. These packages import
// `typescript` for its compiler API through an optional peer, which resolves
// to the workspace's TypeScript 7. Give them the TypeScript 6 API instead.
// Remove an entry once the package supports TypeScript 7 or TypeScript 7.1
// ships its API.
const TYPESCRIPT6_API = "npm:@typescript/typescript6@6.0.2";
const NEEDS_TYPESCRIPT6_API = new Set([
// `@sentry/api/source-analysis`, used by CLI command-analysis scripts.
"@sentry/api",
]);

// Type-aware lint runs on `tsrs-lint` from the `tsrs` package. pnpm installs
// oxlint's optional `oxlint-tsgolint` peer anyway, leaving a second backend
// that nothing runs. Remove this once oxlint drops that peer.
const UNUSED_OXLINT_PEER = "oxlint-tsgolint";

function readPackage(pkg) {
if (NEEDS_TYPESCRIPT6_API.has(pkg.name) && pkg.peerDependencies?.typescript) {
delete pkg.peerDependencies.typescript;
delete pkg.peerDependenciesMeta?.typescript;
pkg.dependencies = { ...pkg.dependencies, typescript: TYPESCRIPT6_API };
}
if (pkg.name === "oxlint" && pkg.peerDependencies?.[UNUSED_OXLINT_PEER]) {
delete pkg.peerDependencies[UNUSED_OXLINT_PEER];
delete pkg.peerDependenciesMeta?.[UNUSED_OXLINT_PEER];
}
return pkg;
}

module.exports = { hooks: { readPackage } };
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"recommendations": ["oxc.oxc-vscode"],
"recommendations": ["oxc.oxc-vscode", "TypeScriptTeam.native-preview"],
"unwantedRecommendations": []
}
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"js/ts.experimental.useTsgo": true,
"js/ts.tsdk.path": "./node_modules/typescript",
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
},
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Toolkit contains the Sentry CLI, the Sentry MCP server, and shared code. Product
## Constraints

- **MCP tool count**: `EXPOSE_ALL_TOOLS` lists every tool and relies on harness tool search. The gateway surface it falls back to (`TOP_LEVEL_TOOL_NAMES`) targets ≤20, hard limit 25.
- **Quality gate**: `pnpm run tsc && pnpm run lint && pnpm run test` must pass before committing.
- **Quality gate**: `pnpm run typecheck && pnpm run lint && pnpm run test` must pass before committing.
- **Dependency direction**: `sentry` (cli) → `@sentry/mcp-core` → `@sentry/toolkit-core`, and `@sentry/mcp-cloudflare` → `@sentry/mcp-core`; never the reverse. mcp-core and toolkit-core never import the CLI. Inject CLI-only capabilities (SQLite cache, local-file DSN detection, file uploads) through interfaces defined in mcp-core or toolkit-core. `pnpm run lint` enforces this; see docs/architecture/overview.md#package-dependency-direction.
- **Lint rules**: Write new lint rules for Oxlint: a built-in rule in `.oxlintrc.json`, or a custom rule in `packages/cli/lint-rules/cli-oxlint-plugin.js`. Do not add ast-grep rules. See docs/contributing/coding-guidelines.md#formatting-and-linting.
- **Package CI**: Put checks for one workspace package in its `package.json` scripts and `sentryCi`, which `test.yml` runs per project. Do not add a workflow for them. See docs/operations/github-actions.md#package-ci-checks.
Expand Down Expand Up @@ -115,7 +115,7 @@ pnpm -w run cli --transport stdio "q" # Test MCP tools
pnpm -w run cli --transport stdio --access-token=TOKEN "q"

# Quality (run before committing)
pnpm run tsc && pnpm run lint && pnpm run test
pnpm run typecheck && pnpm run lint && pnpm run test

# Token overhead
pnpm run measure-tokens # Check tool definition size
Expand Down
5 changes: 4 additions & 1 deletion apps/cli-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "astro build",
"test": "node --test test/*.test.mjs",
"preview": "astro preview",
"deploy": "wrangler deploy"
"deploy": "wrangler deploy",
"typecheck": "astro check"
},
"dependencies": {
"@astrojs/mdx": "^7.0.8",
Expand All @@ -25,6 +26,8 @@
"shiki": "^3.21.0"
},
"devDependencies": {
"@astrojs/check": "^0.9.12",
"typescript": "catalog:astro-check",
"wrangler": "catalog:"
}
}
8 changes: 7 additions & 1 deletion apps/cli-docs/src/components/InstallSelector.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ async function highlightCommand(cmd: string): Promise<string> {
});

// Convert tokens to inline HTML spans (single line command)
return tokens[0]
const [line = []] = tokens;
return line
.map(token => {
const escaped = token.content
.replace(/&/g, '&amp;')
Expand All @@ -44,6 +45,11 @@ const highlightedOptions = await Promise.all(
);

const defaultOption = highlightedOptions[defaultIndex];
if (!defaultOption) {
throw new Error(
`InstallSelector: defaultIndex ${defaultIndex} is out of range for ${options.length} options`,
);
}
---

<div class="install-selector">
Expand Down
Loading
Loading