@sentry/junior 0.203.0 → 0.204.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 (174) hide show
  1. package/dist/agent-CMyTD4DD.js +17509 -0
  2. package/dist/agent-hooks-Bbcp9e33.js +4040 -0
  3. package/dist/agent-runner-DNb1A49M.js +678 -0
  4. package/dist/api/schema.d.ts +2728 -2639
  5. package/dist/api/schema.js +4 -169
  6. package/dist/api.d.ts +23 -17
  7. package/dist/api.js +3881 -5326
  8. package/dist/app-B1TOqBI8.d.ts +246 -0
  9. package/dist/app.d.ts +4 -520
  10. package/dist/app.js +9522 -11875
  11. package/dist/auth-pause-state-DosEalIG.js +168 -0
  12. package/dist/catalog-runtime-BReos-D4.js +7 -0
  13. package/dist/checkpoint-CNrPyRJN.js +2450 -0
  14. package/dist/cli/chat.d.ts +20 -0
  15. package/dist/cli/chat.js +229 -336
  16. package/dist/cli/check.d.ts +8 -0
  17. package/dist/cli/check.js +513 -806
  18. package/dist/cli/env.d.ts +13 -0
  19. package/dist/cli/env.js +63 -12
  20. package/dist/cli/init.d.ts +3 -0
  21. package/dist/cli/init.js +90 -159
  22. package/dist/cli/main.d.ts +6 -0
  23. package/dist/cli/main.js +43 -64
  24. package/dist/cli/plugins.d.ts +13 -0
  25. package/dist/cli/plugins.js +148 -227
  26. package/dist/cli/run.d.ts +16 -0
  27. package/dist/cli/run.js +52 -8
  28. package/dist/cli/snapshot-create.d.ts +4 -0
  29. package/dist/cli/snapshot-create.js +71 -125
  30. package/dist/cli/upgrade.d.ts +15 -0
  31. package/dist/cli/upgrade.js +232 -335
  32. package/dist/config-nGCW1OTG.js +941 -0
  33. package/dist/context-B45_WqVX.js +298 -0
  34. package/dist/conversation-privacy-B4voFRSm.js +182 -0
  35. package/dist/conversation-work-C6y3T5Hx.js +51 -0
  36. package/dist/credential-sync-kXr1hvO1.js +2660 -0
  37. package/dist/db-BeyXKJOI.d.ts +5 -0
  38. package/dist/destinations-BeBiJeEM.js +29 -0
  39. package/dist/execution-stats-DWfSihcH.js +373 -0
  40. package/dist/executor-DcMSlI5c.js +721 -0
  41. package/dist/experimental-CIXf7Uye.js +46 -0
  42. package/dist/history-ClE4toxe.d.ts +32 -0
  43. package/dist/history-CqTuSAdI.js +441 -0
  44. package/dist/instrumentation.d.ts +3 -3
  45. package/dist/instrumentation.js +130 -176
  46. package/dist/job-queue-Drn_LXlM.js +63 -0
  47. package/dist/logging-BzAk1S_s.js +1210 -0
  48. package/dist/model-profile-CZmVoGdX.js +49 -0
  49. package/dist/nitro.d.ts +31 -36
  50. package/dist/nitro.js +275 -456
  51. package/dist/oauth-callback-server-JiftokvA.js +130 -0
  52. package/dist/oauth-relay-CdCnu80W.js +62 -0
  53. package/dist/package-discovery-7a9YqLhE.js +455 -0
  54. package/dist/pending-auth-CWmSdZVg.js +185 -0
  55. package/dist/plugin-module-BKGOXca2.js +81 -0
  56. package/dist/plugins-BI9A1vKA.d.ts +95 -0
  57. package/dist/plugins-egKWjgue.js +99 -0
  58. package/dist/private-trace-result-BLvBjy_e.js +16 -0
  59. package/dist/profile-CrT5nXbw.js +861 -0
  60. package/dist/registry-DH1xUo2N.js +1419 -0
  61. package/dist/reporting-schema-DosTN__Q.js +105 -0
  62. package/dist/resolve-CZHnfxaS.js +546 -0
  63. package/dist/rolldown-runtime-B4FMCO8f.js +28 -0
  64. package/dist/runner-CZV2sC46.js +392 -0
  65. package/dist/sandbox-egress-signals-bHZfmhbd.js +46 -0
  66. package/dist/schema-Rn8-XEaN.js +1140 -0
  67. package/dist/sentry-CD3SdJl-.js +26 -0
  68. package/dist/skills-CIcDQSgM.js +316 -0
  69. package/dist/spawn-DdkUFRmq.js +29 -0
  70. package/dist/stats-DTUbAb88.js +2634 -0
  71. package/dist/store-C5qxF2ac.d.ts +208 -0
  72. package/dist/task-queue-CJIR4RF7.js +136 -0
  73. package/dist/task-runner-D-O3A-Cp.js +639 -0
  74. package/dist/thread-state-CRc9jTJS.js +431 -0
  75. package/dist/turn-execution-BkinIdJF.js +47 -0
  76. package/dist/turn-lifecycle-DQV19VTW.js +54 -0
  77. package/dist/usage-D3EbSO7w.js +296 -0
  78. package/dist/usage-schema-CKaDkH_j.js +20 -0
  79. package/dist/validation-C2CR-OX3.js +40 -0
  80. package/dist/vercel-queue-DIkVcfK4.js +167 -0
  81. package/dist/vercel.d.ts +6 -6
  82. package/dist/vercel.js +14 -6
  83. package/dist/version-CnXZ614E.d.ts +5 -0
  84. package/dist/version-DxcWdoKa.js +8 -0
  85. package/dist/version.d.ts +2 -4
  86. package/dist/version.js +2 -6
  87. package/dist/web-authorization-RMBxAR_t.js +76 -0
  88. package/dist/web-input-3EPfpf55.js +494 -0
  89. package/dist/work-fGofI7Op.js +509 -0
  90. package/dist/worker-CsOLq-mR.js +625 -0
  91. package/package.json +8 -8
  92. package/dist/agent-hooks-GB2VPTNA.js +0 -51
  93. package/dist/catalog-runtime-UBLIWD3O.js +0 -14
  94. package/dist/chunk-2LYHWMR4.js +0 -46
  95. package/dist/chunk-352OWAZH.js +0 -320
  96. package/dist/chunk-3Y47VMHV.js +0 -6
  97. package/dist/chunk-3YJSKOWF.js +0 -164
  98. package/dist/chunk-4KSSKTQ5.js +0 -229
  99. package/dist/chunk-4UO6FK4G.js +0 -64
  100. package/dist/chunk-5AHX53NQ.js +0 -717
  101. package/dist/chunk-5J3E5FWA.js +0 -700
  102. package/dist/chunk-5PDAG6O3.js +0 -206
  103. package/dist/chunk-6Y5B5PEX.js +0 -80
  104. package/dist/chunk-7GWQ5S5R.js +0 -2086
  105. package/dist/chunk-7H2VZTWN.js +0 -103
  106. package/dist/chunk-7NL7T6VU.js +0 -406
  107. package/dist/chunk-A5L27LE4.js +0 -387
  108. package/dist/chunk-ADIAWL34.js +0 -81
  109. package/dist/chunk-ASTEMBKJ.js +0 -519
  110. package/dist/chunk-CEMMLV5L.js +0 -98
  111. package/dist/chunk-CM5HNV2W.js +0 -131
  112. package/dist/chunk-CRTRBBRI.js +0 -105
  113. package/dist/chunk-DA2KGZZI.js +0 -13
  114. package/dist/chunk-DIB4GX3G.js +0 -8
  115. package/dist/chunk-DKIJ2RP5.js +0 -68
  116. package/dist/chunk-DWPN6SCH.js +0 -172
  117. package/dist/chunk-EDKUFGPL.js +0 -64
  118. package/dist/chunk-ENY6SKIU.js +0 -1228
  119. package/dist/chunk-F4MGCZOX.js +0 -2943
  120. package/dist/chunk-FA6POGLH.js +0 -70
  121. package/dist/chunk-FSUR7GTG.js +0 -20475
  122. package/dist/chunk-GKEOHJL5.js +0 -1856
  123. package/dist/chunk-GMCB6W5Y.js +0 -333
  124. package/dist/chunk-IE2VPG7O.js +0 -1135
  125. package/dist/chunk-IZ5B5IHQ.js +0 -3656
  126. package/dist/chunk-JAL3CH4G.js +0 -27
  127. package/dist/chunk-KIIEUXD3.js +0 -1764
  128. package/dist/chunk-KXU4NIL7.js +0 -692
  129. package/dist/chunk-MTM5IFCY.js +0 -1190
  130. package/dist/chunk-N7TMSOZH.js +0 -235
  131. package/dist/chunk-NCEBK6PH.js +0 -36
  132. package/dist/chunk-NHJU2ZAL.js +0 -56
  133. package/dist/chunk-P6KTRNVC.js +0 -321
  134. package/dist/chunk-PDO5BLNM.js +0 -22
  135. package/dist/chunk-PDRNLLFT.js +0 -3295
  136. package/dist/chunk-PEQXYSSE.js +0 -45
  137. package/dist/chunk-PKEX2AQX.js +0 -198
  138. package/dist/chunk-PSJCGIGO.js +0 -1163
  139. package/dist/chunk-PZUSUL55.js +0 -506
  140. package/dist/chunk-R45M4TUS.js +0 -37
  141. package/dist/chunk-RC745GGZ.js +0 -122
  142. package/dist/chunk-SP3QKZXJ.js +0 -820
  143. package/dist/chunk-TXKUKMVO.js +0 -417
  144. package/dist/chunk-UE4GPWSD.js +0 -931
  145. package/dist/chunk-UIE3R5XU.js +0 -17
  146. package/dist/chunk-UXPG6ZIN.js +0 -84
  147. package/dist/chunk-VFUK3X5B.js +0 -50
  148. package/dist/chunk-VNMJWREK.js +0 -787
  149. package/dist/chunk-VZ7CSOX2.js +0 -706
  150. package/dist/chunk-WCNQJKFT.js +0 -10
  151. package/dist/chunk-WDZR3QQM.js +0 -135
  152. package/dist/chunk-WLYVJCHV.js +0 -1433
  153. package/dist/chunk-WS7NAFTM.js +0 -1520
  154. package/dist/chunk-X6GDDWQH.js +0 -60
  155. package/dist/chunk-XPDEYNQI.js +0 -102
  156. package/dist/chunk-XRW44VGM.js +0 -58
  157. package/dist/chunk-Y2CM7HXH.js +0 -111
  158. package/dist/chunk-Y7X25LFY.js +0 -15
  159. package/dist/conversation-work-VIOQ5ZF3.js +0 -54
  160. package/dist/db-NGDJV7YH.js +0 -26
  161. package/dist/discovery-DWVDM7UK.js +0 -44
  162. package/dist/experimental-P5FZM4CU.js +0 -12
  163. package/dist/oauth-callback-server-YFY7YEGK.js +0 -243
  164. package/dist/oauth-relay-5XPVRPYB.js +0 -8
  165. package/dist/plugins-YTYJMMJF.js +0 -14
  166. package/dist/runner-ORTNSB2Q.js +0 -522
  167. package/dist/sandbox-egress-signals-FIL7EGPR.js +0 -73
  168. package/dist/sentry-MB3NL3IR.js +0 -42
  169. package/dist/skills-H376WQOH.js +0 -27
  170. package/dist/spawn-T43WHLOS.js +0 -42
  171. package/dist/task-runner-LBZWF32V.js +0 -36
  172. package/dist/validation-REJLRKI6.js +0 -17
  173. package/dist/work-3KJ3RE76.js +0 -51
  174. package/dist/worker-QFEBU72E.js +0 -24
