@sentry/junior 0.174.0 → 0.176.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 (62) hide show
  1. package/dist/{agent-hooks-HBZUWB4D.js → agent-hooks-ZPCHKYXI.js} +13 -12
  2. package/dist/api.js +27 -27
  3. package/dist/app.js +272 -344
  4. package/dist/{catalog-runtime-J3R3LC7Y.js → catalog-runtime-3Z2Y5IP6.js} +5 -5
  5. package/dist/chat/agent-dispatch/heartbeat.d.ts +1 -1
  6. package/dist/chat/agent-dispatch/store.d.ts +3 -16
  7. package/dist/chat/resource-events/catalog.d.ts +2 -0
  8. package/dist/chat/resource-events/notification.d.ts +1 -1
  9. package/dist/chat/resource-events/tool-support.d.ts +4 -0
  10. package/dist/{chunk-47LO5GDT.js → chunk-2N7YRFMW.js} +12 -12
  11. package/dist/{chunk-RL23S5DG.js → chunk-5JB5JJO5.js} +1 -1
  12. package/dist/{chunk-2BNKQSPC.js → chunk-64EGCW34.js} +8 -16
  13. package/dist/{chunk-DIW6IQYK.js → chunk-665JOQEP.js} +6 -6
  14. package/dist/{chunk-WEL4NWRR.js → chunk-6NQJQP7O.js} +5 -5
  15. package/dist/{chunk-5EWBGDW2.js → chunk-AJEZETLT.js} +1 -1
  16. package/dist/{chunk-GWZBBIV6.js → chunk-B65VEBJV.js} +2 -2
  17. package/dist/{chunk-HJFWO72I.js → chunk-B6IOTX7W.js} +1 -1
  18. package/dist/{chunk-T5VGNZ7F.js → chunk-B7U2QBMT.js} +16 -58
  19. package/dist/{chunk-ZBWAXCR3.js → chunk-BNGK2J6X.js} +1 -1
  20. package/dist/{chunk-IYI7RPHU.js → chunk-CI4JX64I.js} +1 -1
  21. package/dist/{chunk-XOXKL2DL.js → chunk-CNC65LIX.js} +1 -1
  22. package/dist/{chunk-4ALVTB7F.js → chunk-COFZR2CO.js} +1 -1
  23. package/dist/{chunk-KIU7RKE5.js → chunk-CTYWFV6L.js} +6 -6
  24. package/dist/{chunk-VZFLAGFK.js → chunk-CUA5SZR5.js} +1 -1
  25. package/dist/{chunk-2E353AHN.js → chunk-DVHYQDGM.js} +1 -1
  26. package/dist/{chunk-BFNNCBTK.js → chunk-FNOLPLXJ.js} +4 -4
  27. package/dist/{chunk-GX2ISGLH.js → chunk-GYRGJVWR.js} +472 -903
  28. package/dist/{chunk-FFUNPZA2.js → chunk-H7KTMGNI.js} +1 -1
  29. package/dist/{chunk-OTAPFODZ.js → chunk-IPOB6IL5.js} +98 -96
  30. package/dist/{chunk-JVORBSUR.js → chunk-JHCAX7XY.js} +3 -3
  31. package/dist/{chunk-BLBKORDG.js → chunk-JIZ3RFER.js} +505 -11
  32. package/dist/{chunk-DRRUFZKZ.js → chunk-KYHHJ6LS.js} +1 -1
  33. package/dist/{chunk-N7Y3T47I.js → chunk-OKXHYVKE.js} +4 -4
  34. package/dist/{chunk-REUKFWLH.js → chunk-PS3ZPRL2.js} +1 -1
  35. package/dist/{chunk-7V25DLCB.js → chunk-Q374NKGS.js} +8 -8
  36. package/dist/{chunk-W6HVH5JJ.js → chunk-RSIHA3XC.js} +5 -5
  37. package/dist/{chunk-Z23POK2V.js → chunk-SBIQ5MZW.js} +1 -1
  38. package/dist/{chunk-WH7F67EN.js → chunk-SGLLADGQ.js} +17 -17
  39. package/dist/{chunk-AJMUVCXW.js → chunk-VUAHVGPY.js} +4 -4
  40. package/dist/{chunk-6FWEUJGH.js → chunk-VVLQGGJJ.js} +1 -1
  41. package/dist/{chunk-OXYAEFKS.js → chunk-Z2YZ6QLG.js} +2 -2
  42. package/dist/cli/chat.js +31 -31
  43. package/dist/cli/check.js +6 -6
  44. package/dist/cli/plugins.js +14 -13
  45. package/dist/cli/snapshot-create.js +10 -10
  46. package/dist/cli/upgrade.js +7 -7
  47. package/dist/{db-6JOWUGLP.js → db-63K2IY36.js} +7 -7
  48. package/dist/instrumentation.js +4 -4
  49. package/dist/nitro.js +2 -2
  50. package/dist/{oauth-callback-server-ZLOKNXOW.js → oauth-callback-server-JZXBDXGO.js} +24 -24
  51. package/dist/{runner-YD4J2GBE.js → runner-3KWZJVK6.js} +16 -16
  52. package/dist/{skills-YMSY2LFN.js → skills-TFQQ3WSE.js} +6 -6
  53. package/dist/spawn-3GVQNWFH.js +37 -0
  54. package/dist/{validation-KAOZ7UHD.js → validation-RKLSF2UH.js} +6 -6
  55. package/dist/version.js +1 -1
  56. package/dist/{work-ILZ3L7AD.js → work-RKDS3J2X.js} +19 -19
  57. package/dist/worker-5RJNDPYW.js +24 -0
  58. package/package.json +4 -4
  59. package/dist/chat/agent-dispatch/signing.d.ts +0 -14
  60. package/dist/handlers/agent-dispatch.d.ts +0 -12
  61. package/dist/spawn-ZVO5IUCR.js +0 -37
  62. package/dist/worker-D34ZL6RU.js +0 -24
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RL23S5DG.js";
4
- import "./chunk-IYI7RPHU.js";
3
+ } from "./chunk-5JB5JJO5.js";
4
+ import "./chunk-CI4JX64I.js";
5
5
  import "./chunk-CGA4ERJ5.js";
