Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
betegon
force-pushed
the
bt/init-agent-guide
branch
from
November 4, 2026 14:59
31a0301 to
23fe3dc
Compare
betegon
force-pushed
the
bt/init-agent-guide
branch
from
November 4, 2026 16:25
23fe3dc to
f33b9c9
Compare
betegon
marked this pull request as ready for review
November 4, 2026 19:29
`sentry init` no longer runs the remote Mastra setup wizard. It prints `packages/cli/init.md`, a guide a coding agent follows to add Sentry: install the CLI, log in, map the project (which apps, which SDKs each needs, whether Sentry is already there), pick a Sentry project, choose features with the user, install the SDKs from the current docs, verify with a test error, and report back. The docs site serves the same file at https://cli.sentry.dev/init.md. The wizard runner, tools, preflight, verification, Ink wizard screens, init-eval suite, WizardError, wizard prompt telemetry, SENTRY_INIT_TUI, @mastra/client-js, ink-spinner, and the provider-utils patch that only Mastra needed are removed. The org/project picker moves to src/lib/select-ui/, and the docs service keeps its host check in docs-service.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVd9nWxcAefpXRLd8M
Delete the glob engine (`scan/glob.ts`), `safe-read.ts`, and the exports nothing calls now that the wizard is gone: `looksLikePath`, `getUncommittedFiles`, `captureOAuthScopeRecoveryGate`, `parseOrgProjectFromSettingsUrl`, `FULL_BANNER_LINES`, `bannerLinesWidth`, `YES_ALIASES`, and `BUFFER_SIZE`. Helpers the wizard imported but their own module still uses are no longer exported. Comments that pointed at the wizard now describe the remaining callers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVd9nWxcAefpXRLd8M
…eanup `sentry init` failed in a directory whose `.sentryclirc` points at another Sentry host: `buildCommand` checks that URL for every command unless it sets `skipRcUrlCheck`, and `auth: false` does not skip it. `init` sends nothing to Sentry, so it now skips the check. - `init` takes no positionals and no flags of its own, only the `--json` and `--fields` every command gets. It no longer accepts the wizard's flags, and update notices are no longer suppressed for it. - Print the Markdown source to agents behind a pseudo-terminal, and add an output schema for `--json`. - Remove `MASTRA_API_URL`; `sentry docs` always calls the hosted service. - Run `sentry init` from the installers after `cli setup`, which no longer skips the login step for `SENTRY_INIT=1`. - Guide: read the docs pages as Markdown on self-hosted Sentry, the CLI picks the team, what to do when `sentry` isn't on PATH, and a `--verify` timeout doesn't mean the setup failed. - Reduce the picker to the single filterable list the org, project, and account prompts use, without the wizard's shortcut registry and frame width helpers. - Rename `EXIT.WIZARD_VERIFY` to `EXIT.VERIFY_FAILED`, and remove `deferAutoCreateOnEmptyOrg`, `buildProjectIssuesUrl`, the `zod/v3` stub's `ZodType`, and the provider-utils advisory allowance, which only the wizard needed. - Update comments, docs, and test fixtures that still described the wizard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVd9nWxcAefpXRLd8M
betegon
force-pushed
the
bt/init-agent-guide
branch
from
November 4, 2026 19:51
f33b9c9 to
ad0bf68
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sentry initno longer runs the remote Mastra setup wizard. It prints aMarkdown guide (
packages/cli/init.md) that a coding agent follows to addSentry to a project, the same way Railway (
railway.com/agents.md) andVercel (
vercel.com/get-started.md) hand agents a playbook:sentry init)sentry auth loginmore than one: TanStack Start on Cloudflare needs
@sentry/cloudflareand
@sentry/tanstackstart-react), and whether Sentry is already there,in which case it upgrades or extends the setup instead
Replay, profiling, crons, User Feedback, AI agent and MCP monitoring) and
ask the user which to enable
APIs
sentry local run --verify, thensentry issue listThe rules in steps 3, 5, and 6 come from the hosted wizard's agent prompts in
getsentry/cli-init-api: deployable contexts and one SDK per runtime,evidence-only Crons/AI/MCP suggestions, features that need tracing, the DSN
placement policy, configuring only the chosen features, installing every
package the code imports, browser profiling's
Document-Policyheader, andconversation tracking for AI agent monitoring.
Agents get the Markdown source, whether they read it through a pipe or a
pseudo-terminal that
detectAgentrecognizes; a person in a terminal gets itrendered;
--jsonreturns{ guide }. Like any command without input, ittakes no positionals and no flags of its own, only
--jsonand--fields.It sends nothing to Sentry, so it needs no login and skips the
.sentryclircURL check (
skipRcUrlCheck), which otherwise rejects a directory whose.sentryclircpoints at another Sentry host. With a self-hosted Sentry, the guide tells the agent to read thedocs.sentry.io pages as Markdown, because
sentry docsneeds a sentry.iologin. The docs site serves
the same file at
https://cli.sentry.dev/init.md(a symlink inapps/cli-docs/public, likeinstall), so users can also say "Fetchhttps://cli.sentry.dev/init.md and follow it" before the CLI is installed.
Removed
screens, and the
init-evalsuite (src/lib/init/,test/lib/init/,test/init-eval/)init's flags (--yes,--features,--dry-run,--team,--app,--no-tui), positionals ([target] [directory]), and their completer.Passing one now fails like it would on any other command
WizardError, wizard prompt telemetry,SENTRY_INIT_TUI,MASTRA_API_URL(
sentry docsalways calls the hosted service), and the update-noticesuppression for
init@mastra/client-jsandink-spinner, plus the@ai-sdk/provider-utils@2.2.8patch that existed only for Mastra's copy
scan/glob.ts),safe-read.ts,resolveOrCreateTeam'sdeferAutoCreateOnEmptyOrg,buildProjectIssuesUrl, and exports such aslooksLikePath,getUncommittedFiles, andcaptureOAuthScopeRecoveryGatezod/v3stub'sZodTypeexport and theGHSA-866g-f22w-33x8dependency-review allowance, which only Mastra's dependencies needed
Kept and moved
src/lib/init/ui/tosrc/lib/select-ui/and is now only what those prompts use: onefilterable, single-choice list drawn inline. The wizard's multiselect,
centered layout, details panel, paging, shortcut registry, and frame
width helpers are gone. The sidecar is still
ink-app.js, so build and packaging are unchanged. Picker tests that wentthrough the wizard
Appnow renderSelectPickerdirectly.sentry docsstill calls the same hosted service; its host check moved frominit/init-service-auth.tsintodocs-service.ts.sentry local run --verify, now namedEXIT.VERIFY_FAILED.Also
Labels in the compact picker no longer disappear when a long hint fills the
row (found while porting the tests).
check:doc-examplesnow validates everysentry …command ininit.md.init.mdis embedded by aninit-guidestep inscript/generate.ts(phase 1, skipped when
init.mdhasn't changed).The agent skill tells agents to use
sentry initwhen adding Sentry.The installers still honor
SENTRY_INIT=1: they runsentry initaftercli setup, which no longer skips its login step for it.Not in this PR
the worker still serves
sentry docs.Testing
Rebased on
mainat 9637d09:pnpm run typecheck, rootpnpm run lint, andpnpm run ci:policypassvitest run test/lib test/commands test/types test/script: 12,563 pass.The 22 failures are in permission and zstd tests (
cli fix,agent-skills,completionsinstall,db/resilient,code-scanner,upgrade,zstd-transport) that also fail onmainin this sandbox,which runs as root on Node 22
script/bundle.tsbuildsdist/ink-app.jswithmountSelectPrompt;sentry initprints the guide from the bundle, with no token and aself-hosted
.sentryclircin the directory, and rejects--yesandmy-org/xlike any command without input; the@sentry/mcp-serverbundle builds and its bundle test passes
https://claude.ai/code/session_017M6odVd9nWxcAefpXRLd8M
Generated by Claude Code