@sentry/junior 0.157.0 → 0.159.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 (66) hide show
  1. package/dist/{agent-hooks-QI5EPOKQ.js → agent-hooks-IAD3AANZ.js} +10 -10
  2. package/dist/api/conversations/cancel-pending-messages.d.ts +4 -0
  3. package/dist/api/conversations/priority.d.ts +2 -1
  4. package/dist/api/conversations/user-message-activity.d.ts +3 -0
  5. package/dist/api/schema/conversation.d.ts +13 -0
  6. package/dist/api/schema.d.ts +2 -2
  7. package/dist/api/schema.js +5 -1
  8. package/dist/api.js +280 -175
  9. package/dist/app.js +32 -32
  10. package/dist/{catalog-runtime-HUGHAFUN.js → catalog-runtime-6VANKLH5.js} +5 -5
  11. package/dist/chat/conversations/history.d.ts +4 -1
  12. package/dist/chat/slack/mrkdwn.d.ts +2 -1
  13. package/dist/chat/task-execution/state.d.ts +10 -0
  14. package/dist/chat/task-execution/store.d.ts +11 -0
  15. package/dist/{chunk-7J65DOBL.js → chunk-27UQ7UB3.js} +6 -6
  16. package/dist/{chunk-GEY6IFXH.js → chunk-54O6IKUS.js} +4 -4
  17. package/dist/{chunk-XRERMHPN.js → chunk-6IADZQJR.js} +1 -1
  18. package/dist/{chunk-VIBHFGQC.js → chunk-AIQKUJKK.js} +4 -4
  19. package/dist/{chunk-AFQ47JQ7.js → chunk-AZW5HKC5.js} +8 -8
  20. package/dist/{chunk-6MI43QZO.js → chunk-CNHELV2P.js} +1 -1
  21. package/dist/{chunk-VDAEXEBB.js → chunk-DJZPA72K.js} +35 -6
  22. package/dist/{chunk-TA5R6BME.js → chunk-DXSZJAVZ.js} +18 -18
  23. package/dist/{chunk-MGJW3SW4.js → chunk-EBP6IS66.js} +6 -6
  24. package/dist/{chunk-CZCMFRUQ.js → chunk-EQXVKNLM.js} +11 -0
  25. package/dist/{chunk-BLCVTEE7.js → chunk-FWDN67U3.js} +55 -4
  26. package/dist/{chunk-VYDM7HUF.js → chunk-IJ6KWS3V.js} +1 -1
  27. package/dist/{chunk-MDZQ62PB.js → chunk-K2LAI7RW.js} +2 -2
  28. package/dist/{chunk-UJYA75N5.js → chunk-L2PEQ2PY.js} +2 -2
  29. package/dist/{chunk-46ADYIPE.js → chunk-LUIKMY35.js} +1 -1
  30. package/dist/{chunk-PP4UQTH3.js → chunk-NCJV265M.js} +9 -9
  31. package/dist/{chunk-HJ3EZHIX.js → chunk-NT6V5WEE.js} +5 -5
  32. package/dist/{chunk-3GS7O66Z.js → chunk-O2DZWUPQ.js} +1 -1
  33. package/dist/{chunk-F7VOY4VQ.js → chunk-OGMHLKNO.js} +1 -1
  34. package/dist/{chunk-GO2W3VZY.js → chunk-PQWWCKNB.js} +4 -4
  35. package/dist/{chunk-D7BNWRYL.js → chunk-PT7B6A3O.js} +1 -1
  36. package/dist/{chunk-I3OQVVMV.js → chunk-Q5X37U6G.js} +1 -1
  37. package/dist/{chunk-G2FN3I66.js → chunk-QODFNKQS.js} +27 -10
  38. package/dist/{chunk-OWASYHHV.js → chunk-SQOVZSWF.js} +20 -18
  39. package/dist/{chunk-MKA3T2R6.js → chunk-TD7ZQZ5W.js} +1 -1
  40. package/dist/{chunk-RQBRGPUF.js → chunk-U7D4VLUF.js} +2 -2
  41. package/dist/{chunk-4M25PSFB.js → chunk-UG673UVL.js} +1 -1
  42. package/dist/{chunk-5TIH5GOE.js → chunk-UKKOKMRE.js} +5 -5
  43. package/dist/{chunk-MXO6VFB3.js → chunk-UP6KQVF5.js} +1 -1
  44. package/dist/{chunk-S4PFOWRA.js → chunk-WTQ3CKC3.js} +1 -1
  45. package/dist/{chunk-WNNYOPXX.js → chunk-X7AIXRVJ.js} +5 -5
  46. package/dist/{chunk-77QB5FNI.js → chunk-YCBZ47LC.js} +1 -1
  47. package/dist/{chunk-VBKFO65J.js → chunk-YSMAMSOU.js} +10 -10
  48. package/dist/cli/chat.js +30 -30
  49. package/dist/cli/check.js +6 -6
  50. package/dist/cli/plugins.js +13 -13
  51. package/dist/cli/snapshot-create.js +9 -9
  52. package/dist/cli/upgrade.js +7 -7
  53. package/dist/{db-VQAV4PJ3.js → db-BIIMAPFB.js} +7 -7
  54. package/dist/instrumentation.js +4 -4
  55. package/dist/nitro.js +2 -2
  56. package/dist/{oauth-callback-server-K5KQAAAX.js → oauth-callback-server-4BENCPP3.js} +23 -23
  57. package/dist/{runner-U7QI7P4S.js → runner-TUBJLEYO.js} +13 -13
  58. package/dist/{skills-ENKRBZ7K.js → skills-MBRLNBRV.js} +6 -6
  59. package/dist/spawn-ZWIXA46E.js +37 -0
  60. package/dist/{validation-VKCDVGA6.js → validation-YTJGRJYT.js} +6 -6
  61. package/dist/version.js +1 -1
  62. package/dist/{work-IBD6PWP2.js → work-5MRHKA54.js} +17 -17
  63. package/dist/worker-S2V7HZJ4.js +24 -0
  64. package/package.json +4 -4
  65. package/dist/spawn-4XGNONLS.js +0 -37
  66. package/dist/worker-TJFXOZRC.js +0 -24
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  processConversationWork
3
- } from "./chunk-VIBHFGQC.js";
3
+ } from "./chunk-AIQKUJKK.js";
4
4
  import {
5
5
  bindSpawnAgent
6
- } from "./chunk-MXO6VFB3.js";
6
+ } from "./chunk-UP6KQVF5.js";
7
7
  import {
8
8
  createAgentInvocationWorker,
9
9
  enqueueAgentInvocation,
10
10
  listPendingAgentInvocationMailboxAppends,
11
11
  routeAgentInvocationWork
12
- } from "./chunk-7J65DOBL.js";
12
+ } from "./chunk-27UQ7UB3.js";
13
13
  import {
14
14
  GET as GET2,
15
15
  GET2 as GET3,
@@ -36,12 +36,12 @@ import {
36
36
  startSlackProcessingReaction,
37
37
  stripLeadingBotMention,
38
38
  wakePausedTurn
39
- } from "./chunk-TA5R6BME.js";
39
+ } from "./chunk-DXSZJAVZ.js";
40
40
  import "./chunk-FA6POGLH.js";