6
6
  import "./chunk-M63DETLL.js";
7
- import "./chunk-Z23POK2V.js";
7
+ import "./chunk-SBIQ5MZW.js";
8
8
  import "./chunk-6GWA276C.js";
9
9
  import "./chunk-OOUNJNMR.js";
10
10
  import "./chunk-H4HBKISO.js";
11
- import "./chunk-DRRUFZKZ.js";
12
- import "./chunk-2E353AHN.js";
11
+ import "./chunk-KYHHJ6LS.js";
12
+ import "./chunk-DVHYQDGM.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
  export {
15
15
  pluginCatalogRuntime
@@ -6,7 +6,7 @@ export declare function runPluginHeartbeats(args: {
6
6
  nowMs: number;
7
7
  }): Promise<void>;
8
8
  /**
9
- * Repair bounded dispatch mailbox appends, including pre-cutover records.
9
+ * Repair bounded dispatch mailbox appends that crashed before enqueue.
10
10
  *
11
11
  * This index is only an ingress receipt; conversation work owns execution,
12
12
  * leases, retries, and continuation after the mailbox append succeeds.
@@ -1,20 +1,12 @@
1
1
  import type { BoundDispatchOptions, DispatchCreateResult, DispatchProjection, DispatchRecord, DispatchStatus } from "./types";
2
2
  /** Return the durable key for one plugin-facing dispatch projection. */
3
3
  export declare function getDispatchStorageKey(id: string): string;
4
- /** Parse current and rollout-compatible dispatch projection records. */
4
+ /** Parse one durable dispatch projection record. */
5
5
  export declare function parseDispatchRecord(value: unknown): DispatchRecord | undefined;
6
6
  /** Return the isolated durable conversation id for one dispatch. */
7
7
  export declare function getDispatchConversationId(dispatch: Pick<DispatchRecord, "id">): string;
8
8
  /** Return the stable synthetic input message id for one dispatch turn. */
9
9
  export declare function getDispatchInputMessageId(dispatchId: string): string;
10
- /**
11
- * Return the synthetic input id written by the pre-conversation-work runner.
12
- *
13
- * TODO(v0.116.0): Remove after v0.114 dispatch sessions can no longer resume.
14
- */
15
- export declare function getLegacyDispatchInputMessageId(dispatchId: string): string;
16
- /** Return every persisted input id accepted while resuming one dispatch. */
17
- export declare function getDispatchInputMessageIds(dispatchId: string): readonly string[];
18
10
  /** Return the stable turn id used by every run of one dispatch. */
19
11
  export declare function getDispatchTurnId(dispatchId: string): string;
20
12
  /** Gate recovery to dispatches that can still make progress. */
@@ -41,13 +33,8 @@ export declare function markDispatchFailed(id: string, errorMessage: string, res
41
33
  export declare function confirmDispatchMailboxAppend(id: string): Promise<void>;
42
34
  /** List dispatches whose durable mailbox append may not have completed. */
43
35
  export declare function listPendingDispatchMailboxAppends(): Promise<string[]>;
44
- /**
45
- * Atomically move a rollout-era record behind conversation-owned execution.
46
- *
47
- * Rewriting the canonical record under the dispatch lock removes the callback
48
- * version/lease claim before mailbox work can become visible.
49
- */
50
- export declare function claimDispatchMailboxAppend(id: string, nowMs: number): Promise<DispatchRecord | undefined>;
36
+ /** Load the dispatch under lock before its mailbox append becomes visible. */
37
+ export declare function claimDispatchMailboxAppend(id: string): Promise<DispatchRecord | undefined>;
51
38
  /** Return a plugin-scoped dispatch projection without exposing raw runtime state. */
52
39
  export declare function getPluginDispatchProjection(args: {
53
40
  id: string;
@@ -16,6 +16,8 @@ export declare function registeredResourceTypeSchema(catalog: ResourceEventCatal
16
16
  }>;
17
17
  /** Return whether one enabled plugin declared an event type. */
18
18
  export declare function pluginSupportsEvent(catalog: ResourceEventCatalog, namespace: string, resourceType: string, eventType: string): boolean;
19
+ /** Return app guidance for one registered resource type and event type. */
20
+ export declare function resourceEventGuidance(catalog: ResourceEventCatalog, namespace: string, resourceType: string, eventType: string): string | undefined;
19
21
  /** Normalize one selector with the convention declared by its plugin. */
20
22
  export declare function normalizeEventIdentifier(catalog: ResourceEventCatalog, namespace: string, identifier: string): string;
21
23
  export {};
@@ -13,7 +13,7 @@ export interface ResourceEventNotification {
13
13
  untrustedText?: string;
14
14
  }
15
15
  /** Render the runtime-owned conversation message for a subscribed event. */
16
- export declare function renderResourceEventNotificationText(subscription: Pick<ResourceEventSubscription, "intent" | "label">, event: Pick<ResourceEventNotification, "eventType" | "trustedSummary" | "data" | "untrustedText">): string;
16
+ export declare function renderResourceEventNotificationText(subscription: Pick<ResourceEventSubscription, "intent" | "label" | "resourceType">, event: Pick<ResourceEventNotification, "namespace" | "eventType" | "trustedSummary" | "data" | "untrustedText">): string;
17
17
  /** Enqueue a resource event as normal conversation mailbox input. */
18
18
  export declare function enqueueResourceEventNotification(args: {
19
19
  event: ResourceEventNotification;
@@ -1,4 +1,8 @@
1
1
  import type { ToolRuntimeContext } from "@/chat/tools/types";
2
+ /** Default lifetime for temporary resource subscriptions. */
3
+ export declare const RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS: number;
4
+ /** Hard upper bound for temporary resource subscriptions. */
5
+ export declare const RESOURCE_SUBSCRIPTION_MAX_TTL_MS: number;
2
6
  export declare const STOP_WATCHING_TOOL_NAME = "stopWatchingResources";
3
7
  export declare const RESOURCE_WATCH_TOOL_SOURCE: {
4
8
  id: string;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebAuthorization,
3
3
  deleteWebAuthorization
4
- } from "./chunk-6FWEUJGH.js";
4
+ } from "./chunk-VVLQGGJJ.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-N7Y3T47I.js";
7
+ } from "./chunk-OKXHYVKE.js";
8
8
  import {
9
9
  buildDeliveredTurnStatePatch,
10
10
  completeAuthPauseTurn,
@@ -12,20 +12,20 @@ import {
12
12
  getTurnUserMessage,
13
13
  processPluginTask,
14
14
  scheduleSessionCompletedPluginTasks
15
- } from "./chunk-T5VGNZ7F.js";
15
+ } from "./chunk-B7U2QBMT.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-WEL4NWRR.js";
22
+ } from "./chunk-6NQJQP7O.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-5EWBGDW2.js";
28
+ } from "./chunk-AJEZETLT.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -49,31 +49,31 @@ import {
49
49
  saveTurnCheckpoint,
50
50
  startActiveTurn,
51
51
  upsertConversationMessage
52
- } from "./chunk-2BNKQSPC.js";
52
+ } from "./chunk-64EGCW34.js";
53
53
  import {
54
54
  normalizeSlackConversationId
55
- } from "./chunk-BLBKORDG.js";
55
+ } from "./chunk-JIZ3RFER.js";
56
56
  import {
57
57
  getConversationEventStore,
58
58
  getConversationStore,
59
59
  getDb
60
- } from "./chunk-JVORBSUR.js";
60
+ } from "./chunk-JHCAX7XY.js";
61
61
  import {
62
62
  juniorApiTokens,
63
63
  juniorConversationParticipants,
64
64
  juniorConversations,
65
65
  juniorIdentities,
66
66
  juniorUsers
67
- } from "./chunk-VZFLAGFK.js";
67
+ } from "./chunk-CUA5SZR5.js";
68
68
  import {
69
69
  getSlackBotToken
70
- } from "./chunk-OXYAEFKS.js";
70
+ } from "./chunk-Z2YZ6QLG.js";
71
71
  import {
72
72
  juniorDestinations
73
73
  } from "./chunk-VFUK3X5B.js";
