@sentry/junior 0.119.0 → 0.120.0

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.
Files changed (47) hide show
  1. package/dist/{agent-hooks-NZSV4QQR.js → agent-hooks-5DDPWRYO.js} +7 -7
  2. package/dist/api.js +58 -79
  3. package/dist/app.js +21 -21
  4. package/dist/build/copy-build-content.d.ts +2 -2
  5. package/dist/{catalog-runtime-TAOYIZIZ.js → catalog-runtime-5KR5XBMJ.js} +7 -7
  6. package/dist/chat/discovery.d.ts +2 -0
  7. package/dist/chat/mcp/tool-manager.d.ts +14 -1
  8. package/dist/chat/plugins/types.d.ts +3 -9
  9. package/dist/chat/plugins/user-pages.d.ts +2 -1
  10. package/dist/{chunk-BLQZACHV.js → chunk-24B5R6OU.js} +92 -6
  11. package/dist/{chunk-JXRAOOXQ.js → chunk-6WX5SPI3.js} +1 -1
  12. package/dist/{chunk-VJTWKJWQ.js → chunk-ALAKN7LR.js} +1 -1
  13. package/dist/{chunk-ZJ6IVZVO.js → chunk-ALYQOZG7.js} +1 -1
  14. package/dist/{chunk-ZFX4M743.js → chunk-BHXW734F.js} +6 -6
  15. package/dist/{chunk-GKFDU3ZI.js → chunk-DJDGDJDF.js} +4 -4
  16. package/dist/{chunk-JLJLZS2N.js → chunk-DMKHRBI6.js} +4 -3
  17. package/dist/{chunk-NUENIPQL.js → chunk-DWOH57FW.js} +1 -1
  18. package/dist/{chunk-QZ7XRJDB.js → chunk-EIVE6GL4.js} +3 -3
  19. package/dist/{chunk-TGIQN7QW.js → chunk-ERYVNWNE.js} +93 -18
  20. package/dist/{chunk-JSTGI7TX.js → chunk-GNNV3UTY.js} +1 -1
  21. package/dist/chunk-H4HBKISO.js +417 -0
  22. package/dist/{chunk-BNJEPYTC.js → chunk-JQWP6V22.js} +4 -4
  23. package/dist/{chunk-D3N4BPSL.js → chunk-M243JMZH.js} +2 -2
  24. package/dist/{chunk-B3IT5END.js → chunk-OOUNJNMR.js} +16 -152
  25. package/dist/{chunk-6ZR455DC.js → chunk-Q3RL6A4E.js} +1 -1
  26. package/dist/{chunk-YLYJIQRX.js → chunk-QOQPPRFS.js} +12 -12
  27. package/dist/{chunk-4UIUDOOV.js → chunk-TKUCRFNX.js} +7 -7
  28. package/dist/{chunk-VLTWQQKH.js → chunk-VURFJVFH.js} +1 -1
  29. package/dist/{chunk-R53UT2OI.js → chunk-XAI2HNAY.js} +9 -5
  30. package/dist/{chunk-TAGV4Z3J.js → chunk-YEAOUT5W.js} +1 -1
  31. package/dist/cli/chat.js +23 -23
  32. package/dist/cli/check.js +8 -8
  33. package/dist/cli/plugins.js +12 -12
  34. package/dist/cli/snapshot-create.js +10 -10
  35. package/dist/cli/upgrade.js +7 -7
  36. package/dist/{db-FWGP5CKY.js → db-T4ZY64PB.js} +5 -5
  37. package/dist/{discovery-RMHYSRL7.js → discovery-GUFTFBTL.js} +3 -1
  38. package/dist/instrumentation.js +2 -2
  39. package/dist/nitro.js +24 -7
  40. package/dist/{oauth-callback-server-PM3QNXJQ.js → oauth-callback-server-LQ6DFI26.js} +16 -16
  41. package/dist/{runner-DV55N6ZB.js → runner-D3ZU6TJH.js} +9 -9
  42. package/dist/{skills-MANV5ZK6.js → skills-JMXY7LIY.js} +8 -8
  43. package/dist/{validation-QGB4INTI.js → validation-OEPJS7JX.js} +8 -8
  44. package/dist/version.js +1 -1
  45. package/package.json +8 -7
  46. package/skills/jr-rpc/SKILL.md +40 -0
  47. package/dist/chunk-3V7OFJZC.js +0 -264