@@ -1,243 +0,0 @@
1
- import {
2
- GET,
3
- GET2,
4
- syncLocalOAuthCredential
5
- } from "./chunk-PDRNLLFT.js";
6
- import "./chunk-FA6POGLH.js";
7
- import "./chunk-XRW44VGM.js";
8
- import "./chunk-4KSSKTQ5.js";
9
- import "./chunk-SP3QKZXJ.js";
10
- import "./chunk-EDKUFGPL.js";
11
- import "./chunk-ASTEMBKJ.js";
12
- import "./chunk-CRTRBBRI.js";
13
- import "./chunk-PZUSUL55.js";
14
- import "./chunk-3YJSKOWF.js";
15
- import {
16
- createUserTokenStore
17
- } from "./chunk-PSJCGIGO.js";
18
- import "./chunk-UE4GPWSD.js";
19
- import "./chunk-5PDAG6O3.js";
20
- import "./chunk-F4MGCZOX.js";
21
- import "./chunk-2LYHWMR4.js";
22
- import "./chunk-XPDEYNQI.js";
23
- import "./chunk-KIIEUXD3.js";
24
- import "./chunk-DA2KGZZI.js";
25
- import "./chunk-GMCB6W5Y.js";
26
- import "./chunk-PDO5BLNM.js";
27
- import "./chunk-NCEBK6PH.js";
28
- import "./chunk-DKIJ2RP5.js";
29
- import "./chunk-JAL3CH4G.js";
30
- import "./chunk-7H2VZTWN.js";
31
- import "./chunk-IZ5B5IHQ.js";
32
- import "./chunk-3Y47VMHV.js";
33
- import "./chunk-GKEOHJL5.js";
34
- import "./chunk-IE2VPG7O.js";
35
- import "./chunk-5AHX53NQ.js";
36
- import "./chunk-P6KTRNVC.js";
37
- import "./chunk-7NL7T6VU.js";
38
- import "./chunk-VFUK3X5B.js";
39
- import "./chunk-ENY6SKIU.js";
40
- import "./chunk-NHJU2ZAL.js";
41
- import "./chunk-PKEX2AQX.js";
42
- import "./chunk-A5L27LE4.js";
43
- import "./chunk-WCNQJKFT.js";
44
- import "./chunk-7GWQ5S5R.js";
45
- import "./chunk-CEMMLV5L.js";
46
- import "./chunk-N7TMSOZH.js";
47
- import "./chunk-DWPN6SCH.js";
48
- import "./chunk-TXKUKMVO.js";
49
- import "./chunk-WS7NAFTM.js";
50
- import "./chunk-PEQXYSSE.js";
51
- import "./chunk-WDZR3QQM.js";
52
-
53
- // src/chat/local/oauth-callback-server.ts
54
- import { createServer } from "http";
55
- var LOCAL_OAUTH_TIMEOUT_MS = 10 * 60 * 1e3;
56
- var LOCAL_OAUTH_CALLBACK_TIMEOUT_MS = 60 * 1e3;
57
- function decodeProvider(value) {
58
- if (!value) {
59
- return void 0;
60
- }
61
- try {
62
- const provider = decodeURIComponent(value);
63
- return /^[a-z][a-z0-9-]*$/.test(provider) ? provider : void 0;
64
- } catch {
65
- return void 0;
66
- }
67
- }
68
- async function startLocalOAuthCallbackServer(agentRunner) {
69
- let pendingAuthorization;
70
- const completeAuthorization = (authorization, result) => {
71
- if (authorization.settled) {
72
- return;
73
- }
74
- authorization.settled = true;
75
- clearTimeout(authorization.timeout);
76
- authorization.finish(result);
77
- };
78
- const cancelAuthorization = () => {
79
- const authorization = pendingAuthorization;
80
- if (!authorization) {
81
- return;
82
- }
83
- pendingAuthorization = void 0;
84
- completeAuthorization(
85
- authorization,
86
- new Error("Local OAuth authorization canceled")
87
- );
88
- };
89
- const server = createServer(async (incoming, outgoing) => {
90
- const host = incoming.headers.host ?? "127.0.0.1";
91
- let requestUrl;
92
- try {
93
- requestUrl = new URL(incoming.url ?? "/", `http://${host}`);
94
- } catch {
95
- outgoing.writeHead(400).end("Invalid callback request");
96
- return;
97
- }
98
- const mcpMatch = requestUrl.pathname.match(
99
- /^\/api\/oauth\/callback\/mcp\/([^/]+)$/
100
- );
101
- const pluginMatch = requestUrl.pathname.match(
102
- /^\/api\/oauth\/callback\/([^/]+)$/
103
- );
104
- const provider = decodeProvider(mcpMatch?.[1] ?? pluginMatch?.[1]);
105
- if (!provider) {
106
- outgoing.writeHead(404).end("Not found");
107
- return;
108
- }
109
- const authorization = pendingAuthorization;
110
- if (!authorization || authorization.callbackStarted || authorization.settled || requestUrl.searchParams.get("state") !== authorization.state) {
111
- outgoing.writeHead(409).end("No matching authorization request");
112
- return;
113
- }
114
- authorization.callbackStarted = true;
115
- clearTimeout(authorization.timeout);
116
- authorization.timeout = setTimeout(() => {
117
- if (!outgoing.headersSent) {
118
- outgoing.writeHead(504).end("Authorization callback timed out");
119
- }
120
- completeAuthorization(
121
- authorization,
122
- new Error("Timed out completing OAuth authorization")
123
- );
124
- }, LOCAL_OAUTH_CALLBACK_TIMEOUT_MS);
125
- const backgroundTasks = [];
126
- const waitUntil = (task) => {
127
- backgroundTasks.push(
128
- typeof task === "function" ? Promise.resolve().then(task) : task
129
- );
130
- };
131
- try {
132
- const request = new Request(requestUrl, { method: "GET" });
133
- const response = mcpMatch ? await GET(request, provider, waitUntil, {
134
- agentRunner
135
- }) : await GET2(request, provider, waitUntil, {
136
- agentRunner
137
- });
138
- const body = Buffer.from(await response.arrayBuffer());
139
- await Promise.all(backgroundTasks);
140
- if (response.ok) {
141
- if (!mcpMatch) {
142
- const tokens = await createUserTokenStore().get(
143
- "local-cli",
144
- provider
145
- );
146
- if (!tokens) {
147
- throw new Error(
148
- `${provider} authorization completed without a stored credential`
149
- );
150
- }
151
- await syncLocalOAuthCredential(provider, tokens);
152
- }
153
- }
154
- if (authorization.settled) {
155
- return;
156
- }
157
- if (response.ok) {
158
- completeAuthorization(authorization, true);
159
- } else {
160
- completeAuthorization(
161
- authorization,
162
- new Error(
163
- `${provider} authorization callback failed with HTTP ${response.status}`
164
- )
165
- );
166
- }
167
- outgoing.writeHead(
168
- response.status,
169
- Object.fromEntries(response.headers.entries())
170
- );
171
- outgoing.end(body);
172
- } catch (error) {
173
- if (!outgoing.headersSent) {
174
- outgoing.writeHead(500).end("Authorization callback failed");
175
- }
176
- completeAuthorization(
177
- authorization,
178
- error instanceof Error ? error : new Error(String(error))
179
- );
180
- }
181
- });
182
- await new Promise((resolve, reject) => {
183
- server.once("error", reject);
184
- server.listen(0, "127.0.0.1", () => {
185
- server.off("error", reject);
186
- resolve();
187
- });
188
- });
189
- const address = server.address();
190
- return {
191
- beginAuthorization: (authorizationUrl) => {
192
- if (pendingAuthorization) {
193
- throw new Error("Local OAuth already has an active authorization");
194
- }
195
- const state = new URL(authorizationUrl).searchParams.get("state");
196
- if (!state) {
197
- throw new Error("Local OAuth authorization URL is missing state");
198
- }
199
- let finish = () => void 0;
200
- const result = new Promise((resolve) => {
201
- finish = resolve;
202
- });
203
- const authorization = {
204
- callbackStarted: false,
205
- finish,
206
- result,
207
- settled: false,
208
- state,
209
- timeout: setTimeout(() => {
210
- completeAuthorization(
211
- authorization,
212
- new Error("Timed out waiting for OAuth authorization")
213
- );
214
- }, LOCAL_OAUTH_TIMEOUT_MS)
215
- };
216
- pendingAuthorization = authorization;
217
- },
218
- cancelAuthorization,
219
- port: address.port,
220
- waitForAuthorization: async () => {
221
- const authorization = pendingAuthorization;
222
- if (!authorization) {
223
- throw new Error("Local OAuth has no active authorization");
224
- }
225
- const result = await authorization.result;
226
- if (pendingAuthorization === authorization) {
227
- pendingAuthorization = void 0;
228
- }
229
- if (result instanceof Error) {
230
- throw result;
231
- }
232
- },
233
- close: async () => {
234
- cancelAuthorization();
235
- await new Promise((resolve, reject) => {
236
- server.close((error) => error ? reject(error) : resolve());
237
- });
238
- }
239
- };
240
- }
241
- export {
242
- startLocalOAuthCallbackServer
243
- };
@@ -1,8 +0,0 @@
1
- import {
2
- createLocalOAuthState,
3
- relayLocalOAuthCallback
4
- } from "./chunk-FA6POGLH.js";
5
- export {
6
- createLocalOAuthState,
7
- relayLocalOAuthCallback
8
- };
@@ -1,14 +0,0 @@
1
- import {
2
- defineJuniorPlugins,
3
- pluginCatalogConfigFromEnv,
4
- pluginCatalogConfigFromPluginSet,
5
- pluginCliRegistrationsFromPluginSet,
6
- pluginRuntimeRegistrationsFromPluginSet
7
- } from "./chunk-CM5HNV2W.js";
8
- export {
9
- defineJuniorPlugins,
10
- pluginCatalogConfigFromEnv,
11
- pluginCatalogConfigFromPluginSet,
12
- pluginCliRegistrationsFromPluginSet,
13
- pluginRuntimeRegistrationsFromPluginSet
14
- };