74
74
  import {
75
75
  canExposeConversationPayload
76
- } from "./chunk-FFUNPZA2.js";
76
+ } from "./chunk-H7KTMGNI.js";
77
77
  import {
78
78
  credentialContextForActor
79
79
  } from "./chunk-CGA4ERJ5.js";
@@ -82,7 +82,7 @@ import {
82
82
  logWarn,
83
83
  setTags,
84
84
  withLogContext
85
- } from "./chunk-Z23POK2V.js";
85
+ } from "./chunk-SBIQ5MZW.js";
86
86
 
87
87
  // src/handlers/health.ts
88
88
  function readHealthReport() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-IYI7RPHU.js";
3
+ } from "./chunk-CI4JX64I.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  usageSchema
3
3
  } from "./chunk-PDO5BLNM.js";
4
+ import {
5
+ ToolInputError
6
+ } from "./chunk-JIZ3RFER.js";
4
7
  import {
5
8
  agentHistoryItemSchema,
6
9
  bindProviderConversation,
@@ -13,25 +16,25 @@ import {
13
16
  instructionProvenanceFor,
14
17
  sanitizePostgresJson,
15
18
  withConversationEventLock
16
- } from "./chunk-JVORBSUR.js";
19
+ } from "./chunk-JHCAX7XY.js";
17
20
  import {
18
21
  SANDBOX_REPOS_ROOT,
19
22
  SANDBOX_WORKSPACE_ROOT,
20
23
  sleep
21
- } from "./chunk-XOXKL2DL.js";
24
+ } from "./chunk-CNC65LIX.js";
22
25
  import {
23
26
  MUTATION_LOCK_TTL_MS,
24
27
  fenceLock,
25
28
  getStateAdapter,
26
29
  withLock
27
- } from "./chunk-HJFWO72I.js";
30
+ } from "./chunk-B6IOTX7W.js";
28
31
  import {
29
32
  botConfig,
30
33
  completeText,
31
34
  escapeXml,
32
35
  resolveGatewayModel,
33
36
  unwrapCurrentInstruction
34
- } from "./chunk-OXYAEFKS.js";
37
+ } from "./chunk-Z2YZ6QLG.js";
35
38
  import {
36
39
  parseSlackMessageTs,
37
40
  toStoredSlackActor
@@ -41,7 +44,7 @@ import {
41
44
  logException,
42
45
  logWarn,
43
46
  setSpanAttributes
44
- } from "./chunk-Z23POK2V.js";
47
+ } from "./chunk-SBIQ5MZW.js";
45
48
 
