@sentry/junior 0.170.0 → 0.172.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 (65) hide show
  1. package/dist/{agent-hooks-IPUNCZPZ.js → agent-hooks-IZMIMXUX.js} +15 -10
  2. package/dist/api.js +31 -30
  3. package/dist/app.js +32 -32
  4. package/dist/{catalog-runtime-E6XHWRPG.js → catalog-runtime-PDNXCNCJ.js} +5 -5
  5. package/dist/chat/sandbox/snapshot/store.d.ts +28 -0
  6. package/dist/chat/workspaces/store.d.ts +1 -10
  7. package/dist/chat/workspaces/types.d.ts +14 -1
  8. package/dist/{chunk-NESGW5HV.js → chunk-27T2WQJV.js} +1 -1
  9. package/dist/{chunk-47GJ7QRO.js → chunk-6RWQHBTV.js} +1 -1
  10. package/dist/{chunk-TX553KXA.js → chunk-A6AJ354O.js} +5 -5
  11. package/dist/{chunk-IJTFG6AK.js → chunk-AHWLGR5T.js} +5 -9
  12. package/dist/{chunk-CA6JIB7S.js → chunk-AQ4GXXRD.js} +21 -21
  13. package/dist/{chunk-3SFZJVX5.js → chunk-BTD6ZYFL.js} +2 -2
  14. package/dist/{chunk-E7HKIHI5.js → chunk-CBPREIWS.js} +2 -2
  15. package/dist/{chunk-7TVGQZOH.js → chunk-CO47EWFW.js} +4 -4
  16. package/dist/{chunk-2XI6OLXA.js → chunk-CUJ2T7FO.js} +9 -9
  17. package/dist/{chunk-F4UM52UH.js → chunk-ELAP5LB5.js} +1 -1
  18. package/dist/{chunk-BW644E3V.js → chunk-EXEO2R4S.js} +1 -1
  19. package/dist/{chunk-4PSUCN4P.js → chunk-FESC2EW7.js} +1 -1
  20. package/dist/{chunk-74XMBKRI.js → chunk-FUYKKSDV.js} +1 -1
  21. package/dist/{chunk-6GOKKLWF.js → chunk-G2DJ7LUE.js} +6 -6
  22. package/dist/{chunk-HZALSYOW.js → chunk-G4GNP4Q2.js} +5 -5
  23. package/dist/{chunk-6E4WQV75.js → chunk-HEOOUGVL.js} +1 -1
  24. package/dist/{chunk-5EPG7PYS.js → chunk-IAOQPDO6.js} +1 -1
  25. package/dist/chunk-IFSKN5VH.js +399 -0
  26. package/dist/{chunk-YWX7D7BJ.js → chunk-JOSDA5SZ.js} +17 -17
  27. package/dist/{chunk-6W2UIZSA.js → chunk-LVNMMESU.js} +70 -11
  28. package/dist/{chunk-UD4BNNM2.js → chunk-MNYAYK5I.js} +1 -1
  29. package/dist/{chunk-A22DGDXT.js → chunk-NB7WS4SP.js} +1 -1
  30. package/dist/{chunk-T4SEUU7A.js → chunk-Q36YWAJT.js} +1 -1
  31. package/dist/{chunk-NGL4XFT2.js → chunk-QAEKVEZY.js} +1 -1
  32. package/dist/{chunk-B53NR3XY.js → chunk-QBHPQCEQ.js} +6 -270
  33. package/dist/{chunk-NFERKIUX.js → chunk-QCGDWFYC.js} +4 -4
  34. package/dist/{chunk-KQCHIOME.js → chunk-SU7QH274.js} +8 -8
  35. package/dist/{chunk-IF3OK4XO.js → chunk-TWIRPYVB.js} +6 -6
  36. package/dist/{chunk-FKOLWEMX.js → chunk-W6THM2TX.js} +5 -5
  37. package/dist/{chunk-UHW5RAIB.js → chunk-XSO5JEHI.js} +12 -12
  38. package/dist/{chunk-IX7VHMIJ.js → chunk-Y4AEFUEV.js} +3 -3
  39. package/dist/{chunk-F3I6YFB4.js → chunk-YRBLN5PJ.js} +182 -68
  40. package/dist/cli/chat.js +30 -30
  41. package/dist/cli/check.js +6 -6
  42. package/dist/cli/plugins.js +13 -13
  43. package/dist/cli/snapshot-create.js +12 -11
  44. package/dist/cli/upgrade.js +7 -7
  45. package/dist/db/schema/snapshots.d.ts +254 -0
  46. package/dist/db/schema/workspaces.d.ts +0 -68
  47. package/dist/db/schema.d.ts +251 -69
  48. package/dist/{db-WMSEGSFM.js → db-32P3ZO4Z.js} +7 -7
  49. package/dist/instrumentation.js +4 -4
  50. package/dist/nitro.js +2 -2
  51. package/dist/{oauth-callback-server-GBS47NTO.js → oauth-callback-server-ZOHC35HH.js} +23 -23
  52. package/dist/{runner-V2A2Z7K3.js → runner-QWGQH425.js} +17 -13
  53. package/dist/{skills-Z35YXLUG.js → skills-2T6JZT2K.js} +6 -6
  54. package/dist/spawn-55U4TVHQ.js +37 -0
  55. package/dist/{validation-EQCK4DA5.js → validation-LMGCYHRK.js} +6 -6
  56. package/dist/version.js +1 -1
  57. package/dist/{work-XIANCABO.js → work-CVXCACZK.js} +18 -18
  58. package/dist/worker-SWMVAAN6.js +24 -0
  59. package/migrations/0032_workspace_snapshots_table.sql +69 -0
  60. package/migrations/meta/0032_snapshot.json +2892 -0
  61. package/migrations/meta/_journal.json +8 -1
  62. package/package.json +4 -4
  63. package/dist/chunk-BVREIWBD.js +0 -131
  64. package/dist/spawn-AKPJBUS2.js +0 -37
  65. package/dist/worker-YALLEN2Z.js +0 -24