@@ -6,19 +6,19 @@ import {
6
6
  parseSkillInvocation,
7
7
  resetSkillDiscoveryCache,
8
8
  stripFrontmatter
9
- } from "./chunk-QZ7XRJDB.js";
10
- import "./chunk-JSTGI7TX.js";
11
- import "./chunk-R53UT2OI.js";
9
+ } from "./chunk-EIVE6GL4.js";
10
+ import "./chunk-GNNV3UTY.js";
11
+ import "./chunk-XAI2HNAY.js";
12
12
  import "./chunk-W3U3YQYI.js";
13
13
  import "./chunk-HZF5P5UN.js";
14
- import "./chunk-ZJ6IVZVO.js";
14
+ import "./chunk-ALYQOZG7.js";
15
15
  import "./chunk-OB42YVAE.js";
16
16
  import "./chunk-F3B2YJ76.js";
17
17
  import "./chunk-6GWA276C.js";
18
- import "./chunk-B3IT5END.js";
19
- import "./chunk-3V7OFJZC.js";
20
- import "./chunk-NUENIPQL.js";
21
- import "./chunk-JLJLZS2N.js";
18
+ import "./chunk-OOUNJNMR.js";
19
+ import "./chunk-H4HBKISO.js";
20
+ import "./chunk-DWOH57FW.js";
21
+ import "./chunk-DMKHRBI6.js";
22
22
  import "./chunk-MLKGABMK.js";
23
23
  export {
24
24
  discoverSkills,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "./chunk-TAGV4Z3J.js";
5
- import "./chunk-JSTGI7TX.js";
6
- import "./chunk-R53UT2OI.js";
4
+ } from "./chunk-YEAOUT5W.js";
5
+ import "./chunk-GNNV3UTY.js";
6
+ import "./chunk-XAI2HNAY.js";
7
7
  import "./chunk-W3U3YQYI.js";
8
8
  import "./chunk-HZF5P5UN.js";
9
- import "./chunk-ZJ6IVZVO.js";
9
+ import "./chunk-ALYQOZG7.js";
10
10
  import "./chunk-OB42YVAE.js";
11
11
  import "./chunk-F3B2YJ76.js";
12
12
  import "./chunk-6GWA276C.js";
13
- import "./chunk-B3IT5END.js";
14
- import "./chunk-3V7OFJZC.js";
15
- import "./chunk-NUENIPQL.js";
16
- import "./chunk-JLJLZS2N.js";
13
+ import "./chunk-OOUNJNMR.js";
14
+ import "./chunk-H4HBKISO.js";
15
+ import "./chunk-DWOH57FW.js";
16
+ import "./chunk-DMKHRBI6.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
  export {
19
19
  validatePluginEgressCredentialHooks,
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-JLJLZS2N.js";
3
+ } from "./chunk-DMKHRBI6.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  JUNIOR_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.119.0",
3
+ "version": "0.120.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -48,7 +48,8 @@
48
48
  "files": [
49
49
  "dist",
50
50
  "bin",
51
- "migrations"
51
+ "migrations",
52
+ "skills"
52
53
  ],
53
54
  "dependencies": {
54
55
  "@ai-sdk/gateway": "^3.0.119",
@@ -78,7 +79,7 @@
78
79
  "pg": "^8.16.3",
79
80
  "yaml": "^2.9.0",
80
81
  "zod": "^4.4.3",
81
- "@sentry/junior-plugin-api": "0.119.0"
82
+ "@sentry/junior-plugin-api": "0.120.0"
82
83
  },