46
49
  // src/chat/turn-context-tag.ts
47
50
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -1847,16 +1850,6 @@ import path2 from "path";
1847
1850
 
1848
1851
  // src/chat/tools/sandbox/file-utils.ts
1849
1852
  import path from "path";
1850
-
1851
- // src/chat/tools/execution/tool-input-error.ts
1852
- var ToolInputError = class extends Error {
1853
- constructor(message, options) {
1854
- super(message, options);
1855
- this.name = "ToolInputError";
1856
- }
1857
- };
1858
-
1859
- // src/chat/tools/sandbox/file-utils.ts
1860
1853
  var MAX_TEXT_CHARS = 6e4;
1861
1854
  var RIPGREP_EXCLUDED_GLOBS = [
1862
1855
  "!**/.git/**",
@@ -3305,7 +3298,6 @@ export {
3305
3298
  recordToolExecutionStarted,
3306
3299
  recordAttachmentsDelivered,
3307
3300
  recordGuardianActionReviewed,
3308
- ToolInputError,
3309
3301
  MAX_TEXT_CHARS,
3310
3302
  RIPGREP_EXCLUDED_GLOBS,
3311
3303
  DEFAULT_SEARCH_COMMAND_TIMEOUT_MS,
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-BLBKORDG.js";
8
+ } from "./chunk-JIZ3RFER.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-JVORBSUR.js";
11
+ } from "./chunk-JHCAX7XY.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-HJFWO72I.js";
14
+ } from "./chunk-B6IOTX7W.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-OXYAEFKS.js";
17
+ } from "./chunk-Z2YZ6QLG.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-RL23S5DG.js";
20
+ } from "./chunk-5JB5JJO5.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-Z23POK2V.js";
29
+ } from "./chunk-SBIQ5MZW.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-2BNKQSPC.js";
3
+ } from "./chunk-64EGCW34.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-JVORBSUR.js";
9
+ } from "./chunk-JHCAX7XY.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-VZFLAGFK.js";
12
+ } from "./chunk-CUA5SZR5.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-HJFWO72I.js";
15
+ } from "./chunk-B6IOTX7W.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-Z23POK2V.js";
23
+ } from "./chunk-SBIQ5MZW.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-M63DETLL.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-Z23POK2V.js";
8
+ } from "./chunk-SBIQ5MZW.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RL23S5DG.js";
3
+ } from "./chunk-5JB5JJO5.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-Z23POK2V.js";
6
+ } from "./chunk-SBIQ5MZW.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-OXYAEFKS.js";
3
+ } from "./chunk-Z2YZ6QLG.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -2,7 +2,7 @@ import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState,
4
4
  persistThreadStateById