@@ -7,7 +7,7 @@ import {
7
7
  PluginCredentialFailureError,
8
8
  agentNameSchema,
9
9
  createPluginAuthOrchestration
10
- } from "./chunk-FKOLWEMX.js";
10
+ } from "./chunk-W6THM2TX.js";
11
11
  import {
12
12
  authorizationId
13
13
  } from "./chunk-DIB4GX3G.js";
@@ -32,7 +32,7 @@ import {
32
32
  searchSlackUsers,
33
33
  selectPluginGrant,
34
34
  toMcpProviderError
35
- } from "./chunk-KQCHIOME.js";
35
+ } from "./chunk-SU7QH274.js";
36
36
  import {
37
37
  RetryableDeliveryError,
38
38
  actorFromRun,
@@ -48,7 +48,7 @@ import {
48
48
  getSlackMessagePermalink,
49
49
  resolveBaseUrl,
50
50
  uploadFilesToConversation
51
- } from "./chunk-6GOKKLWF.js";
51
+ } from "./chunk-G2DJ7LUE.js";
52
52
  import {
53
53
  parseSandboxEgressAuthRequiredSignal,
54
54
  parseSandboxEgressPermissionDeniedSignal,
@@ -56,7 +56,6 @@ import {
56
56
  sandboxEgressCredentialLeaseSchema
57
57
  } from "./chunk-6ZWRNC4D.js";
58
58
  import {
59
- SANDBOX_RUNTIME,
60
59
  SCHEDULED_TASK_SYSTEM_ACTOR,
61
60
  compactEventTask,
62
61
  createEventTask,
@@ -88,10 +87,10 @@ import {
88
87
  scheduledTaskAttributes,
89
88
  storeAttachments,
90
89
  writableEventTask
91
- } from "./chunk-IJTFG6AK.js";
90
+ } from "./chunk-AHWLGR5T.js";
92
91
  import {
93
92
  parseSlackThreadId
94
- } from "./chunk-4PSUCN4P.js";
93
+ } from "./chunk-FESC2EW7.js";
95
94
  import {
96
95
  AGENTS_REMOVAL_NOTICE,
97
96
  AGENTS_REPLACEMENT_NOTICE,
@@ -162,17 +161,15 @@ import {
162
161
  stripRuntimeTurnContext,
163
162
  trimTrailingAssistantMessages,
164
163
  truncateText
165
- } from "./chunk-HZALSYOW.js";
164
+ } from "./chunk-G4GNP4Q2.js";
166
165
  import {
167
166
  JUNIOR_THREAD_STATE_TTL_MS
168
167
  } from "./chunk-3Y47VMHV.js";