41
41
  import {
42
42
  getTurnRequestDeadline,
43
43
  runWithTurnRequestDeadline
44
- } from "./chunk-S4PFOWRA.js";
44
+ } from "./chunk-WTQ3CKC3.js";
45
45
  import {
46
46
  GET,
47
47
  conversationVisibilityFromSlackChannelType,
@@ -51,8 +51,8 @@ import {
51
51
  resolveSlackChannelTypeFromMessage,
52
52
  resolveSlackConversationContext,
53
53
  routeApiTurnWork
54
- } from "./chunk-VBKFO65J.js";
55
- import "./chunk-4M25PSFB.js";
54
+ } from "./chunk-YSMAMSOU.js";
55
+ import "./chunk-UG673UVL.js";
56
56
  import {
57
57
  CONVERSATION_WORK_STALE_ENQUEUE_MS,
58
58
  appendAndEnqueueInboundMessage,
@@ -63,7 +63,7 @@ import {
63
63
  isInvalidConversationRecordError,
64
64
  listActiveConversationIds,
65
65
  removeActiveConversation
66
- } from "./chunk-BLCVTEE7.js";
66
+ } from "./chunk-FWDN67U3.js";
67
67
  import {
68
68
  buildDeliveredTurnStatePatch,
69
69
  claimDispatchMailboxAppend,
@@ -94,7 +94,7 @@ import {
94
94
  requireTurnFailureEventId,
95
95
  resolveTurnSessionRouting,
96
96
  scheduleSessionCompletedPluginTasks
97
- } from "./chunk-PP4UQTH3.js";
97
+ } from "./chunk-NCJV265M.js";
98
98
  import {
99
99
  ConversationTurnLifecycleService,
100
100
  coerceThreadConversationState,
@@ -104,7 +104,7 @@ import {
104
104
  persistThreadRuntimeState,
105
105
  persistThreadState,
106
106
  persistThreadStateById
107
- } from "./chunk-5TIH5GOE.js";
107
+ } from "./chunk-UKKOKMRE.js";
108
108
  import "./chunk-UTL3MHPC.js";
