@sentry/junior 0.110.0 → 0.112.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 (76) hide show
  1. package/dist/{agent-hooks-ELT4ODFF.js → agent-hooks-6MVTPKP4.js} +8 -8
  2. package/dist/api/people/profile.d.ts +1 -0
  3. package/dist/api/schema/person.d.ts +2 -0
  4. package/dist/api/schema.js +1 -1
  5. package/dist/api.js +13 -12
  6. package/dist/app.js +551 -401
  7. package/dist/build/virtual-config.d.ts +2 -0
  8. package/dist/{catalog-runtime-4GI22PXK.js → catalog-runtime-UEO25P2J.js} +5 -5
  9. package/dist/chat/agent/request.d.ts +3 -6
  10. package/dist/chat/agent/sandbox.d.ts +36 -11
  11. package/dist/chat/agent/tools.d.ts +5 -8
  12. package/dist/chat/config.d.ts +8 -1
  13. package/dist/chat/pi/sdk.d.ts +1 -1
  14. package/dist/chat/plugins/agent-hooks.d.ts +2 -2
  15. package/dist/chat/runtime/agent-continue-runner.d.ts +7 -3
  16. package/dist/chat/runtime/agent-run-outcome.d.ts +1 -0
  17. package/dist/chat/runtime/slack-runtime.d.ts +1 -2
  18. package/dist/chat/runtime/thread-state.d.ts +3 -7
  19. package/dist/chat/runtime/turn-preparation.d.ts +2 -2
  20. package/dist/chat/sandbox/command-result.d.ts +91 -0
  21. package/dist/chat/sandbox/errors.d.ts +3 -1
  22. package/dist/chat/sandbox/ref.d.ts +5 -0
  23. package/dist/chat/sandbox/sandbox.d.ts +19 -46
  24. package/dist/chat/sandbox/session.d.ts +16 -20
  25. package/dist/chat/sandbox/skill-sync.d.ts +2 -2
  26. package/dist/chat/sandbox/workspace.d.ts +14 -12
  27. package/dist/chat/services/auth-pause-response.d.ts +1 -1
  28. package/dist/chat/services/auth-pause.d.ts +2 -1
  29. package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
  30. package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
  31. package/dist/chat/services/turn-result.d.ts +3 -4
  32. package/dist/chat/task-execution/slack-work.d.ts +3 -1
  33. package/dist/chat/task-execution/state.d.ts +75 -22
  34. package/dist/chat/task-execution/store.d.ts +34 -3
  35. package/dist/chat/task-execution/worker.d.ts +0 -1
  36. package/dist/chat/tool-support/normalize-result.d.ts +2 -2
  37. package/dist/chat/tool-support/pi-tool-adapter.d.ts +2 -2
  38. package/dist/chat/tool-support/structured-result.d.ts +1 -2
  39. package/dist/chat/tools/resource-events.d.ts +3 -129
  40. package/dist/chat/tools/sandbox/file-uploads.d.ts +1 -1
  41. package/dist/chat/{runtime → tools/sandbox}/generated-artifacts.d.ts +3 -3
  42. package/dist/chat/tools/types.d.ts +1 -1
  43. package/dist/chat/tools/web/fetch-content.d.ts +5 -0
  44. package/dist/chat/tools/web/image-generate.d.ts +2 -1
  45. package/dist/chat/tools/web/search.d.ts +1 -1
  46. package/dist/{chunk-3S7YYHBI.js → chunk-2FJ6WEYV.js} +1 -1
  47. package/dist/{chunk-Y5FK3CNG.js → chunk-4EJO4HIC.js} +1 -1
  48. package/dist/{chunk-W6RJZG7F.js → chunk-66IP6WED.js} +306 -31
  49. package/dist/{chunk-W75ZPAGG.js → chunk-AU2JVUDF.js} +1 -1
  50. package/dist/{chunk-3UBQI73J.js → chunk-AWNDKI5K.js} +7 -8
  51. package/dist/{chunk-IYKPU7H6.js → chunk-CSS7JHEM.js} +1 -1
  52. package/dist/{chunk-SBOBTS27.js → chunk-GJG67YFS.js} +2 -2
  53. package/dist/{chunk-RHHRKSPI.js → chunk-GR4IB6OQ.js} +8729 -9024
  54. package/dist/{chunk-ZKIOWEFL.js → chunk-IV2O4HQJ.js} +1 -1
  55. package/dist/{chunk-FPK7XY3F.js → chunk-JE23YR3X.js} +1 -0
  56. package/dist/{chunk-L5XQPJ7T.js → chunk-NDQL4ESR.js} +2 -2
  57. package/dist/{chunk-WNOVRQ67.js → chunk-PK4ETCUQ.js} +46 -18
  58. package/dist/{chunk-4QU44P7Q.js → chunk-QIALGHRN.js} +2 -2
  59. package/dist/{chunk-C5XAFTHY.js → chunk-SKEMI4IF.js} +16 -13
  60. package/dist/{chunk-Y3H2DN6F.js → chunk-TZU3R5OC.js} +1 -1
  61. package/dist/{chunk-2T7TIEXI.js → chunk-VBSVNOLA.js} +11 -15
  62. package/dist/{chunk-GK47NBDE.js → chunk-X3SP5RDW.js} +1 -1
  63. package/dist/{chunk-3TV7OEHL.js → chunk-ZHP4KNF7.js} +1 -1
  64. package/dist/cli/chat.js +19 -19
  65. package/dist/cli/check.js +6 -6
  66. package/dist/cli/plugins.js +11 -11
  67. package/dist/cli/snapshot-warmup.js +8 -8
  68. package/dist/cli/upgrade.js +5 -5
  69. package/dist/{db-Y6W6CWWW.js → db-P5H5RVQV.js} +5 -5
  70. package/dist/instrumentation.js +2 -2
  71. package/dist/nitro.js +14 -8
  72. package/dist/{runner-BBFV5GLR.js → runner-B4ZDUO3R.js} +19 -28
  73. package/dist/{skills-AR4AF32L.js → skills-GWTOZ3XV.js} +6 -6
  74. package/dist/{validation-FBIEPTC2.js → validation-QFIC6XH6.js} +6 -6
  75. package/dist/version.js +1 -1
  76. package/package.json +5 -5