169
168
  import {
170
169
  bindSandboxFileSystem,
171
170
  createSandboxSession,
172
- ensureDockerDaemon,
173
171
  getSandboxResources,
174
172
  getVercelSandboxCredentials,
175
- hash,
176
173
  isAlreadyExistsError,
177
174
  isMissingError,
178
175
  isSandboxCommandStreamInterruptedError,
@@ -183,11 +180,12 @@ import {
183
180
  stopSession,
184
181
  throwSandboxOperationError,
185
182
  wrapSandboxSetupError
186
- } from "./chunk-B53NR3XY.js";
183
+ } from "./chunk-QBHPQCEQ.js";
187
184
  import {
188
185
  privateTraceResultAttributes
189
186
  } from "./chunk-UIE3R5XU.js";
190
187
  import {
188
+ SANDBOX_RUNTIME,
191
189
  SlackActionError,
192
190
  WorkspaceValidationError,
193
191
  createPluginHookRunner,
@@ -214,7 +212,7 @@ import {
214
212
  updateWorkspace,
215
213
  withSlackRetries,
216
214
  workspaceRepoCheckoutPath
217
- } from "./chunk-F3I6YFB4.js";
215
+ } from "./chunk-YRBLN5PJ.js";
218
216
  import {
219
217
  KNOWN_CONVERSATION_EVENT_TYPES,
220
218
  contextProvenance,
@@ -226,11 +224,11 @@ import {
226
224
  instructionActors,
227
225
  instructionProvenanceFor,
228
226
  sameActorIdentity
229
- } from "./chunk-IX7VHMIJ.js";
227
+ } from "./chunk-Y4AEFUEV.js";
230
228
  import {
231
229
  juniorArtifacts,
232
230
  juniorIdentities
233
- } from "./chunk-6W2UIZSA.js";
231
+ } from "./chunk-LVNMMESU.js";
234
232
  import {
235
233
  SANDBOX_DATA_ROOT,
236
234
  SANDBOX_REPOS_ROOT,
@@ -238,15 +236,17 @@ import {
238
236
  SANDBOX_WORKSPACE_ROOT,
239
237
  buildCommandScript,
240
238
  buildNonInteractiveShellScript,
239
+ ensureDockerDaemon,
240
+ hash,
241
241
  runNonInteractiveCommand,
242
242
  sandboxSkillDir,
243
243
  sandboxSkillFile,
244
244
  sandboxSkillPathResolution,
245
245
  sleep
246
- } from "./chunk-BVREIWBD.js";
246
+ } from "./chunk-IFSKN5VH.js";
247
247
  import {
248
248
  getStateAdapter
249
- } from "./chunk-74XMBKRI.js";
249
+ } from "./chunk-FUYKKSDV.js";
250
250
  import {
251
251
  ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
252
252
  COMPACTION_SUMMARY_PREFIX,
@@ -279,7 +279,7 @@ import {
279
279
  resolveGatewayCredential,
280
280
  resolveGatewayModel,
281
281
  unwrapCurrentInstruction
282
- } from "./chunk-E7HKIHI5.js";
282
+ } from "./chunk-CBPREIWS.js";
283
283
  import {
284
284
  canExposeConversationPayload,
285
285
  resolveConversationPrivacy,
@@ -289,16 +289,16 @@ import {
289
289
  toGenAiMessagesTraceAttributes,
290
290
  toGenAiPayloadMetadata,
291
291
  toGenAiPayloadTraceAttributes
292
- } from "./chunk-NGL4XFT2.js";
292
+ } from "./chunk-QAEKVEZY.js";
293
293
  import {
294
294
  discoverSkills,
295
295
  findSkillByName,
296
296
  loadSkillsByName,
297
297
  parseSkillInvocation
298
- } from "./chunk-3SFZJVX5.js";
298
+ } from "./chunk-BTD6ZYFL.js";
299
299
  import {
300
300
  pluginCatalogRuntime
301
- } from "./chunk-6E4WQV75.js";
301
+ } from "./chunk-HEOOUGVL.js";
302
302
  import {
303
303
  CredentialUnavailableError,
304
304
  OAuthProviderError,
@@ -306,7 +306,7 @@ import {
306
306
  getOAuthProviderErrorAttributes,
307
307
  resolveAuthTokenPlaceholder,
308
308
  resolvePluginCommandEnv
309
- } from "./chunk-A22DGDXT.js";
309
+ } from "./chunk-NB7WS4SP.js";
310
310
  import {
311
311
  credentialUserSubjectId
312
312
  } from "./chunk-CGA4ERJ5.js";
