@sentry/junior-sentry 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/skills/sentry/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sentry
|
|
3
|
-
description: Query Sentry telemetry (issues, events, replays, traces) and generate deep links scoped to users or timeframes. This skill should be used when users ask to investigate bugs, search errors, find replays, or look up Sentry data
|
|
3
|
+
description: Query Sentry telemetry (issues, events, replays, traces) and generate deep links scoped to users or timeframes. This skill should be used when users ask to investigate bugs, search errors, find replays, or look up Sentry data.
|
|
4
4
|
requires-capabilities: sentry.api
|
|
5
5
|
uses-config: sentry.org sentry.project
|
|
6
6
|
allowed-tools: bash
|
|
@@ -8,50 +8,35 @@ allowed-tools: bash
|
|
|
8
8
|
|
|
9
9
|
# Sentry Operations
|
|
10
10
|
|
|
11
|
-
Use this skill for
|
|
11
|
+
Use this skill for Sentry investigation workflows in the harness.
|
|
12
12
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
15
15
|
1. Confirm operation and target:
|
|
16
|
-
|
|
17
|
-
-
|
|
16
|
+
|
|
17
|
+
- Determine operation: `issue list`, `issue explain`, `issue plan`, `replays`, `deep-link`, or general query.
|
|
18
18
|
- Resolve org from channel config: `jr-rpc config get sentry.org`
|
|
19
19
|
- Resolve project from channel config: `jr-rpc config get sentry.project` (optional — many queries span multiple projects).
|
|
20
20
|
- If org is missing and needed, ask the user.
|
|
21
21
|
|
|
22
|
-
2.
|
|
23
|
-
- Before any authenticated Sentry operation, run: `jr-rpc issue-credential sentry.api`
|
|
24
|
-
- Sandbox runtime applies scoped Authorization headers for this turn.
|
|
25
|
-
- Do not pass raw tokens into the sandbox.
|
|
26
|
-
- If credential issuance fails with `credential_unavailable` + `oauth_started`, relay the `message` from the result to the user and **stop the turn** — the callback will automatically resume the request after they authorize.
|
|
27
|
-
- If a Sentry API call returns 401 or 403 after credentials were issued, the user's token may lack access for the requested org. Run `jr-rpc delete-token sentry` to clear the stale token, then run `jr-rpc issue-credential sentry.api` again to trigger a fresh OAuth flow. Do not ask the user to run a command manually — the system handles re-authorization automatically.
|
|
22
|
+
2. Execute via CLI:
|
|
28
23
|
|
|
29
|
-
3. Execute via CLI:
|
|
30
24
|
- Use `sentry <command>` for structured queries.
|
|
31
|
-
- The CLI reads `SENTRY_AUTH_TOKEN` from env
|
|
25
|
+
- The CLI reads `SENTRY_AUTH_TOKEN` from env after the runtime enables the declared Sentry capability for this turn.
|
|
32
26
|
- Read [references/cli-commands.md](references/cli-commands.md) for command shapes and flags.
|
|
33
27
|
- Read [references/sandbox-runtime.md](references/sandbox-runtime.md) before relying on sandbox credentials.
|
|
28
|
+
- If a Sentry API call returns 401 or 403 after credentials were issued, the user's token may lack access for the requested org. Run `jr-rpc delete-token sentry` to clear the stale token, then retry after re-enabling the declared capability. Do not ask the user to run a command manually — the system handles re-authorization automatically.
|
|
29
|
+
|
|
30
|
+
3. Generate deep links:
|
|
34
31
|
|
|
35
|
-
4. Generate deep links:
|
|
36
32
|
- For user-scoped or entity-specific views, generate URLs instead of CLI calls.
|
|
37
33
|
- Read [references/deep-link-patterns.md](references/deep-link-patterns.md) for URL templates.
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
4. Report result:
|
|
36
|
+
|
|
40
37
|
- Return issue details, replay links, deep links, or CLI output inline.
|
|
41
38
|
- Include Sentry web URLs for easy navigation.
|
|
42
39
|
|
|
43
|
-
## Auth flow
|
|
44
|
-
|
|
45
|
-
When user runs `/sentry auth`:
|
|
46
|
-
1. Run: `jr-rpc oauth-start sentry`
|
|
47
|
-
- The command sends the authorization link privately (visible only to the requesting user) and returns `{ ok, private_delivery_sent: true }`.
|
|
48
|
-
- If `private_delivery_sent` is false, tell the user to send you a direct message and try again. **Never** post or relay authorization URLs — they are security-sensitive.
|
|
49
|
-
2. Tell the user you've sent them a private authorization link.
|
|
50
|
-
3. Stop. The agent turn ends here. When the user completes authorization in their browser, the callback handler stores tokens and posts a confirmation message back into the thread automatically.
|
|
51
|
-
|
|
52
|
-
When user runs `/sentry disconnect`:
|
|
53
|
-
- Clear stored tokens: `jr-rpc delete-token sentry` and post confirmation.
|
|
54
|
-
|
|
55
40
|
## Guardrails
|
|
56
41
|
|
|
57
42
|
- Read-only operations only (MVP scope).
|
|
@@ -11,14 +11,6 @@ This skill runs in the harness sandbox (`node22`) and commands execute via the `
|
|
|
11
11
|
|
|
12
12
|
## Credential strategy
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4. Run CLI commands: `sentry <command>`.
|
|
18
|
-
5. No long-lived token persistence in sandbox files.
|
|
19
|
-
|
|
20
|
-
## Important constraint
|
|
21
|
-
|
|
22
|
-
- Do not assume credentials are automatically available inside the sandbox.
|
|
23
|
-
- Credentials are injected per command execution scope via header transforms.
|
|
24
|
-
- Do not store or print token values.
|
|
14
|
+
1. Issue credentials with `jr-rpc issue-credential sentry.api` before executing commands.
|
|
15
|
+
2. Run CLI commands: `sentry <command>`.
|
|
16
|
+
3. Credentials are scoped per command execution. Do not persist tokens in files.
|