83
84
  "devDependencies": {
84
85
  "@emnapi/core": "^1.10.0",
@@ -95,9 +96,9 @@
95
96
  "typescript": "^6.0.3",
96
97
  "vercel": "^54.4.0",
97
98
  "vitest": "^4.1.7",
98
- "@sentry/junior-github": "0.119.0",
99
- "@sentry/junior-memory": "0.119.0",
100
- "@sentry/junior-scheduler": "0.119.0",
99
+ "@sentry/junior-github": "0.120.0",
100
+ "@sentry/junior-scheduler": "0.120.0",
101
+ "@sentry/junior-memory": "0.120.0",
101
102
  "@sentry/junior-testing": "0.0.0"
102
103
  },
103
104
  "scripts": {
@@ -108,7 +109,7 @@
108
109
  "test": "vitest run --maxWorkers=4",
109
110
  "test:watch": "vitest",
110
111
  "typecheck": "tsc --noEmit",
111
- "skills:check": "node scripts/check-skills.mjs",
112
+ "skills:check": "node --test scripts/check-skills.test.mjs && node scripts/check-skills.mjs",
112
113
  "test:coverage": "vitest run --maxWorkers=4 --coverage --reporter=default --reporter=junit --outputFile.junit=coverage/results.junit.xml"
113
114
  }