package/dist/nitro.js CHANGED
@@ -25,8 +25,8 @@ import {
25
25
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
26
26
  JUNIOR_RETENTION_CRON_SCHEDULE,
27
27
  JUNIOR_RETENTION_ROUTE
28
- } from "./chunk-W75ZPAGG.js";
29
- import "./chunk-ZKIOWEFL.js";
28
+ } from "./chunk-AU2JVUDF.js";
29
+ import "./chunk-IV2O4HQJ.js";
30
30
  import "./chunk-MLKGABMK.js";
31
31
 
32
32
  // src/nitro.ts
@@ -260,7 +260,8 @@ function renderVirtualConfig(options) {
260
260
  ] : ["export const pluginSet = undefined;"],
261
261
  `export const plugins = ${JSON.stringify(options.plugins ?? { packages: [] })};`,
262
262
  `export const pluginRuntimeRegistrations = ${JSON.stringify(options.pluginRuntimeRegistrations ?? [])};`,
263
- `export const dashboard = ${JSON.stringify(options.dashboard)};`
263
+ `export const dashboard = ${JSON.stringify(options.dashboard)};`,
264
+ `export const functionMaxDurationSeconds = ${JSON.stringify(options.functionMaxDurationSeconds)};`
264
265
  ];
265
266
  return lines.join("\n");
266
267
  }
@@ -271,6 +272,7 @@ function injectVirtualConfig(nitro, options = {}) {
271
272
  }
272
273
  const pluginSet = await options.loadPluginSet();