109
109
  import {
110
110
  getVercelConversationWorkQueue,
@@ -123,7 +123,7 @@ import {
123
123
  import {
124
124
  validatePluginEgressCredentialHooks,
125
125
  validatePluginRegistrations
126
- } from "./chunk-XRERMHPN.js";
126
+ } from "./chunk-6IADZQJR.js";
127
127
  import {
128
128
  defineJuniorPlugins,
129
129
  pluginCatalogConfigFromEnv,
@@ -155,11 +155,11 @@ import {
155
155
  setConfigDefaults,
156
156
  shouldEmitDevAgentTrace,
157
157
  shouldPropagateSandboxEgressTrace
158
- } from "./chunk-OWASYHHV.js";
158
+ } from "./chunk-SQOVZSWF.js";
159
159
  import {
160
160
  AuthorizationFlowDisabledError,
161
161
  PluginCredentialFailureError
162
- } from "./chunk-WNNYOPXX.js";
162
+ } from "./chunk-X7AIXRVJ.js";
163
163
  import "./chunk-DIB4GX3G.js";
164
164
  import {
165
165
  createAgentRunner,
@@ -167,7 +167,7 @@ import {
167
167
  deleteMcpAuthSessionsForUserProvider,
168
168
  deleteMcpServerSessionId,
169
169
  deleteMcpStoredOAuthCredentials
170
- } from "./chunk-AFQ47JQ7.js";
170
+ } from "./chunk-AZW5HKC5.js";
171
171
  import {
172
172
  RetryableDeliveryError
173
173
  } from "./chunk-RF6J3DIO.js";
@@ -175,7 +175,7 @@ import {
175
175
  formatProviderLabel,
176
176
  postSlackMessage,
177
177
  startOAuthFlow
178
- } from "./chunk-VDAEXEBB.js";
178
+ } from "./chunk-DJZPA72K.js";
179
179
  import "./chunk-7MA4HV4W.js";
180
180
  import {
181
181
  getExperimentalFeatures,
@@ -184,7 +184,7 @@ import {
184
184
  import {
185
185
  getSandboxResourceConfig,
186
186
  setSandboxResourceConfig
187
- } from "./chunk-GO2W3VZY.js";
187
+ } from "./chunk-PQWWCKNB.js";
188
188
  import {
189
189
  collectAttachmentGarbage,
190
190
  createSchedulerSqlStore,
@@ -192,10 +192,10 @@ import {
192
192
  logScheduledTaskRunSkipped,
193
193
  requestAttachmentDeletion,
194
194
  scheduledTaskRunAttributes
195
- } from "./chunk-HJ3EZHIX.js";
195
+ } from "./chunk-NT6V5WEE.js";
196
196
  import {
197
197
  parseSlackThreadId
198
- } from "./chunk-VYDM7HUF.js";
198
+ } from "./chunk-IJ6KWS3V.js";
199
199
  import {
200
200
  ConversationTurnBoundaryError,
201
201
  CooperativeTurnYieldError,
@@ -245,7 +245,7 @@ import {
245
245
  trimTrailingAssistantMessages,
246
246
  turnHasReply,
247
247
  upsertConversationMessage
248
- } from "./chunk-GEY6IFXH.js";
248
+ } from "./chunk-54O6IKUS.js";
249
249
  import "./chunk-3Y47VMHV.js";
250
250
  import "./chunk-PDO5BLNM.js";
251
251
  import "./chunk-UIE3R5XU.js";