114
115
  }
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: jr-rpc
3
+ description: 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.
4
+ allowed-tools: bash
5
+ ---
6
+
7
+ # jr-rpc
8
+
9
+ Manage low-level config and plugin introspection flows for the current agent turn.
10
+
11
+ ## Plugins
12
+
13
+ `jr-rpc plugins list` — list installed plugins visible to the current Junior runtime.
14
+
15
+ Command syntax:
16
+
17
+ - `jr-rpc plugins list`
18
+
19
+ ## Configuration
20
+
21
+ `jr-rpc config get|set|unset|list` — read and write channel-scoped configuration values.
22
+
23
+ Command syntax:
24
+
25
+ - `jr-rpc config get <key>`
26
+ - `jr-rpc config set <key> <value> [--json]`
27
+ - `jr-rpc config unset <key>`
28
+ - `jr-rpc config list [--prefix <value>]`
29
+
30
+ Rules:
31
+
32
+ - Choose config keys from the runtime `<providers>` catalog: `<provider>.<config_key>`.
33
+ - For "default repo" requests, use the provider target key, for example `github.repo`.
34
+ - Run the exact standalone command. Do not probe, install, or repair `jr-rpc`; the runtime handles it only when invoked directly.
35
+
36
+ ## Guardrails
37
+
38
+ - Use exact config keys from the loaded skill or provider catalog; do not invent them.
39
+ - Do not use this skill to choose a provider for an unrelated operational task. Load the matching domain skill first, then run the real provider command.
40
+ - Do not print credential values.
@@ -1,264 +0,0 @@
1
- // src/chat/discovery.ts
2
- import fs, { statSync } from "fs";
3
- import path from "path";
4
- import { fileURLToPath } from "url";
5
- function isDirectory(targetPath) {
6
- try {
7
- return statSync(targetPath).isDirectory();
8
- } catch {
9
- return false;
10
- }
11
- }
12
- function isFile(targetPath) {
13
- try {
14
- return statSync(targetPath).isFile();
15
- } catch {
16
- return false;
17
- }
18
- }
19
- function normalizePath(targetPath) {
20
- return path.resolve(targetPath);
21
- }
22
- function uniqueResolvedPathsInOrder(values) {
23
- const seen = /* @__PURE__ */ new Set();
24
- const resolved = [];
25
- for (const value of values) {
26
- const normalized = normalizePath(value);
27
- if (seen.has(normalized)) {
28
- continue;
29
- }
30
- seen.add(normalized);
31
- resolved.push(normalized);
32
- }
33
- return resolved;
34
- }
35
- function isNodeModulesPath(candidatePath) {
36
- return path.basename(candidatePath) === "node_modules";
37
- }
38
- function isInsidePnpmStore(candidatePath) {
39
- return candidatePath.split(path.sep).includes(".pnpm");
40
- }
41
- function runningFromInstalledPackage() {
42
- const currentFile = fileURLToPath(import.meta.url);
43
- const marker = `${path.sep}node_modules${path.sep}@sentry${path.sep}junior${path.sep}`;
44
- return currentFile.includes(marker);
45
- }
46
- function listInstalledPackageNodeModulesDirs() {
47
- if (!runningFromInstalledPackage()) {
48
- return [];
49
- }
50
- const dirs = [];
51
- let current = path.resolve(path.dirname(fileURLToPath(import.meta.url)));
52
- while (true) {
53
- if (isNodeModulesPath(current) && !isInsidePnpmStore(current) && isDirectory(current)) {
54
- dirs.push(current);
55
- }
56
- const parent = path.dirname(current);
57
- if (parent === current) {
58
- break;
59
- }
60
- current = parent;
61
- }
62
- return dirs;
63
- }
64
- function listCwdAncestorNodeModulesDirs(cwd) {
65
- const resolvedCwd = normalizePath(cwd);
66
- const dirs = [];
67
- let current = resolvedCwd;
68
- while (true) {
69
- const nodeModulesDir = path.join(current, "node_modules");
70
- if (isDirectory(nodeModulesDir)) {
71
- dirs.push(nodeModulesDir);
72
- }
73
- if (isFile(path.join(current, "package.json"))) {
74
- break;
75
- }
76
- const parent = path.dirname(current);
77
- if (parent === current) {
78
- break;
79
- }
80
- current = parent;
81
- }
82
- return dirs;
83
- }
84
- function discoverNodeModulesDirs(cwd = process.cwd(), options) {
85
- const explicit = options?.candidateDirs?.filter((dir) => isDirectory(dir)) ?? [];
86
- if (explicit.length > 0) {
87
- return uniqueResolvedPathsInOrder(explicit);
88
- }
89
- return uniqueResolvedPathsInOrder([
90
- ...listInstalledPackageNodeModulesDirs(),
91
- ...listCwdAncestorNodeModulesDirs(cwd)
92
- ]);
93
- }
94
- function discoverProjectRoots(cwd = process.cwd(), options) {
95
- const roots = discoverNodeModulesDirs(
96
- cwd,
97
- options?.nodeModulesDirs ? { candidateDirs: options.nodeModulesDirs } : void 0
98
- ).map((nodeModulesDir) => path.dirname(nodeModulesDir));
99
- return uniqueResolvedPathsInOrder([cwd, ...roots]);
100
- }
101
- function unique(values) {
102
- return [...new Set(values)];
103
- }
104
- function pathExists(targetPath) {
105
- try {
106
- fs.accessSync(targetPath);
107
- return true;
108
- } catch {
109
- return false;
110
- }
111
- }
112
- function hasAnyDataMarkers(appDir) {
113
- return pathExists(path.join(appDir, "SOUL.md")) || pathExists(path.join(appDir, "WORLD.md"));
114
- }
115
- function scoreAppCandidate(appDir) {
116
- let score = 0;
117
- if (pathExists(path.join(appDir, "SOUL.md"))) {
118
- score += 4;
119
- }
120
- if (pathExists(path.join(appDir, "WORLD.md"))) {
121
- score += 2;
122
- }
123
- if (pathExists(path.join(appDir, "skills"))) {
124
- score += 1;
125
- }
126
- if (pathExists(path.join(appDir, "plugins"))) {
127
- score += 1;
128
- }
129
- return score;
130
- }
131
- function resolveCandidateAppDirs(cwd, projectRoots) {
132
- const roots = projectRoots ?? discoverProjectRoots(cwd);
133
- const resolved = [];
134
- const seen = /* @__PURE__ */ new Set();
135
- for (const root of roots) {
136
- const appDir = path.resolve(root, "app");
137
- if (!pathExists(appDir)) {
138
- continue;
139
- }
140
- if (seen.has(appDir)) {
141
- continue;
142
- }
143
- seen.add(appDir);
144
- resolved.push(appDir);
145
- }
146
- return resolved;
147
- }
148
- function homeDir() {
149
- return resolveHomeDir();
150
- }
151
- function resolveHomeDir(cwd = process.cwd(), options) {
152
- const resolvedCwd = path.resolve(cwd);
153
- const directApp = path.resolve(resolvedCwd, "app");
154
- if (pathExists(directApp) && hasAnyDataMarkers(directApp)) {
155
- return directApp;
156
- }
157
- const candidates = resolveCandidateAppDirs(
158
- resolvedCwd,
159
- options?.projectRoots
160
- );
161
- if (candidates.length === 0) {
162
- return directApp;
163
- }
164
- candidates.sort((left, right) => {
165
- const leftScore = scoreAppCandidate(left);
166
- const rightScore = scoreAppCandidate(right);
167
- if (leftScore !== rightScore) {
168
- return rightScore - leftScore;
169
- }
170
- const leftDistance = path.relative(resolvedCwd, left).split(path.sep).length;
171
- const rightDistance = path.relative(resolvedCwd, right).split(path.sep).length;
172
- if (leftDistance !== rightDistance) {
173
- return leftDistance - rightDistance;
174
- }
175
- return left.localeCompare(right);
176
- });
177
- return candidates[0];
178
- }
179
- function resolveContentRoots(subdir) {
180
- if (subdir === "data") {
181
- return [homeDir()];
182
- }
183
- return [path.join(homeDir(), subdir)];
184
- }
185
- function dataDir() {
186
- return resolveContentRoots("data")[0];
187
- }
188
- function soulPath() {
189
- return path.join(dataDir(), "SOUL.md");
190
- }
191
- function worldPath() {
192
- return path.join(dataDir(), "WORLD.md");
193
- }
194
- function descriptionPath() {
195
- return path.join(dataDir(), "DESCRIPTION.md");
196
- }
197
- function skillsDir() {
198
- return resolveContentRoots("skills")[0];
199
- }
200
- function pluginsDir() {
201
- return resolveContentRoots("plugins")[0];
202
- }
203
- function dataRoots() {
204
- return unique(resolveContentRoots("data"));
205
- }
206
- function skillRoots() {
207
- return unique(resolveContentRoots("skills"));
208
- }
209
- function pluginRoots() {
210
- return unique(resolveContentRoots("plugins"));
211
- }
212
- function soulPathCandidates() {
213
- const candidates = dataRoots().map((root) => path.join(root, "SOUL.md"));
214
- return unique(candidates);
215
- }
216
- function worldPathCandidates() {
217
- const candidates = dataRoots().map((root) => path.join(root, "WORLD.md"));
218
- return unique(candidates);
219
- }
220
- function descriptionPathCandidates() {
221
- const candidates = dataRoots().map(
222
- (root) => path.join(root, "DESCRIPTION.md")
223
- );
224
- return unique(candidates);
225
- }
226
- var RESERVED_APP_FILES = /* @__PURE__ */ new Set([
227
- "SOUL.md",
228
- "WORLD.md",
229
- "DESCRIPTION.md",
230
- "ABOUT.md"
231
- ]);
232
- function listReferenceFiles() {
233
- const appDir = homeDir();
234
- try {
235
- const entries = fs.readdirSync(appDir, { withFileTypes: true });
236
- return entries.filter(
237
- (entry) => entry.isFile() && entry.name.endsWith(".md") && !RESERVED_APP_FILES.has(entry.name)
238
- ).map((entry) => path.join(appDir, entry.name)).sort();
239
- } catch {
240
- return [];
241
- }
242
- }
243
-
244
- export {
245
- isDirectory,
246
- isFile,
247
- discoverNodeModulesDirs,
248
- discoverProjectRoots,
249
- homeDir,
250
- resolveHomeDir,
251
- dataDir,
252
- soulPath,
253
- worldPath,
254
- descriptionPath,
255
- skillsDir,
256
- pluginsDir,
257
- dataRoots,
258
- skillRoots,
259
- pluginRoots,
260
- soulPathCandidates,
261
- worldPathCandidates,
262
- descriptionPathCandidates,
263
- listReferenceFiles
264
- };