self-update
Update this junior-prod app to the latest published Junior release. Use when asked to self-update Junior, bump @sentry/junior and @sentry/junior-* dependencies, run safety checks, and open a PR ready for review.
- License 许可
- Apache-2.0
- 所属仓库
- getsentry/junior
- 最近更新
- 2026-11-12
- Stars
- ★ 413
- Forks
- 45
01 前言 Front Matter
- name
- self-update
- description
- Update this junior-prod app to the latest published Junior release. Use when asked to self-update Junior, bump @sentry/junior and @sentry/junior-* dependencies, run safety checks, and open a PR ready for review.
- disable-model-invocation
- true
03 SKILL.md 正文
Workflow
1. Preflight
git status --short
git branch --show-current
Stop if package.json, pnpm-lock.yaml, or pnpm-workspace.yaml has unrelated uncommitted changes.
2. Inventory and target
Inventory direct Junior deps from package.json: @sentry/junior and @sentry/junior-*. Record package, current exact version, and dependency section. Keep all Junior deps on one version and do not move packages between sections.
Resolve the target:
pnpm view @sentry/junior dist-tags.latest
If user requests a specific version, use that. If already on latest, stop.
Verify the target exists for every inventoried package before mutating files:
pnpm view <package>@<target> version
Allow for npm security scanning and propagation delays after publication:
- Confirm missing versions with cache-busted npm metadata and the direct version endpoint. Continue only when every package's exact target version and tarball are available. Do not retry auth failures as publication delays.
- If any package is missing, leave app files unchanged. Call
watchTimerwithafter_ms: 900000(15 minutes). Start its intent withRun $self-update for target <target>, so the timer Turn loads this skill, then name the missing packages and the wait number (for examplewait 1 of 4). AfterwatchTimersucceeds, end the Turn without a message in a separate call: in an Automation run, callfinishAutomationRunwithno_action; otherwise callnoReply. IfwatchTimerfails, report the failure instead. When the timer fires, check the same target again. - Wait at most 4 times (one hour). If a package is still missing after the fourth wait, do not open an update PR. Report "not yet available on npm" with the target, affected packages, and checks. Missing packages alone do not prove a failed publish or a scanning delay; do not republish or cut another release.
3. Build release context
Summarize changes between old_version and target_version (exclusive of old, inclusive of target) from GitHub release notes. Do not read CHANGELOG.md or scrape PRs — release bodies carry the authoritative release context.
Tags match package versions with no v prefix (for example 0.107.1):
Ask npm to resolve the semver range to the exact tags, then fetch only those releases:
pnpm view '@sentry/junior@><old_version> <=<target_version>' version --json
gh release view <version> --repo getsentry/junior --json tagName,name,body,publishedAt,url
Collect the corresponding release bodies. Stop if any expected GitHub release is missing; do not substitute another source. Save the target release's publishedAt as target_published_at for step 7. Save total change count, breaking changes (Breaking Changes, !, or BREAKING CHANGE), and config-relevant items (config, plugins, nitro, createApp, runtime, credentials, egress, example). If any breaking change exists, call out manual review, but continue the update.
4. Create or reuse branch
build/update-junior-<target>. All file mutations happen on this branch.
5. Sync minimumReleaseAgeExclude
If pnpm-workspace.yaml has a minimumReleaseAgeExclude list, ensure every Junior package from step 2 is covered by an exact entry or an existing package pattern. Add missing entries before pnpm add, but do not add exact entries already covered by @sentry/*. Append at end and preserve existing order.
6. Update deps (section-preserving)
Group pnpm add by dependency section:
pnpm add -E <deps-packages>@<target> ...
pnpm add -D -E <devDeps-packages>@<target> ...
pnpm add -O -E <optDeps-packages>@<target> ...
Do not manually edit versions in package.json. Do not use local ../junior linking scripts.
7. Sync local config
If a new standalone @sentry/junior-* plugin package was added, add it to the app plugins.ts set passed to defineJuniorPlugins(...) and keep juniorNitro({ plugins: "./plugins" }) pointed at that module. Exclude the base/runtime utility packages: @sentry/junior, @sentry/junior-plugin-api, @sentry/junior-testing.
node scripts/check-plugin-packages.mjs
Compare the consumer config with apps/example at target_ref to catch shape drift. Call github_cloneRepository with repo: "getsentry/junior", directory: "repos/junior-upstream", and allow_ad_hoc: true. Do not switch to a junior Workspace: the switch replaces the sandbox and removes this app checkout. Use the returned path as <upstream>. Choose target_ref from the version bump commit, then the publish timestamp, then origin/main as approximate:
git -C <upstream> fetch --deepen=200 origin main
git -C <upstream> log --oneline -S'"version": "<target_version>"' -- packages/junior/package.json
git -C <upstream> rev-list -n 1 --before="<target_published_at>" origin/main
git -C <upstream> checkout <target_ref>
git diff --no-index -- <upstream>/apps/example/nitro.config.ts nitro.config.ts
git diff --no-index -- <upstream>/apps/example/plugins.ts plugins.ts
git diff --no-index -- <upstream>/apps/example/server.ts server.ts
Ignore app-local values. Apply only obvious low-risk fixes; put ambiguous drift in the PR body. For package.json, compare only build tooling (nitro, jiti, typescript), not plugin dependency lists or pins.
For vercel.json, do not normalize the whole file against the example. Use upstream diff-backed changes when possible:
git -C <upstream> diff <old_ref>..<target_ref> -- apps/example/vercel.json
Only act on Junior-owned deployment requirements proven by that diff or by release notes/docs. If old_ref is unavailable, target-only example entries are context, not proof; mark the review approximate and leave a manual review item when needed.
8. Verify
git diff --name-only
pnpm install --frozen-lockfile
pnpm check
pnpm typecheck
pnpm build
Expected changed files: package.json, pnpm-lock.yaml, optional pnpm-workspace.yaml, optional nitro.config.ts, optional vercel.json. Confirm every Junior dep is exactly <target>. If the frozen install fails, repair with pnpm install --lockfile-only and rerun. Fix update-related check failures; disclose pre-existing or environment failures.
9. Commit
build(deps): Update Junior packages to <target>
Update the Junior runtime and plugin packages to <target> and refresh the pnpm lockfile.
Mention minimumReleaseAgeExclude sync if pnpm-workspace.yaml changed.
10. Push and open/update PR
Open the PR ready for review, not as a draft. If an existing update PR is a draft, mark it ready for review. Include version change, release summary with links to the GitHub releases, config comparison findings, optional workspace/plugin/vercel changes, and unexpected diffs. Do not put Checks, Verification, Test plan, or similar validation sections in the PR body; put local check results in the final user report only. Add Manual review required when breaking changes, unresolved config drift, approximate Vercel review, or failed checks exist.
When PR creation returns a subscribable resource hint, watch the PR for suggested review and CI events. After merge, if deployment follow-up is needed, use github_getDeployment for the merged commit and watch the suggested deployment events.
Stop conditions
- Any Junior package still lacks the target version or tarball after one hour of waits in step 2.
- Any npm version in
(old_version, target_version]lacks a matching GitHub release. pnpm install --frozen-lockfilefails after repair.- Checks fail for non-pre-existing, non-environment reasons and no safe config fix is available from step 7.
package.jsonchanged butpnpm-lock.yamldid not.- Example app comparison reveals a breaking plugin signature change whose required values cannot be inferred from the existing consumer config.
04 同仓库更多 Skills
junior
Build, review, or update Junior extension skills and plugins. Use when users ask to create a Junior SKILL.md, app skill, plugin, plugin.yaml, packaged plugin, MCP-backed plugin, OAuth or credentialed plugin, or to validate Junior extension files. Do not use for ordinary Junior usage, provider workflows, generic code editing, or non-Junior agent-skill authoring.
junior-qa
Validate Junior changes through local app-facing paths. Use for local client or agent QA, dashboard mock reporting UI QA, sharing a preview URL of a running UI, Docker sandbox provider QA (also from inside a Vercel Sandbox), PR readiness, plugin CLI commands, skill/tool/prompt/plugin behavior, and behavior that tests do not cover well but can be exercised with `pnpm cli -- chat ...`, another `pnpm cli` command, or `JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true pnpm dev`.
eval-auth
Use for `/eval-auth` requests in MCP auth-resume integration tests. Always connect through the disclosed MCP tool before answering, then continue the user's actual request using prior thread context when needed.
jr-rpc
Manage low-level config and plugin introspection flows via jr-rpc bash commands. Use only when the user explicitly asks to read or update provider defaults/config or list installed plugins. Do not use for PR, branch, push, or auth-order questions; load the matching provider skill instead.
xdotcom
Read public X (Twitter) data through the read-only X API v2. Use when users share an x.com or twitter.com link, or ask what someone posted on X, what people are saying about a topic, product, or launch on X, how much chatter something got, or for a post's text, metrics, replies, or an account's recent posts. Do not use it to post, reply, like, repost, follow, or send DMs, or to read private or protected data.
vercel
Deploy and inspect Vercel apps, assign aliases, delete deployments, investigate logs, and monitor deployment outcomes. Use for Vercel deployment and log requests, not GitHub code changes or other cloud providers.