@@ -265,7 +265,7 @@ import {
265
265
  verifyEventTaskCredentialSubject,
266
266
  verifyScheduledTaskCredentialSubject,
267
267
  verifySlackDirectCredentialSubject
268
- } from "./chunk-MGJW3SW4.js";
268
+ } from "./chunk-EBP6IS66.js";
269
269
  import {
270
270
  SlackActionError,
271
271
  downloadPrivateSlackFile,
@@ -275,7 +275,7 @@ import {
275
275
  normalizeSlackConversationId,
276
276
  runWithSlackInstallationToken,
277
277
  runWithWorkspaceTeamId
278
- } from "./chunk-MDZQ62PB.js";
278
+ } from "./chunk-K2LAI7RW.js";
279
279
  import {
280
280
  contextProvenance,
281
281
  createSlackDestination,
@@ -288,19 +288,19 @@ import {
288
288
  requireSlackDestination,
289
289
  withConversationEventLock,
290
290
  withConversationMutationLock
291
- } from "./chunk-G2FN3I66.js";
291
+ } from "./chunk-QODFNKQS.js";
292
292
  import {
293
293
  juniorAgentBindings,
294
294
  juniorAgentInvocations,
295
295
  juniorConversationEvents,
296
296
  juniorConversations
297
- } from "./chunk-3GS7O66Z.js";
297
+ } from "./chunk-O2DZWUPQ.js";
298
298
  import "./chunk-EM225ITJ.js";
299
299
  import {
300
300
  acquireActiveLock,
301
301
  getStateAdapter,
302
302
  withActiveLock
303
- } from "./chunk-I3OQVVMV.js";
303
+ } from "./chunk-Q5X37U6G.js";
304
304
  import {
305
305
  STANDARD_MODEL_PROFILE,
306
306
  botConfig,
@@ -318,16 +318,16 @@ import {
318
318
  modelIdForProfile,
319
319
  setSlackReactionConfig,
320
320
  standardModelId
321
- } from "./chunk-UJYA75N5.js";
321
+ } from "./chunk-L2PEQ2PY.js";
322
322
  import {
323
323
  juniorDestinations
324
324
  } from "./chunk-VFUK3X5B.js";
325
- import "./chunk-D7BNWRYL.js";
326
- import "./chunk-RQBRGPUF.js";
325
+ import "./chunk-PT7B6A3O.js";
326
+ import "./chunk-U7D4VLUF.js";
327
327
  import {
328
328
  pluginCatalogRuntime
329
- } from "./chunk-6MI43QZO.js";
330
- import "./chunk-77QB5FNI.js";
329
+ } from "./chunk-CNHELV2P.js";
330
+ import "./chunk-YCBZ47LC.js";
331
331
  import {
332
332
  credentialContextForActor
333
333
  } from "./chunk-BDUENQD3.js";
@@ -359,7 +359,7 @@ import {
359
359
  withContext,
360
360
  withLogContext,
361
361
  withSpan
362
- } from "./chunk-MKA3T2R6.js";
362
+ } from "./chunk-TD7ZQZ5W.js";
363
363
  import {
364
364
  continueTrace
365
365
  } from "./chunk-6GWA276C.js";
@@ -367,10 +367,10 @@ import "./chunk-OOUNJNMR.js";
367
367
  import "./chunk-H4HBKISO.js";
368
368
  import {
369
369
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
370
- } from "./chunk-F7VOY4VQ.js";
370
+ } from "./chunk-OGMHLKNO.js";
371
371
  import {
372
372
  JUNIOR_VERSION
373
- } from "./chunk-46ADYIPE.js";
373
+ } from "./chunk-LUIKMY35.js";
374
374
  import "./chunk-MLKGABMK.js";
375
375
 
376
376
  // src/app.ts
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-6MI43QZO.js";
4
- import "./chunk-77QB5FNI.js";
3
+ } from "./chunk-CNHELV2P.js";
4
+ import "./chunk-YCBZ47LC.js";
5
5
  import "./chunk-BDUENQD3.js";
6
6
  import "./chunk-V7YE4WCP.js";
7
- import "./chunk-MKA3T2R6.js";
7
+ import "./chunk-TD7ZQZ5W.js";
8
8
  import "./chunk-6GWA276C.js";
9
9
  import "./chunk-OOUNJNMR.js";
10
10
  import "./chunk-H4HBKISO.js";