5
- } from "./chunk-WEL4NWRR.js";
5
+ } from "./chunk-6NQJQP7O.js";
6
6
  import {
7
7
  pluginTaskId,
8
8
  pluginTaskParamsSchema,
@@ -22,10 +22,7 @@ import {
22
22
  markTurnCompleted,
23
23
  normalizeToolNameFromResult,
24
24
  stripRuntimeTurnContext
25
- } from "./chunk-2BNKQSPC.js";
26
- import {
27
- JUNIOR_THREAD_STATE_TTL_MS
28
- } from "./chunk-3Y47VMHV.js";
25
+ } from "./chunk-64EGCW34.js";
29
26
  import {
30
27
  createPluginConversationEvents,
31
28
  createPluginEmbedder,
@@ -33,25 +30,28 @@ import {
33
30
  createPluginModel,
34
31
  createPluginState,
35
32
  getPlugins
36
- } from "./chunk-BLBKORDG.js";
33
+ } from "./chunk-JIZ3RFER.js";
34
+ import {
35
+ JUNIOR_THREAD_STATE_TTL_MS
36
+ } from "./chunk-3Y47VMHV.js";
37
37
  import {
38
38
  getConversationStore,
39
39
  getDb,
40
40
  sameActorIdentity
41
- } from "./chunk-JVORBSUR.js";
41
+ } from "./chunk-JHCAX7XY.js";
42
42
  import {
43
43
  juniorConversations,
44
44
  juniorTaskExecutions
45
- } from "./chunk-VZFLAGFK.js";
45
+ } from "./chunk-CUA5SZR5.js";
46
46
  import {
47
47
  getStateAdapter
48
- } from "./chunk-HJFWO72I.js";
48
+ } from "./chunk-B6IOTX7W.js";
49
49
  import {
50
50
  ProviderError,
51
51
  findProviderError,
52
52
  getProviderErrorAttributes,
53
53
  getProviderErrorUserMessage
54
- } from "./chunk-OXYAEFKS.js";
54
+ } from "./chunk-Z2YZ6QLG.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-Z23POK2V.js";
64
+ } from "./chunk-SBIQ5MZW.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-6JOWUGLP.js")).getConversationStore();
90
+ const conversationStore = args.conversationStore ?? (await import("./db-63K2IY36.js")).getConversationStore();
91
91
  const conversation = await conversationStore.get({
92
92
  conversationId: args.conversationId
93
93
  });