@@ -336,7 +336,7 @@ import {
336
336
  summarizeMessageText,
337
337
  withLogContext,
338
338
  withSpan
339
- } from "./chunk-5EPG7PYS.js";
339
+ } from "./chunk-IAOQPDO6.js";
340
340
  import {
341
341
  startInactiveSpan,
342
342
  withActiveSpan
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-6E4WQV75.js";
3
+ } from "./chunk-HEOOUGVL.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-5EPG7PYS.js";
6
+ } from "./chunk-IAOQPDO6.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -3,7 +3,7 @@ import {
3
3
  toCanonicalInputMessage,
4
4
  toCanonicalOutputMessage,
5
5
  toGenAiMessagesTraceAttributes
6
- } from "./chunk-NGL4XFT2.js";
6
+ } from "./chunk-QAEKVEZY.js";
7
7
  import {
8
8
  extractGenAiUsageAttributes,
9
9
  logException,
@@ -11,7 +11,7 @@ import {
11
11
  normalizeGenAiFinishReason,
12
12
  serializeGenAiAttribute,
13
13
  withSpan
14
- } from "./chunk-5EPG7PYS.js";
14
+ } from "./chunk-IAOQPDO6.js";
15
15
 
16
16
  // src/chat/services/provider-error.ts
17
17
  var ProviderError = class extends Error {
@@ -8,14 +8,14 @@ import {
8
8
  getConversationStore,
9
9
  parseDestination,
10
10
  sameDestination
11
- } from "./chunk-IX7VHMIJ.js";
11
+ } from "./chunk-Y4AEFUEV.js";
12
12
  import {
13
13
  getDefaultRedisStateAdapterFor,
14
14
  getStateAdapter
15
- } from "./chunk-74XMBKRI.js";
15
+ } from "./chunk-FUYKKSDV.js";
16
16
  import {
17
17
  getChatConfig
18
- } from "./chunk-E7HKIHI5.js";
18
+ } from "./chunk-CBPREIWS.js";
19
19
  import {
20
20
  parseStoredSlackActor
21
21
  } from "./chunk-M63DETLL.js";
@@ -23,7 +23,7 @@ import {
23
23
  isRecord,
24
24
  toOptionalNumber,
25
25
  toOptionalString
26
- } from "./chunk-5EPG7PYS.js";
26
+ } from "./chunk-IAOQPDO6.js";
27
27
 
28
28
  // src/chat/task-execution/state.ts
29
29
  import { randomUUID } from "crypto";
@@ -2,7 +2,7 @@ import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState,
4
4
  persistThreadStateById
5
- } from "./chunk-TX553KXA.js";
5
+ } from "./chunk-A6AJ354O.js";
6
6
  import {
7
7
  pluginTaskId,
8
8
  pluginTaskParamsSchema,
@@ -22,7 +22,7 @@ import {
22
22
  markTurnCompleted,
23
23
  normalizeToolNameFromResult,
24
24
  stripRuntimeTurnContext
25
- } from "./chunk-HZALSYOW.js";
25
+ } from "./chunk-G4GNP4Q2.js";
26
26
  import {
27
27
  JUNIOR_THREAD_STATE_TTL_MS
28
28
  } from "./chunk-3Y47VMHV.js";
@@ -33,25 +33,25 @@ import {
33
33
  createPluginModel,
34
34
  createPluginState,
35
35
  getPlugins
36
- } from "./chunk-F3I6YFB4.js";
36
+ } from "./chunk-YRBLN5PJ.js";
37
37
  import {
38
38
  getConversationStore,
39
39
  getDb,
40
40
  sameActorIdentity
41
- } from "./chunk-IX7VHMIJ.js";
41
+ } from "./chunk-Y4AEFUEV.js";
42
42
  import {
43
43
  juniorConversations,
44
44
  juniorTaskExecutions
45
- } from "./chunk-6W2UIZSA.js";
45
+ } from "./chunk-LVNMMESU.js";
46
46
  import {
47
47
  getStateAdapter
48
- } from "./chunk-74XMBKRI.js";
48
+ } from "./chunk-FUYKKSDV.js";
49
49
  import {
50
50
  ProviderError,
51
51
  findProviderError,
52
52
  getProviderErrorAttributes,
53
53
  getProviderErrorUserMessage
54
- } from "./chunk-E7HKIHI5.js";
54
+ } from "./chunk-CBPREIWS.js";
55
55
  import {
56
56
  credentialSubjectSchema
57
57
  } from "./chunk-CGA4ERJ5.js";