11
- import "./chunk-F7VOY4VQ.js";
12
- import "./chunk-46ADYIPE.js";
11
+ import "./chunk-OGMHLKNO.js";
12
+ import "./chunk-LUIKMY35.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
  export {
15
15
  pluginCatalogRuntime
@@ -1016,7 +1016,10 @@ export interface ConversationEventPage {
1016
1016
  }
1017
1017
  /** Persist and read the canonical per-conversation event log. */
1018
1018
  export interface ConversationEventStore {
1019
- /** Append events atomically, optionally preserving conversation activity. */
1019
+ /**
1020
+ * Append events atomically, optionally preserving conversation activity.
1021
+ * Archive clears only for human user activity, not every non-preserve write.
1022
+ */
1020
1023
  append(conversationId: string, events: NewConversationEvent[], options?: {
1021
1024
  activity?: "preserve";
1022
1025
  }): Promise<void>;
@@ -11,7 +11,8 @@ export declare function ensureBlockSpacing(text: string): string;
11
11
  * or `{ type: "markdown" }` blocks.
12
12
  *
13
13
  * Pre-wraps bare URLs as Slack explicit links to prevent Slack's auto-linker
14
- * from consuming adjacent formatting markers. Slack reply delivery owns
14
+ * from consuming adjacent formatting markers. Also turns unambiguous GitHub
15
+ * `owner/repo#number` mentions into Markdown links. Slack reply delivery owns
15
16
  * chunking and continuation markers separately.
16
17
  */
17
18
  export declare function normalizeSlackReplyMarkdown(text: string): string;
@@ -256,6 +256,16 @@ export declare function ackMessages(args: {
256
256
  nowMs?: number;
257
257
  state?: StateAdapter;
258
258
  }): Promise<boolean>;
259
+ /** Cancel human-facing pending mailbox rows without requiring a worker lease. */
260
+ export declare function cancelHumanFacingPendingMessages(args: {
261
+ conversationId: string;
262
+ inboundMessageIds?: readonly string[];
263
+ receivedBeforeMs?: number;
264
+ nowMs?: number;
265
+ state?: StateAdapter;
266
+ }): Promise<{
267
+ cancelledInboundMessageIds: string[];
268
+ }>;
259
269
  /** Mark the leased conversation as needing another queue-delivered slice. */
260
270
  export declare function requestAnotherSlice(args: {
261
271
  conversationId: string;
@@ -136,6 +136,17 @@ export declare function ackMessages(args: {
136
136
  nowMs?: number;
137
137
  state?: StateAdapter;
138
138
  }): Promise<boolean>;
139
+ /** Cancel human-facing pending mailbox rows without requiring a worker lease. */
140
+ export declare function cancelHumanFacingPendingMessages(args: {
141
+ conversationId: string;
142
+ inboundMessageIds?: readonly string[];
143
+ receivedBeforeMs?: number;
144
+ conversationStore?: ConversationStore;
145
+ nowMs?: number;
146
+ state?: StateAdapter;
147
+ }): Promise<{
148
+ cancelledInboundMessageIds: string[];
149
+ }>;
139
150
  /** Mark the leased conversation as needing another queue-delivered slice. */
140
151
  export declare function requestAnotherSlice(args: {
141
152
  conversationId: string;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-BLCVTEE7.js";
3
+ } from "./chunk-FWDN67U3.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService,
6
6
  getPersistedSandboxState,
7
7
  getPersistedThreadState,
8
8
  persistThreadStateById
9
- } from "./chunk-5TIH5GOE.js";
9
+ } from "./chunk-UKKOKMRE.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-WNNYOPXX.js";
18
+ } from "./chunk-X7AIXRVJ.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-GEY6IFXH.js";
29
+ } from "./chunk-54O6IKUS.js";
30
30
  import {
31
31
  getConversationEventStore,
32
32
  getConversationStore,
33
33
  getSqlExecutor
34
- } from "./chunk-G2FN3I66.js";
34
+ } from "./chunk-QODFNKQS.js";
35
35
  import {
36
36
  juniorAgentBindings,
37
37
  juniorAgentInvocations
38
- } from "./chunk-3GS7O66Z.js";
38
+ } from "./chunk-O2DZWUPQ.js";
39
39
 
40
40
  // src/chat/agent-invocations/work.ts
41
41
  import { z } from "zod";