@@ -457,13 +457,6 @@ var dispatchRecordSchema = z.object({
457
457
  });
458
458
  }
459
459
  });
460
- var storedDispatchRecordSchema = dispatchRecordSchema.extend({
461
- attempt: z.number().int().nonnegative().optional(),
462
- lastCallbackAtMs: z.number().finite().optional(),
463
- leaseExpiresAtMs: z.number().finite().optional(),
464
- maxAttempts: z.number().int().positive().optional(),
465
- version: z.number().int().positive().optional()
466
- });
467
460
  function getDispatchStorageKey(id) {
468
461
  return `${DISPATCH_PREFIX}:record:${id}`;
469
462
  }
@@ -490,26 +483,8 @@ function buildDispatchId(plugin, idempotencyKey) {
490
483
  return `dispatch_${digest}`;
491
484
  }
492
485
  function parseDispatchRecord(value) {
493
- const parsed = parseStoredDispatchRecord(value);
494
- return parsed?.record;
495
- }
496
- function parseStoredDispatchRecord(value) {
497
- const parsed = storedDispatchRecordSchema.safeParse(value);
498
- if (!parsed.success) {
499
- return void 0;
500
- }
501
- const {
502
- attempt: _attempt,
503
- lastCallbackAtMs: _lastCallbackAtMs,
504
- leaseExpiresAtMs: _leaseExpiresAtMs,
505
- maxAttempts: _maxAttempts,
506
- version: _version,
507
- ...record
508
- } = parsed.data;
509
- return {
510
- ...typeof parsed.data.leaseExpiresAtMs === "number" ? { legacyLeaseExpiresAtMs: parsed.data.leaseExpiresAtMs } : {},
511
- record
512
- };
486
+ const parsed = dispatchRecordSchema.safeParse(value);
487
+ return parsed.success ? parsed.data : void 0;
513
488
  }