273
274
  return renderVirtualConfig({
275
+ functionMaxDurationSeconds: options.functionMaxDurationSeconds,
274
276
  pluginModule: options.pluginModule,
275
277
  plugins: pluginCatalogConfigFromPluginSet(pluginSet),
276
278
  pluginRuntimeRegistrations: pluginRuntimeRegistrationsFromPluginSet(
@@ -347,8 +349,7 @@ function configureVercelDeployment(nitro, options) {
347
349
  });
348
350
  }
349
351
  nitro.options.vercel.functions ??= {};
350
- nitro.options.vercel.functions.maxDuration ??= defaultMaxDuration;
351
- const callbackMaxDuration = nitro.options.vercel.functions.maxDuration ?? defaultMaxDuration;
352
+ nitro.options.vercel.functions.maxDuration = defaultMaxDuration;
352
353
  nitro.options.vercel.functionRules ??= {};
353
354
  const existingRule = nitro.options.vercel.functionRules[JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE] ?? {};
354
355
  const existingTriggers = Array.isArray(existingRule.experimentalTriggers) ? existingRule.experimentalTriggers : [];
@@ -356,8 +357,8 @@ function configureVercelDeployment(nitro, options) {
356
357
  (trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE
357
358
  );
358
359
  nitro.options.vercel.functionRules[JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE] = {
359
- maxDuration: callbackMaxDuration,
360
360
  ...existingRule,
361
+ maxDuration: defaultMaxDuration,
361
362
  experimentalTriggers: [
362
363
  ...otherTriggers,
363
364
  {
@@ -374,8 +375,8 @@ function configureVercelDeployment(nitro, options) {
374
375
  (trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE
375
376
  );
376
377
  nitro.options.vercel.functionRules[JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE] = {
377
- maxDuration: callbackMaxDuration,
378
378
  ...existingPluginTaskRule,
379
+ maxDuration: defaultMaxDuration,
379
380
  experimentalTriggers: [
380
381
  ...otherPluginTaskTriggers,
381
382
  {
@@ -384,6 +385,7 @@ function configureVercelDeployment(nitro, options) {
384
385
  }
385
386
  ]
386
387
  };
388
+ return defaultMaxDuration;
387
389
  }
388
390
  function juniorNitro(options = {}) {
389
391
  return {
@@ -392,7 +394,10 @@ function juniorNitro(options = {}) {
392
394
  const cwd = path2.resolve(
393
395
  options.cwd ?? nitro.options.rootDir ?? process.cwd()
394
396
  );
395
- configureVercelDeployment(nitro, options);
397
+ const functionMaxDurationSeconds = configureVercelDeployment(
398
+ nitro,
399
+ options
400
+ );
396
401
  bundleOpenTelemetryLoaderHooks(nitro);
397
402
  applyRolldownTreeshakeWorkaround(nitro);
398
403
  const pluginSource = options.plugins;
@@ -411,6 +416,7 @@ function juniorNitro(options = {}) {
411
416
  (plugin) => plugin.manifest.name
412
417
  );
413
418
  injectVirtualConfig(nitro, {
419
+ functionMaxDurationSeconds,
414
420
  ...pluginModule ? {
415
421
  loadPluginSet: loadConfiguredPluginSet,
416
422
  pluginModule: runtimeModuleForResolvedPluginModule(pluginModule)
@@ -4,7 +4,7 @@ import {
4
4
  finalizeFailedTurnReplyWithEvent,
5
5
  processPluginTask,
6
6
  scheduleSessionCompletedPluginTasks
7
- } from "./chunk-3UBQI73J.js";
7
+ } from "./chunk-AWNDKI5K.js";
8
8
  import "./chunk-KNFROR7R.js";
9
9
  import {
10
10
  buildConversationContext,
@@ -25,31 +25,31 @@ import {
25
25
  startActiveTurn,
26
26
  updateConversationStats,
27
27
  upsertConversationMessage
28
- } from "./chunk-C5XAFTHY.js";
28
+ } from "./chunk-SKEMI4IF.js";
29
29
  import "./chunk-MU6HHZEN.js";
30
30
  import "./chunk-PDO5BLNM.js";
31
- import "./chunk-2T7TIEXI.js";
32
- import "./chunk-GK47NBDE.js";
33
- import "./chunk-L5XQPJ7T.js";
31
+ import "./chunk-VBSVNOLA.js";
32
+ import "./chunk-X3SP5RDW.js";
33
+ import "./chunk-NDQL4ESR.js";
34
34
  import {
35
35
  getConversationEventStore
36
- } from "./chunk-4QU44P7Q.js";
36
+ } from "./chunk-QIALGHRN.js";
37
37
  import "./chunk-JQFJO5WH.js";
38
38
  import "./chunk-4ZNGQH7C.js";
39
39
  import {
40
40
  stripRuntimeTurnContext,
41
41
  trimTrailingAssistantMessages
42
- } from "./chunk-WNOVRQ67.js";
42
+ } from "./chunk-PK4ETCUQ.js";
43
43
  import "./chunk-VFUK3X5B.js";
44
44
  import "./chunk-6Y5L4BOM.js";
45
45
  import "./chunk-C4MZ3GP5.js";
46
46
  import {
47
47
  logException
48
- } from "./chunk-IYKPU7H6.js";
48
+ } from "./chunk-CSS7JHEM.js";
49
49
  import "./chunk-42WRQLJ6.js";
50
50
  import "./chunk-6GWA276C.js";
51
- import "./chunk-W75ZPAGG.js";
52
- import "./chunk-ZKIOWEFL.js";
51
+ import "./chunk-AU2JVUDF.js";
52
+ import "./chunk-IV2O4HQJ.js";
53
53
  import "./chunk-MLKGABMK.js";
54
54
 
55
55
  // src/chat/local/runner.ts
@@ -116,10 +116,9 @@ async function runLocalAgentTurn(input, deps) {
116
116
  conversationId: input.conversationId
117
117
  });
118
118
  let artifacts = coerceThreadArtifactsState(persisted);
119
- let { sandboxId, sandboxDependencyProfileHash } = getPersistedSandboxState(persisted);
119
+ let sandboxRef = getPersistedSandboxState(persisted);
120
120
  const initialArtifacts = artifacts;
121
- const initialSandboxId = sandboxId;
122
- const initialSandboxDependencyProfileHash = sandboxDependencyProfileHash;
121
+ const initialSandboxRef = sandboxRef;
123
122
  const turnId = localTurnId();
124
123
  const userMessageId = `${turnId}:user`;
125
124
  const startedAtMs = now();
@@ -228,10 +227,7 @@ async function runLocalAgentTurn(input, deps) {
228
227
  },
229
228
  state: {
230
229
  artifactState: artifacts,
231
- sandbox: {
232
- sandboxId,
233
- sandboxDependencyProfileHash
234
- }
230
+ sandboxRef
235
231
  },
236
232
  observers: {
237
233
  onStatus: async (status) => {
@@ -253,18 +249,15 @@ async function runLocalAgentTurn(input, deps) {
253
249
  await persistThreadStateById(input.conversationId, {
254
250
  artifacts,
255
251
  conversation,
256
- sandboxId,
257
- sandboxDependencyProfileHash
252
+ sandboxRef
258
253
  });
259
254
  },
260
- onSandboxAcquired: async (sandbox) => {
261
- sandboxId = sandbox.sandboxId;
262
- sandboxDependencyProfileHash = sandbox.sandboxDependencyProfileHash;
255
+ onSandboxRefChanged: async (nextSandboxRef) => {
256
+ sandboxRef = nextSandboxRef;
263
257
  await persistThreadStateById(input.conversationId, {
264
258
  artifacts,
265
259
  conversation,
266
- sandboxId,
267
- sandboxDependencyProfileHash
260
+ sandboxRef
268
261
  });
269
262
  }
270
263
  }
@@ -311,8 +304,7 @@ async function runLocalAgentTurn(input, deps) {
311
304
  await persistThreadStateById(input.conversationId, {
312
305
  artifacts: initialArtifacts,
313
306
  conversation,
314
- sandboxId: initialSandboxId ?? "",
315
- sandboxDependencyProfileHash: initialSandboxDependencyProfileHash ?? ""
307
+ sandboxRef: initialSandboxRef ?? null
316
308
  });
317
309
  } catch (persistenceError) {
318
310
  const persistenceEventId = captureLocalBoundaryFailure({
@@ -347,8 +339,7 @@ async function runLocalAgentTurn(input, deps) {
347
339
  await persistThreadStateById(input.conversationId, {
348
340
  artifacts: completedState.artifacts ?? artifacts,
349
341
  conversation: completedState.conversation,
350
- sandboxId: reply.sandboxId ?? sandboxId,
351
- sandboxDependencyProfileHash: reply.sandboxDependencyProfileHash ?? sandboxDependencyProfileHash
342
+ sandboxRef: reply.sandboxRef ?? sandboxRef
352
343
  });
353
344
  if (reply.piMessages?.length) {
354
345
  await (deps.completeDeliveredTurn ?? completeDeliveredTurn)({
@@ -6,17 +6,17 @@ import {
6
6
  parseSkillInvocation,
7
7
  resetSkillDiscoveryCache,
8
8
  stripFrontmatter
9
- } from "./chunk-SBOBTS27.js";
10
- import "./chunk-3TV7OEHL.js";
11
- import "./chunk-Y3H2DN6F.js";
9
+ } from "./chunk-GJG67YFS.js";
10
+ import "./chunk-ZHP4KNF7.js";
11
+ import "./chunk-TZU3R5OC.js";
12
12
  import "./chunk-C4MZ3GP5.js";
13
- import "./chunk-IYKPU7H6.js";
13
+ import "./chunk-CSS7JHEM.js";
14
14
  import "./chunk-42WRQLJ6.js";
15
15
  import "./chunk-6GWA276C.js";
16
16
  import "./chunk-B3IT5END.js";
17
17
  import "./chunk-3V7OFJZC.js";
18
- import "./chunk-W75ZPAGG.js";
19
- import "./chunk-ZKIOWEFL.js";
18
+ import "./chunk-AU2JVUDF.js";
19
+ import "./chunk-IV2O4HQJ.js";
20
20
  import "./chunk-MLKGABMK.js";
21
21
  export {
22
22
  discoverSkills,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "./chunk-Y5FK3CNG.js";
5
- import "./chunk-3TV7OEHL.js";
6
- import "./chunk-Y3H2DN6F.js";
4
+ } from "./chunk-4EJO4HIC.js";
5
+ import "./chunk-ZHP4KNF7.js";
6
+ import "./chunk-TZU3R5OC.js";
7
7
  import "./chunk-C4MZ3GP5.js";
8
- import "./chunk-IYKPU7H6.js";
8
+ import "./chunk-CSS7JHEM.js";
9
9
  import "./chunk-42WRQLJ6.js";
10
10
  import "./chunk-6GWA276C.js";
11
11
  import "./chunk-B3IT5END.js";
12
12
  import "./chunk-3V7OFJZC.js";
13
- import "./chunk-W75ZPAGG.js";
14
- import "./chunk-ZKIOWEFL.js";
13
+ import "./chunk-AU2JVUDF.js";
14
+ import "./chunk-IV2O4HQJ.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  validatePluginEgressCredentialHooks,
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-ZKIOWEFL.js";
3
+ } from "./chunk-IV2O4HQJ.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.110.0",
3
+ "version": "0.112.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -79,7 +79,7 @@
79
79
  "pg": "^8.16.3",
80
80
  "yaml": "^2.9.0",
81
81
  "zod": "^4.4.3",
82
- "@sentry/junior-plugin-api": "0.110.0"
82
+ "@sentry/junior-plugin-api": "0.112.0"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@emnapi/core": "^1.10.0",
@@ -96,10 +96,10 @@
96
96
  "typescript": "^6.0.3",
97
97
  "vercel": "^54.4.0",
98
98
  "vitest": "^4.1.7",
99
- "@sentry/junior-github": "0.110.0",
100
- "@sentry/junior-scheduler": "0.110.0",
99
+ "@sentry/junior-github": "0.112.0",
100
+ "@sentry/junior-memory": "0.112.0",
101
101
  "@sentry/junior-testing": "0.0.0",
102
- "@sentry/junior-memory": "0.110.0"
102
+ "@sentry/junior-scheduler": "0.112.0"
103
103
  },
104
104
  "scripts": {
105
105
  "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",