@@ -13,7 +13,7 @@ import {
13
13
  instructionProvenanceFor,
14
14
  sanitizePostgresJson,
15
15
  withConversationEventLock
16
- } from "./chunk-G2FN3I66.js";
16
+ } from "./chunk-QODFNKQS.js";
17
17
  import {
18
18
  SANDBOX_WORKSPACE_ROOT,
19
19
  sleep
@@ -23,14 +23,14 @@ import {
23
23
  fenceLock,
24
24
  getStateAdapter,
25
25
  withLock
26
- } from "./chunk-I3OQVVMV.js";
26
+ } from "./chunk-Q5X37U6G.js";
27
27
  import {
28
28
  botConfig,
29
29
  completeText,
30
30
  escapeXml,
31
31
  resolveGatewayModel,
32
32
  unwrapCurrentInstruction
33
- } from "./chunk-UJYA75N5.js";
33
+ } from "./chunk-L2PEQ2PY.js";
34
34
  import {
35
35
  parseSlackMessageTs,
36
36
  toStoredSlackActor
@@ -40,7 +40,7 @@ import {
40
40
  logException,
41
41
  logWarn,
42
42
  setSpanAttributes
43
- } from "./chunk-MKA3T2R6.js";
43
+ } from "./chunk-TD7ZQZ5W.js";
44
44
 
45
45
  // src/chat/turn-context-tag.ts
46
46
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-6MI43QZO.js";
3
+ } from "./chunk-CNHELV2P.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTurnRequestDeadline
3
- } from "./chunk-S4PFOWRA.js";
3
+ } from "./chunk-WTQ3CKC3.js";
4
4
  import {
5
5
  CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
6
6
  CONVERSATION_WORK_MAX_RETRIES,
@@ -21,20 +21,20 @@ import {
21
21
  releaseConversationWork,
22
22
  requestAnotherSlice,
23
23
  startConversationWork
24
- } from "./chunk-BLCVTEE7.js";
24
+ } from "./chunk-FWDN67U3.js";
25
25
  import {
26
26
  ConversationQueueMessageRejectedError
27
27
  } from "./chunk-JAL3CH4G.js";
28
28
  import {
29
29
  getChatConfig,
30
30
  isProviderRetryError
31
- } from "./chunk-UJYA75N5.js";
31
+ } from "./chunk-L2PEQ2PY.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-MKA3T2R6.js";
37
+ } from "./chunk-TD7ZQZ5W.js";
38
38
 
39
39
  // src/chat/task-execution/worker.ts
40
40
  var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
@@ -3,38 +3,38 @@ import {
3
3
  } from "./chunk-RF6J3DIO.js";
4
4
  import {
5
5
  resolveBaseUrl
6
- } from "./chunk-VDAEXEBB.js";
6
+ } from "./chunk-DJZPA72K.js";
7
7
  import {
8
8
  isExperimentalFeatureEnabled
9
9
  } from "./chunk-5IDFPCON.js";
10
10
  import {
11
11
  createPluginLogger,
12
12
  getPlugins
13
- } from "./chunk-MGJW3SW4.js";
13
+ } from "./chunk-EBP6IS66.js";
14
14
  import {
15
15
  getSlackClient,
16
16
  withSlackRetries
17
- } from "./chunk-MDZQ62PB.js";
17
+ } from "./chunk-K2LAI7RW.js";
18
18
  import {
19
19
  getDb,
20
20
  parseDestination
21
- } from "./chunk-G2FN3I66.js";
21
+ } from "./chunk-QODFNKQS.js";
22
22
  import {
23
23
  sleep
24
24
  } from "./chunk-EM225ITJ.js";
25
25
  import {
26
26
  acquireActiveLock,
27
27
  getStateAdapter
28
- } from "./chunk-I3OQVVMV.js";
28
+ } from "./chunk-Q5X37U6G.js";
29
29
  import {
30
30
  pluginCatalogRuntime
31
- } from "./chunk-6MI43QZO.js";
31
+ } from "./chunk-CNHELV2P.js";
32
32
  import {
33
33
  fetchWithBoundedOAuthErrorBodies
34
- } from "./chunk-77QB5FNI.js";
34
+ } from "./chunk-YCBZ47LC.js";
35
35
  import {
36
36
  isRecord
37
- } from "./chunk-MKA3T2R6.js";
37
+ } from "./chunk-TD7ZQZ5W.js";
38
38
 
39
39
  // src/chat/capabilities/router.ts
40
40
  var ProviderCredentialRouter = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-77QB5FNI.js";