514
489
  function getDispatchConversationId(dispatch) {
515
490
  return `agent-dispatch:${dispatch.id}`;
@@ -517,15 +492,6 @@ function getDispatchConversationId(dispatch) {
517
492
  function getDispatchInputMessageId(dispatchId) {
518
493
  return `agent-dispatch:${dispatchId}`;
519
494
  }
520
- function getLegacyDispatchInputMessageId(dispatchId) {
521
- return `dispatch:${dispatchId}:user`;
522
- }
523
- function getDispatchInputMessageIds(dispatchId) {
524
- return [
525
- getDispatchInputMessageId(dispatchId),
526
- getLegacyDispatchInputMessageId(dispatchId)
527
- ];
528
- }
529
495
  function getDispatchTurnId(dispatchId) {
530
496
  return `dispatch:${dispatchId}`;
531
497
  }
@@ -740,16 +706,9 @@ async function listPendingDispatchMailboxAppends() {
740
706
  const stored = await state.get(pendingDispatchMailboxAppendIndexKey());
741
707
  return stored === void 0 || stored === null ? [] : [...new Set(pendingDispatchMailboxAppendIndexSchema.parse(stored))];
742
708
  }
743
- async function claimDispatchMailboxAppend(id, nowMs) {
709
+ async function claimDispatchMailboxAppend(id) {
744
710
  return await withDispatchLock(id, async (state) => {
745
- const stored = parseStoredDispatchRecord(
746
- await state.get(getDispatchStorageKey(id))
747
- );
748
- if (!stored || stored.legacyLeaseExpiresAtMs && stored.legacyLeaseExpiresAtMs > nowMs) {
749
- return void 0;
750
- }
751
- await putRecord(state, stored.record);
752
- return stored.record;
711
+ return parseDispatchRecord(await state.get(getDispatchStorageKey(id)));
753
712
  });
754
713
  }
755
714
  async function getPluginDispatchProjection(args) {
@@ -1225,7 +1184,6 @@ export {
1225
1184
  readTaskExecutionStatusDays,
1226
1185
  getDispatchConversationId,
1227
1186
  getDispatchInputMessageId,
1228
- getDispatchInputMessageIds,
1229
1187
  getDispatchTurnId,
1230
1188
  isTerminalDispatchStatus,
1231
1189
  getDispatchRecord,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-KIU7RKE5.js";
3
+ } from "./chunk-CTYWFV6L.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-Z23POK2V.js";
8
+ } from "./chunk-SBIQ5MZW.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RL23S5DG.js";
3
+ } from "./chunk-5JB5JJO5.js";
4
4
 
5
5
  // src/chat/sandbox/paths.ts
6
6
  function normalizeWorkspaceRoot(input) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RL23S5DG.js";
3
+ } from "./chunk-5JB5JJO5.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-N7Y3T47I.js";
3
+ } from "./chunk-OKXHYVKE.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService,
6
6
  getPersistedSandboxState,
7
7
  getPersistedThreadState,
8
8
  persistThreadStateById
9
- } from "./chunk-WEL4NWRR.js";
9
+ } from "./chunk-6NQJQP7O.js";
10
10
  import {
11
11
  AgentInvocationBusyError,
12
12
  AgentInvocationLimitError,
@@ -15,7 +15,7 @@ import {
15
15
  agentBindingSchema,
16
16
  agentInvocationSchema,
17
17
  createAgentInvocationSchema
18
- } from "./chunk-W6HVH5JJ.js";
18
+ } from "./chunk-RSIHA3XC.js";
19
19
  import {
20
20
  TurnInputCommitLostError,
21
21
  failTurnRecord,
@@ -26,16 +26,16 @@ import {
26
26
  isTurnInputCommitLostError,
27
27
  openConversationProjection,
28
28
  saveTurnCheckpoint
29
- } from "./chunk-2BNKQSPC.js";
29
+ } from "./chunk-64EGCW34.js";
30
30
  import {
31
31
  getConversationEventStore,
32
32
  getConversationStore,
33
33
  getSqlExecutor
34
- } from "./chunk-JVORBSUR.js";
34
+ } from "./chunk-JHCAX7XY.js";
35
35
  import {
36
36
  juniorAgentBindings,
37
37
  juniorAgentInvocations
38
- } from "./chunk-VZFLAGFK.js";
38
+ } from "./chunk-CUA5SZR5.js";
39
39
 
40
40
  // src/chat/agent-invocations/work.ts
41
41
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-OXYAEFKS.js";
3
+ } from "./chunk-Z2YZ6QLG.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.174.0",
4
+ version: "0.176.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -4,18 +4,18 @@ import {
4
4
  isStale,
5
5
  runNonInteractiveCommand,
6
6
  sleep
7
- } from "./chunk-XOXKL2DL.js";
7
+ } from "./chunk-CNC65LIX.js";
8
8
  import {
9
9
  getStateAdapter
10
- } from "./chunk-HJFWO72I.js";
10
+ } from "./chunk-B6IOTX7W.js";
11
11
  import {
12
12
  toOptionalTrimmed
13
- } from "./chunk-OXYAEFKS.js";
13
+ } from "./chunk-Z2YZ6QLG.js";
14
14
  import {
15
15
  setSpanAttributes,
16
16
  setSpanStatus,
17
17
  withSpan
18
- } from "./chunk-Z23POK2V.js";
18
+ } from "./chunk-SBIQ5MZW.js";
19
19
 
20
20
  // src/chat/sandbox/resources.ts
21
21
  var configuredResources;