@@ -61,7 +61,7 @@ import {
61
61
  import {
62
62
  buildTurnFailureResponse,
63
63
  logWarn
64
- } from "./chunk-5EPG7PYS.js";
64
+ } from "./chunk-IAOQPDO6.js";
65
65
 
66
66
  // src/chat/runtime/delivered-turn-state.ts
67
67
  function buildDeliveredTurnStatePatch(args) {
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
87
87
 
88
88
  // src/chat/services/turn-session-routing.ts
89
89
  async function resolveTurnSessionRouting(args) {
90
- const conversationStore = args.conversationStore ?? (await import("./db-WMSEGSFM.js")).getConversationStore();
90
+ const conversationStore = args.conversationStore ?? (await import("./db-32P3ZO4Z.js")).getConversationStore();
91
91
  const conversation = await conversationStore.get({
92
92
  conversationId: args.conversationId
93
93
  });
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.170.0",
4
+ version: "0.172.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-F4UM52UH.js";
3
+ } from "./chunk-ELAP5LB5.js";
4
4
 
5
5
  // src/deployment.ts
6
6
  var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-M63DETLL.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-5EPG7PYS.js";
8
+ } from "./chunk-IAOQPDO6.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-E7HKIHI5.js";
3
+ } from "./chunk-CBPREIWS.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-F3I6YFB4.js";
8
+ } from "./chunk-YRBLN5PJ.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-IX7VHMIJ.js";
11
+ } from "./chunk-Y4AEFUEV.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-74XMBKRI.js";
14
+ } from "./chunk-FUYKKSDV.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-E7HKIHI5.js";
17
+ } from "./chunk-CBPREIWS.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-6E4WQV75.js";
20
+ } from "./chunk-HEOOUGVL.js";
21
21
  import {
22
22
  parseSlackMessageTs,
23
23
  parseSlackUserId
@@ -26,7 +26,7 @@ import {
26
26
  isRecord,
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-5EPG7PYS.js";
29
+ } from "./chunk-IAOQPDO6.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -13,25 +13,25 @@ import {
13
13
  instructionProvenanceFor,
14
14
  sanitizePostgresJson,
15
15
  withConversationEventLock
16
- } from "./chunk-IX7VHMIJ.js";
16
+ } from "./chunk-Y4AEFUEV.js";
17
17
  import {
18
18
  SANDBOX_REPOS_ROOT,
19
19
  SANDBOX_WORKSPACE_ROOT,
20
20
  sleep
21
- } from "./chunk-BVREIWBD.js";
21
+ } from "./chunk-IFSKN5VH.js";
22
22
  import {
23
23
  MUTATION_LOCK_TTL_MS,
24
24
  fenceLock,
25
25
  getStateAdapter,
26
26
  withLock
27
- } from "./chunk-74XMBKRI.js";
27
+ } from "./chunk-FUYKKSDV.js";
28
28
  import {
29
29
  botConfig,
30
30
  completeText,
31
31
  escapeXml,
32
32
  resolveGatewayModel,
33
33
  unwrapCurrentInstruction
34
- } from "./chunk-E7HKIHI5.js";
34
+ } from "./chunk-CBPREIWS.js";
35
35
  import {
36
36
  parseSlackMessageTs,
37
37
  toStoredSlackActor
@@ -41,7 +41,7 @@ import {
41
41
  logException,
42
42
  logWarn,
43
43
  setSpanAttributes
44
- } from "./chunk-5EPG7PYS.js";
44
+ } from "./chunk-IAOQPDO6.js";
45
45
 
46
46
  // src/chat/turn-context-tag.ts
47
47
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-A22DGDXT.js";
3
+ } from "./chunk-NB7WS4SP.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-BW644E3V.js";
12
+ } from "./chunk-EXEO2R4S.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";