3
+ } from "./chunk-YCBZ47LC.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -4,19 +4,19 @@ import {
4
4
  isDmChannel,
5
5
  normalizeSlackConversationId,
6
6
  withSlackRetries
7
- } from "./chunk-MDZQ62PB.js";
7
+ } from "./chunk-K2LAI7RW.js";
8
8
  import {
9
9
  parseDestination
10
- } from "./chunk-G2FN3I66.js";
10
+ } from "./chunk-QODFNKQS.js";
11
11
  import {
12
12
  getStateAdapter
13
- } from "./chunk-I3OQVVMV.js";
13
+ } from "./chunk-Q5X37U6G.js";
14
14
  import {
15
15
  normalizeSlackEmojiName
16
- } from "./chunk-UJYA75N5.js";
16
+ } from "./chunk-L2PEQ2PY.js";
17
17
  import {
18
18
  pluginCatalogRuntime
19
- } from "./chunk-6MI43QZO.js";
19
+ } from "./chunk-CNHELV2P.js";
20
20
  import {
21
21
  parseSlackMessageTs,
22
22
  parseSlackUserId
@@ -25,7 +25,7 @@ import {
25
25
  isRecord,
26
26
  logInfo,
27
27
  logWarn
28
- } from "./chunk-MKA3T2R6.js";
28
+ } from "./chunk-TD7ZQZ5W.js";
29
29
 
30
30
  // src/chat/slack/outbound.ts
31
31
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -379,6 +379,29 @@ function hasUnmatchedClosingParen(text) {
379
379
  }
380
380
  return balance < 0;
381
381
  }
382
+ var GITHUB_OWNER_PATTERN = "[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?";
383
+ var GITHUB_REPO_PATTERN = "[A-Za-z0-9._-]+";
384
+ var GITHUB_REPO_ISSUE_REF_PATTERN = new RegExp(
385
+ `^(${GITHUB_OWNER_PATTERN})\\/(${GITHUB_REPO_PATTERN})#(\\d+)\\b`
386
+ );
387
+ function isGitHubRefBoundary(char) {
388
+ return char === void 0 || !/[A-Za-z0-9._-]/.test(char);
389
+ }
390
+ function readGitHubRepoIssueRef(line, start) {
391
+ if (!isGitHubRefBoundary(start === 0 ? void 0 : line[start - 1])) {
392
+ return void 0;
393
+ }
394
+ const match = GITHUB_REPO_ISSUE_REF_PATTERN.exec(line.slice(start));
395
+ if (!match) {
396
+ return void 0;
397
+ }
398
+ const [text, owner, repo, number] = match;
399
+ return {
400
+ text,
401
+ end: start + text.length,
402
+ url: `https://github.com/${owner}/${repo}/issues/${number}`
403
+ };
404
+ }
382
405
  function readBareUrl(line, start) {
383
406
  let end = start;
384
407
  while (end < line.length) {
@@ -436,6 +459,12 @@ function wrapBareUrlsOnLine(line) {
436
459
  continue;
437
460
  }
438
461
  }
462
+ const repoIssueRef = readGitHubRepoIssueRef(line, i);
463
+ if (repoIssueRef) {
464
+ result += `[${repoIssueRef.text}](${repoIssueRef.url})`;
465
+ i = repoIssueRef.end;
466
+ continue;
467
+ }
439
468
  result += line[i];
440
469
  i++;
441
470
  }
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-FA6POGLH.js";
4
4
  import {
5
5
  getTurnRequestDeadline
6
- } from "./chunk-S4PFOWRA.js";
6
+ } from "./chunk-WTQ3CKC3.js";
7
7
  import {
8
8
  buildSentryConversationUrl,
9
9
  deleteWebAuthorization
10
- } from "./chunk-4M25PSFB.js";
10
+ } from "./chunk-UG673UVL.js";
11
11
  import {
12
12
  ensureConversationWake,
13
13
  requestConversationWork
14
- } from "./chunk-BLCVTEE7.js";
14
+ } from "./chunk-FWDN67U3.js";
15
15
  import {
16
16
  buildDeliveredTurnStatePatch,
17
17
  finalizeFailedTurnReplyWithEvent,
@@ -24,7 +24,7 @@ import {
24
24
  requireTurnFailureEventId,
25
25
  resolveTurnSessionRouting,
26
26
  scheduleSessionCompletedPluginTasks
27
- } from "./chunk-PP4UQTH3.js";
27
+ } from "./chunk-NCJV265M.js";
28
28
  import {
29
29
  ConversationTurnLifecycleService,
30
30
  coerceThreadConversationState,
@@ -33,7 +33,7 @@ import {
33
33
  getPersistedSandboxState,
34
34
  getPersistedThreadState,
35
35
  persistThreadStateById
36
- } from "./chunk-5TIH5GOE.js";
36
+ } from "./chunk-UKKOKMRE.js";
37
37
  import {
38
38
  getVercelConversationWorkQueue
39
39
  } from "./chunk-WR76IVA5.js";
@@ -47,7 +47,7 @@ import {
47
47
  lookupSlackUserProfile,
48
48
  resolvePluginOAuthAccount,
49
49
  runAgentWithTimeout
50
- } from "./chunk-AFQ47JQ7.js";
50
+ } from "./chunk-AZW5HKC5.js";
51
51
  import {
52
52
  RetryableDeliveryError
53
53
  } from "./chunk-RF6J3DIO.js";
@@ -63,13 +63,13 @@ import {
63
63
  removeReactionFromMessage,
64
64
  resolveBaseUrl,
65
65
  truncateStatusText
66
- } from "./chunk-VDAEXEBB.js";
66
+ } from "./chunk-DJZPA72K.js";
67
67
  import {
68
68
  parseSlackThreadId,
69
69
  readSlackRawMessageContext,
70
70
  resolveSlackChannelIdFromMessage,
71
71
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-VYDM7HUF.js";
72
+ } from "./chunk-IJ6KWS3V.js";
73
73
  import {
74
74
  CooperativeTurnYieldError,
75
75
  TurnSliceLimitExceededError,
@@ -96,29 +96,29 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-GEY6IFXH.js";
99
+ } from "./chunk-54O6IKUS.js";
100
100
  import {
101
101
  getDashboardConversationLink,
102
102
  getPluginSlackConversationLink
103
- } from "./chunk-MGJW3SW4.js";
103
+ } from "./chunk-EBP6IS66.js";
104
104
  import {
105
105
  SlackActionError,
106
106
  getHeaderString,
107
107
  getSlackClient,
108
108
  isDmChannel,
109
109
  normalizeSlackConversationId
110
- } from "./chunk-MDZQ62PB.js";
110
+ } from "./chunk-K2LAI7RW.js";
111
111
  import {
112
112
  getConversationEventStore,
113
113
  getSqlExecutor,
114
114
  requireSlackDestination,
115
115
  upsertIdentity,
116
116
  upsertLinkedIdentity
117
- } from "./chunk-G2FN3I66.js";
117
+ } from "./chunk-QODFNKQS.js";
118
118
  import {
119
119
  acquireActiveLock,
120
120
  getStateAdapter
121
- } from "./chunk-I3OQVVMV.js";
121
+ } from "./chunk-Q5X37U6G.js";
122
122
  import {
123
123
  botConfig,
124
124
  escapeXml,
@@ -126,18 +126,18 @@ import {
126
126
  getRuntimeMetadata,
127
127
  normalizeSlackEmojiName,
128
128
  standardModelId
129
- } from "./chunk-UJYA75N5.js";
129
+ } from "./chunk-L2PEQ2PY.js";
130
130
  import {
131
131
  discoverSkills
132
- } from "./chunk-RQBRGPUF.js";
132
+ } from "./chunk-U7D4VLUF.js";
133
133
  import {
134
134
  pluginCatalogRuntime
135
- } from "./chunk-6MI43QZO.js";
135
+ } from "./chunk-CNHELV2P.js";
136
136
  import {
137
137
  buildOAuthTokenRequest,
138
138
  hasRequiredOAuthScope,
139
139
  parseOAuthTokenResponse
140
- } from "./chunk-77QB5FNI.js";
140
+ } from "./chunk-YCBZ47LC.js";
141
141
  import {
142
142
  createSlackResumeActor,
143
143
  isUserActor,
@@ -153,7 +153,7 @@ import {
153
153
  setTags,
154
154
  toOptionalString,
155
155
  withLogContext
156
- } from "./chunk-MKA3T2R6.js";
156
+ } from "./chunk-TD7ZQZ5W.js";
157
157
  import {
158
158
  homeDir
159
159
  } from "./chunk-H4HBKISO.js";