@sentry/junior 0.161.0 → 0.162.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 (60) hide show
  1. package/dist/{agent-hooks-O75UJNC6.js → agent-hooks-TL2SGC5W.js} +9 -9
  2. package/dist/api/locations/detail.d.ts +1 -1
  3. package/dist/api/schema/conversation.d.ts +3 -0
  4. package/dist/api/schema/location.d.ts +1 -0
  5. package/dist/api/schema/person.d.ts +1 -0
  6. package/dist/api.js +22 -22
  7. package/dist/app.js +31 -31
  8. package/dist/{catalog-runtime-Z3FHU4ZY.js → catalog-runtime-IGSMIADJ.js} +5 -5
  9. package/dist/chat/conversations/message-search.d.ts +6 -0
  10. package/dist/chat/slack/tools/conversation-message-search.d.ts +9 -0
  11. package/dist/{chunk-ZBCLWBMV.js → chunk-4WYGQ47U.js} +5 -5
  12. package/dist/{chunk-G35DUPNB.js → chunk-5NEBOHRG.js} +4 -4
  13. package/dist/{chunk-RULQD7OX.js → chunk-6BJFIWEV.js} +4 -4
  14. package/dist/{chunk-EAIQBR66.js → chunk-7DTPFFQX.js} +1 -1
  15. package/dist/{chunk-O7JTSJPU.js → chunk-AJ7J2HWY.js} +6 -6
  16. package/dist/{chunk-WKN4ZQTZ.js → chunk-BPZQWAZJ.js} +1 -1
  17. package/dist/{chunk-IW7C5C7E.js → chunk-C3KUKA27.js} +17 -17
  18. package/dist/{chunk-FLMD25Y5.js → chunk-CZ6EHOU5.js} +1 -1
  19. package/dist/{chunk-U2XOBFDK.js → chunk-DDQ43S5Q.js} +49 -4
  20. package/dist/{chunk-IYFKONIL.js → chunk-DZC3F2UI.js} +1 -1
  21. package/dist/{chunk-6WTDZKFR.js → chunk-EBEHJPFF.js} +1 -1
  22. package/dist/{chunk-OYQEO72I.js → chunk-EHQLTK3X.js} +58 -25
  23. package/dist/{chunk-CGAIDDLD.js → chunk-FESUWAYU.js} +1 -1
  24. package/dist/{chunk-DGKLYDX7.js → chunk-FEWT5KPP.js} +2 -2
  25. package/dist/{chunk-QHXT7LLF.js → chunk-H2KW7AZC.js} +1 -1
  26. package/dist/{chunk-6ILVZOF6.js → chunk-HW4BW3PC.js} +4 -4
  27. package/dist/{chunk-MVG5UPLM.js → chunk-JJ3VXFDI.js} +1 -1
  28. package/dist/{chunk-4WAZ6DGX.js → chunk-JRVURR3H.js} +10 -10
  29. package/dist/{chunk-OY2DBUV4.js → chunk-K7IV6UV3.js} +5 -5
  30. package/dist/{chunk-OPIJ6HY3.js → chunk-KQSO4DJ4.js} +9 -9
  31. package/dist/{chunk-IRHX2S46.js → chunk-MMBMDSRK.js} +1 -1
  32. package/dist/{chunk-RVENVPNO.js → chunk-MNCEGXEH.js} +2 -2
  33. package/dist/{chunk-VXFDVY4C.js → chunk-O6P7DZ6O.js} +6 -6
  34. package/dist/{chunk-V67ORYKQ.js → chunk-OBFRMQBY.js} +7 -7
  35. package/dist/{chunk-QQ7SY5IZ.js → chunk-OPNJRQDP.js} +5 -5
  36. package/dist/{chunk-MNY5M7RB.js → chunk-QHCIZLIX.js} +5 -5
  37. package/dist/{chunk-HSFYTIS2.js → chunk-RDV4BQRZ.js} +1 -1
  38. package/dist/{chunk-WVSQ2SCS.js → chunk-THXMSSFZ.js} +1 -1
  39. package/dist/{chunk-STZVUVMS.js → chunk-V7QL4QMW.js} +4 -4
  40. package/dist/{chunk-YSWHAOPQ.js → chunk-WHAJ3QVY.js} +1 -1
  41. package/dist/{chunk-DNSIU27S.js → chunk-Y75ZDQB5.js} +1 -1
  42. package/dist/cli/chat.js +29 -29
  43. package/dist/cli/check.js +6 -6
  44. package/dist/cli/plugins.js +12 -12
  45. package/dist/cli/snapshot-create.js +9 -9
  46. package/dist/cli/upgrade.js +7 -7
  47. package/dist/{db-KKOZRE62.js → db-66XZ4HHQ.js} +7 -7
  48. package/dist/instrumentation.js +4 -4
  49. package/dist/nitro.js +2 -2
  50. package/dist/{oauth-callback-server-5AUZDWXA.js → oauth-callback-server-FMLKDUUF.js} +22 -22
  51. package/dist/{runner-K5H5NDEC.js → runner-YZONUMNY.js} +12 -12
  52. package/dist/{skills-OZGPB6G4.js → skills-3UDJJXSO.js} +6 -6
  53. package/dist/spawn-TBPVA5S2.js +37 -0
  54. package/dist/{validation-TVHCNCYL.js → validation-3HTDBONC.js} +6 -6
  55. package/dist/version.js +1 -1
  56. package/dist/{work-DXCQMJ5U.js → work-O4YTIS54.js} +17 -17
  57. package/dist/worker-WHURUEYX.js +24 -0
  58. package/package.json +4 -4
  59. package/dist/spawn-RCQSC2L5.js +0 -37
  60. package/dist/worker-24HZ5HRI.js +0 -24
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-FA6POGLH.js";
4
4
  import {
5
5
  getTurnRequestDeadline
6
- } from "./chunk-IRHX2S46.js";
6
+ } from "./chunk-MMBMDSRK.js";
7
7
  import {
8
8
  buildSentryConversationUrl,
9
9
  deleteWebAuthorization
10
- } from "./chunk-HSFYTIS2.js";
10
+ } from "./chunk-RDV4BQRZ.js";
11
11
  import {
12
12
  ensureConversationWake,
13
13
  requestConversationWork
14
- } from "./chunk-G35DUPNB.js";
14
+ } from "./chunk-5NEBOHRG.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-OPIJ6HY3.js";
27
+ } from "./chunk-KQSO4DJ4.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-QQ7SY5IZ.js";
36
+ } from "./chunk-OPNJRQDP.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-V67ORYKQ.js";
50
+ } from "./chunk-OBFRMQBY.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-VXFDVY4C.js";
66
+ } from "./chunk-O6P7DZ6O.js";
67
67
  import {
68
68
  parseSlackThreadId,
69
69
  readSlackRawMessageContext,
70
70
  resolveSlackChannelIdFromMessage,
71
71
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-YSWHAOPQ.js";
72
+ } from "./chunk-WHAJ3QVY.js";
73
73
  import {
74
74
  CooperativeTurnYieldError,
75
75
  TurnSliceLimitExceededError,
@@ -96,7 +96,7 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-STZVUVMS.js";
99
+ } from "./chunk-V7QL4QMW.js";
100
100
  import {
101
101
  SlackActionError,
102
102
  getDashboardConversationLink,
@@ -105,18 +105,18 @@ import {
105
105
  getSlackClient,
106
106
  isDmChannel,
107
107
  normalizeSlackConversationId
108
- } from "./chunk-MNY5M7RB.js";
108
+ } from "./chunk-QHCIZLIX.js";
109
109
  import {
110
110
  getConversationEventStore,
111
111
  getSqlExecutor,
112
112
  requireSlackDestination,
113
113
  upsertIdentity,
114
114
  upsertLinkedIdentity
115
- } from "./chunk-U2XOBFDK.js";
115
+ } from "./chunk-DDQ43S5Q.js";
116
116
  import {
117
117
  acquireActiveLock,
118
118
  getStateAdapter
119
- } from "./chunk-IYFKONIL.js";
119
+ } from "./chunk-DZC3F2UI.js";
120
120
  import {
121
121
  botConfig,
122
122
  escapeXml,
@@ -124,18 +124,18 @@ import {
124
124
  getRuntimeMetadata,
125
125
  normalizeSlackEmojiName,
126
126
  standardModelId
127
- } from "./chunk-RVENVPNO.js";
127
+ } from "./chunk-MNCEGXEH.js";
128
128
  import {
129
129
  discoverSkills
130
- } from "./chunk-DGKLYDX7.js";
130
+ } from "./chunk-FEWT5KPP.js";
131
131
  import {
132
132
  pluginCatalogRuntime
133
- } from "./chunk-CGAIDDLD.js";
133
+ } from "./chunk-FESUWAYU.js";
134
134
  import {
135
135
  buildOAuthTokenRequest,
136
136
  hasRequiredOAuthScope,
137
137
  parseOAuthTokenResponse
138
- } from "./chunk-6WTDZKFR.js";
138
+ } from "./chunk-EBEHJPFF.js";
139
139
  import {
140
140
  createSlackResumeActor,
141
141
  isUserActor,
@@ -151,7 +151,7 @@ import {
151
151
  setTags,
152
152
  toOptionalString,
153
153
  withLogContext
154
- } from "./chunk-DNSIU27S.js";
154
+ } from "./chunk-Y75ZDQB5.js";
155
155
  import {
156
156
  homeDir
157
157
  } from "./chunk-H4HBKISO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-RVENVPNO.js";
3
+ } from "./chunk-MNCEGXEH.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  createJuniorSqlExecutor,
3
+ juniorConversationAnnotations,
3
4
  juniorConversationBindings,
4
5
  juniorConversationEvents,
5
6
  juniorConversationParticipants,
6
7
  juniorConversations,
7
8
  juniorIdentities,
8
9
  juniorUsers
9
- } from "./chunk-FLMD25Y5.js";
10
+ } from "./chunk-CZ6EHOU5.js";
10
11
  import {
11
12
  TURN_REASONING_LEVELS,
12
13
  getChatConfig,
13
14
  modelProfileSchema
14
- } from "./chunk-RVENVPNO.js";
15
+ } from "./chunk-MNCEGXEH.js";
15
16
  import {
16
17
  juniorDestinations
17
18
  } from "./chunk-VFUK3X5B.js";
@@ -22,7 +23,7 @@ import {
22
23
  } from "./chunk-V7YE4WCP.js";
23
24
  import {
24
25
  normalizeIdentityEmail
25
- } from "./chunk-DNSIU27S.js";
26
+ } from "./chunk-Y75ZDQB5.js";
26
27
 
27
28
  // src/chat/conversations/sql/store.ts
28
29
  import { randomUUID as randomUUID2 } from "crypto";
@@ -1941,7 +1942,16 @@ function createSqlConversationEventStore(executor) {
1941
1942
  }
1942
1943
 
1943
1944
  // src/chat/conversations/sql/message-search.ts
1944
- import { and as and7, desc as desc3, eq as eq7, isNull as isNull2, ne, sql as sql7 } from "drizzle-orm";
1945
+ import {
1946
+ and as and7,
1947
+ desc as desc3,
1948
+ eq as eq7,
1949
+ gte as gte2,
1950
+ isNull as isNull2,
1951
+ lt as lt2,
1952
+ ne,
1953
+ sql as sql7
1954
+ } from "drizzle-orm";
1945
1955
  var EXCERPT_WITHOUT_QUERY_CHARS = 240;
1946
1956
  var SqlConversationMessageSearchStore = class {
1947
1957
  constructor(executor) {
@@ -1976,6 +1986,41 @@ var SqlConversationMessageSearchStore = class {
1976
1986
  eq7(juniorDestinations.providerDestinationId, args.filters.channelId)
1977
1987
  );
1978
1988
  }
1989
+ if (args.filters.afterMs !== void 0 && Number.isFinite(args.filters.afterMs)) {
1990
+ conditions.push(
1991
+ gte2(juniorConversations.lastActivityAt, new Date(args.filters.afterMs))
1992
+ );
1993
+ }
1994
+ if (args.filters.beforeMs !== void 0 && Number.isFinite(args.filters.beforeMs)) {
1995
+ conditions.push(
1996
+ lt2(juniorConversations.lastActivityAt, new Date(args.filters.beforeMs))
1997
+ );
1998
+ }
1999
+ if (args.filters.annotation) {
2000
+ const annotation = args.filters.annotation.toLowerCase();
2001
+ const nestedAnnotationPrefix = `${annotation}#`;
2002
+ conditions.push(
2003
+ sql7`exists (
2004
+ select 1
2005
+ from ${juniorConversationAnnotations}
2006
+ where ${and7(
2007
+ eq7(
2008
+ juniorConversationAnnotations.conversationId,
2009
+ juniorConversations.conversationId
2010
+ ),
2011
+ // Exact key, or a nested child that continues with "#".
2012
+ // Avoids sibling key collisions and partial nested-id prefixes.
2013
+ sql7`(
2014
+ lower(${juniorConversationAnnotations.key}) = ${annotation}
2015
+ or starts_with(
2016
+ lower(${juniorConversationAnnotations.key}),
2017
+ ${nestedAnnotationPrefix}
2018
+ )
2019
+ )`
2020
+ )}
2021
+ )`
2022
+ );
2023
+ }
1979
2024
  const bestPerConversation = db.selectDistinctOn([juniorConversations.conversationId], {
1980
2025
  channelName: juniorDestinations.displayName,
1981
2026
  conversationId: juniorConversations.conversationId,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-RVENVPNO.js";
3
+ } from "./chunk-MNCEGXEH.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-DNSIU27S.js";
8
+ } from "./chunk-Y75ZDQB5.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -7,7 +7,7 @@ import {
7
7
  PluginCredentialFailureError,
8
8
  agentNameSchema,
9
9
  createPluginAuthOrchestration
10
- } from "./chunk-OY2DBUV4.js";
10
+ } from "./chunk-K7IV6UV3.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-V67ORYKQ.js";
35
+ } from "./chunk-OBFRMQBY.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-VXFDVY4C.js";
51
+ } from "./chunk-O6P7DZ6O.js";
52
52
  import {
53
53
  parseSandboxEgressAuthRequiredSignal,
54
54
  parseSandboxEgressPermissionDeniedSignal,
@@ -74,7 +74,7 @@ import {
74
74
  runNonInteractiveCommand,
75
75
  throwSandboxOperationError,
76
76
  wrapSandboxSetupError
77
- } from "./chunk-RULQD7OX.js";
77
+ } from "./chunk-6BJFIWEV.js";
78
78
  import {
79
79
  SCHEDULED_TASK_SYSTEM_ACTOR,
80
80
  compactEventTask,
@@ -107,10 +107,10 @@ import {
107
107
  scheduledTaskAttributes,
108
108
  storeAttachments,
109
109
  writableEventTask
110
- } from "./chunk-ZBCLWBMV.js";
110
+ } from "./chunk-4WYGQ47U.js";
111
111
  import {
112
112
  parseSlackThreadId
113
- } from "./chunk-YSWHAOPQ.js";
113
+ } from "./chunk-WHAJ3QVY.js";
114
114
  import {
115
115
  AGENTS_REMOVAL_NOTICE,
116
116
  AGENTS_REPLACEMENT_NOTICE,
@@ -181,7 +181,7 @@ import {
181
181
  stripRuntimeTurnContext,
182
182
  trimTrailingAssistantMessages,
183
183
  truncateText
184
- } from "./chunk-STZVUVMS.js";
184
+ } from "./chunk-V7QL4QMW.js";
185
185
  import {
186
186
  JUNIOR_THREAD_STATE_TTL_MS
187
187
  } from "./chunk-3Y47VMHV.js";
@@ -204,7 +204,7 @@ import {
204
204
  readActorIdentity,
205
205
  resolveChannelCapabilities,
206
206
  withSlackRetries
207
- } from "./chunk-MNY5M7RB.js";
207
+ } from "./chunk-QHCIZLIX.js";
208
208
  import {
209
209
  KNOWN_CONVERSATION_EVENT_TYPES,
210
210
  contextProvenance,
@@ -216,11 +216,11 @@ import {
216
216
  instructionActors,
217
217
  instructionProvenanceFor,
218
218
  sameActorIdentity
219
- } from "./chunk-U2XOBFDK.js";
219
+ } from "./chunk-DDQ43S5Q.js";
220
220
  import {
221
221
  juniorArtifacts,
222
222
  juniorIdentities
223
- } from "./chunk-FLMD25Y5.js";
223
+ } from "./chunk-CZ6EHOU5.js";
224
224
  import {
225
225
  SANDBOX_DATA_ROOT,
226
226
  SANDBOX_SKILLS_ROOT,
@@ -232,7 +232,7 @@ import {
232
232
  } from "./chunk-EM225ITJ.js";
233
233
  import {
234
234
  getStateAdapter
235
- } from "./chunk-IYFKONIL.js";
235
+ } from "./chunk-DZC3F2UI.js";
236
236
  import {
237
237
  ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
238
238
  COMPACTION_SUMMARY_PREFIX,
@@ -265,7 +265,7 @@ import {
265
265
  resolveGatewayCredential,
266
266
  resolveGatewayModel,
267
267
  unwrapCurrentInstruction
268
- } from "./chunk-RVENVPNO.js";
268
+ } from "./chunk-MNCEGXEH.js";
269
269
  import {
270
270
  canExposeConversationPayload,
271
271
  resolveConversationPrivacy,
@@ -275,16 +275,16 @@ import {
275
275
  toGenAiMessagesTraceAttributes,
276
276
  toGenAiPayloadMetadata,
277
277
  toGenAiPayloadTraceAttributes
278
- } from "./chunk-EAIQBR66.js";
278
+ } from "./chunk-7DTPFFQX.js";
279
279
  import {
280
280
  discoverSkills,
281
281
  findSkillByName,
282
282
  loadSkillsByName,
283
283
  parseSkillInvocation
284
- } from "./chunk-DGKLYDX7.js";
284
+ } from "./chunk-FEWT5KPP.js";
285
285
  import {
286
286
  pluginCatalogRuntime
287
- } from "./chunk-CGAIDDLD.js";
287
+ } from "./chunk-FESUWAYU.js";
288
288
  import {
289
289
  CredentialUnavailableError,
290
290
  OAuthProviderError,
@@ -292,7 +292,7 @@ import {
292
292
  getOAuthProviderErrorAttributes,
293
293
  resolveAuthTokenPlaceholder,
294
294
  resolvePluginCommandEnv
295
- } from "./chunk-6WTDZKFR.js";
295
+ } from "./chunk-EBEHJPFF.js";
296
296
  import {
297
297
  credentialUserSubjectId
298
298
  } from "./chunk-BDUENQD3.js";
@@ -320,7 +320,7 @@ import {
320
320
  summarizeMessageText,
321
321
  withLogContext,
322
322
  withSpan
323
- } from "./chunk-DNSIU27S.js";
323
+ } from "./chunk-Y75ZDQB5.js";
324
324
  import {
325
325
  startInactiveSpan,
326
326
  withActiveSpan
@@ -10008,8 +10008,12 @@ var CONVERSATIONS_TOOL_SOURCE = {
10008
10008
  };
10009
10009
 
10010
10010
  // src/chat/slack/tools/conversation-message-search.ts
10011
- var DEFAULT_LIMIT = 5;
10011
+ var DEFAULT_LIMIT = 20;
10012
+ var MAX_LIMIT = 50;
10012
10013
  var conversationMessageSearchOutputSchema = juniorToolOutputSchema.extend({
10014
+ after: z39.string().datetime().optional(),
10015
+ annotation: z39.string().min(1).optional(),
10016
+ before: z39.string().datetime().optional(),
10013
10017
  channel_id: z39.string().min(1).optional(),
10014
10018
  count: z39.number().int().nonnegative(),
10015
10019
  query: z39.string().optional(),
@@ -10027,8 +10031,21 @@ var conversationMessageSearchOutputSchema = juniorToolOutputSchema.extend({
10027
10031
  }).strict()
10028
10032
  )
10029
10033
  });
10034
+ function parseTimestamp(field, value) {
10035
+ if (value == null || value.trim() === "") {
10036
+ return void 0;
10037
+ }
10038
+ const parsed = Date.parse(value);
10039
+ if (!Number.isFinite(parsed)) {
10040
+ throw new ToolInputError(`${field} must be a valid ISO-8601 timestamp`);
10041
+ }
10042
+ return parsed;
10043
+ }
10030
10044
  async function resolveSearchFilters(input) {
10031
10045
  const query = input.query?.trim() || void 0;
10046
+ const annotation = input.annotation?.trim() || void 0;
10047
+ const afterMs = parseTimestamp("after", input.after);
10048
+ const beforeMs = parseTimestamp("before", input.before);
10032
10049
  let channelId;
10033
10050
  if (input.channel_id != null && input.channel_id.trim() !== "") {
10034
10051
  const target = await resolveSlackChannelRef({
@@ -10037,19 +10054,25 @@ async function resolveSearchFilters(input) {
10037
10054
  });
10038
10055
  channelId = target.channelId;
10039
10056
  }
10040
- if (!query && !channelId) {
10057
+ if (afterMs !== void 0 && beforeMs !== void 0 && afterMs >= beforeMs) {
10058
+ throw new ToolInputError("`after` must be earlier than `before`");
10059
+ }
10060
+ if (!query && !channelId && !annotation) {
10041
10061
  throw new ToolInputError(
10042
- "Provide at least one of `query` or `channel_id`."
10062
+ "Provide at least one of `query`, `channel_id`, or `annotation`."
10043
10063
  );
10044
10064
  }
10045
10065
  return {
10066
+ ...afterMs !== void 0 ? { afterMs } : {},
10067
+ ...annotation ? { annotation } : {},
10068
+ ...beforeMs !== void 0 ? { beforeMs } : {},
10046
10069
  ...channelId ? { channelId } : {},
10047
10070
  ...query ? { query } : {}
10048
10071
  };
10049
10072
  }
10050
10073
  function createSlackConversationMessageSearchTool(scope, currentConversationId) {
10051
10074
  return zodTool({
10052
- description: "Search retained user and assistant messages from public conversations in this Slack workspace. Excludes the current conversation. Not live Slack workspace search.",
10075
+ description: "Search retained user and assistant messages from public conversations in this Slack workspace. Filter by message text, channel, time range, or linked annotation such as a resource key. Excludes the current conversation. Not live Slack workspace search.",
10053
10076
  exposure: "deferred",
10054
10077
  source: CONVERSATIONS_TOOL_SOURCE,
10055
10078
  annotations: {
@@ -10059,9 +10082,16 @@ function createSlackConversationMessageSearchTool(scope, currentConversationId)
10059
10082
  readOnlyHint: true
10060
10083
  },
10061
10084
  inputSchema: z39.object({
10085
+ after: z39.string().datetime().nullable().describe("Include conversations active at or after this timestamp.").optional(),
10086
+ annotation: z39.string().trim().min(1).max(256).nullable().describe(
10087
+ "Linked resource key. Matches that key, or nested children that continue with #."
10088
+ ).optional(),
10089
+ before: z39.string().datetime().nullable().describe("Include conversations active before this timestamp.").optional(),
10062
10090
  channel_id: slackChannelRefParam.nullable().optional(),
10063
10091
  query: z39.string().trim().min(1).max(200).nullable().describe("Words or phrase to match in message text.").optional(),
10064
- limit: z39.number().int().min(1).max(10).describe(`Maximum matches. Default ${DEFAULT_LIMIT}; max 10.`).nullable().optional()
10092
+ limit: z39.number().int().min(1).max(MAX_LIMIT).describe(
10093
+ `Maximum conversations. Default ${DEFAULT_LIMIT}; max ${MAX_LIMIT}.`
10094
+ ).nullable().optional()
10065
10095
  }).strict(),
10066
10096
  outputSchema: conversationMessageSearchOutputSchema,
10067
10097
  execute: async (input) => {
@@ -10099,6 +10129,9 @@ function createSlackConversationMessageSearchTool(scope, currentConversationId)
10099
10129
  })
10100
10130
  );
10101
10131
  return {
10132
+ ...filters.afterMs !== void 0 ? { after: new Date(filters.afterMs).toISOString() } : {},
10133
+ ...filters.annotation ? { annotation: filters.annotation } : {},
10134
+ ...filters.beforeMs !== void 0 ? { before: new Date(filters.beforeMs).toISOString() } : {},
10102
10135
  ...filters.query ? { query: filters.query } : {},
10103
10136
  ...filters.channelId ? { channel_id: filters.channelId } : {},
10104
10137
  count: matchesOutput.length,
@@ -12597,7 +12630,7 @@ function createUnpublishImageTool(args) {
12597
12630
  // src/chat/tools/search-conversation-events.ts
12598
12631
  import { z as z58 } from "zod";
12599
12632
  var DEFAULT_LIMIT3 = 25;
12600
- var MAX_LIMIT = 100;
12633
+ var MAX_LIMIT2 = 100;
12601
12634
  var MAX_EVENT_DATA_BYTES = 4e3;
12602
12635
  var MAX_EVENTS_JSON_BYTES = 2e4;
12603
12636
  var MAX_IDENTITY_CHARS = 256;
@@ -12634,8 +12667,8 @@ function createSearchConversationEventsTool(context) {
12634
12667
  ).optional(),
12635
12668
  after_seq: z58.number().int().nonnegative().nullable().describe("Exclusive event sequence lower bound; returns ascending.").optional(),
12636
12669
  before_seq: z58.number().int().nonnegative().nullable().describe("Exclusive event sequence upper bound.").optional(),
12637
- limit: z58.number().int().min(1).max(MAX_LIMIT).nullable().describe(
12638
- `Maximum events. Default ${DEFAULT_LIMIT3}; max ${MAX_LIMIT}.`
12670
+ limit: z58.number().int().min(1).max(MAX_LIMIT2).nullable().describe(
12671
+ `Maximum events. Default ${DEFAULT_LIMIT3}; max ${MAX_LIMIT2}.`
12639
12672
  ).optional(),
12640
12673
  types: z58.array(knownEventTypeSchema).min(1).nullable().describe("Event types to include; omit for all types.").optional()
12641
12674
  }).strict(),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-6WTDZKFR.js";
3
+ } from "./chunk-EBEHJPFF.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-CGAIDDLD.js";
3
+ } from "./chunk-FESUWAYU.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-DNSIU27S.js";
6
+ } from "./chunk-Y75ZDQB5.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-O7JTSJPU.js";
3
+ } from "./chunk-AJ7J2HWY.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTurnRequestDeadline
3
- } from "./chunk-IRHX2S46.js";
3
+ } from "./chunk-MMBMDSRK.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-G35DUPNB.js";
24
+ } from "./chunk-5NEBOHRG.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-RVENVPNO.js";
31
+ } from "./chunk-MNCEGXEH.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-DNSIU27S.js";
37
+ } from "./chunk-Y75ZDQB5.js";
38
38
 
39
39
  // src/chat/task-execution/worker.ts
40
40
  var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-CGAIDDLD.js";
3
+ } from "./chunk-FESUWAYU.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebAuthorization,
3
3
  deleteWebAuthorization
4
- } from "./chunk-HSFYTIS2.js";
4
+ } from "./chunk-RDV4BQRZ.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-G35DUPNB.js";
7
+ } from "./chunk-5NEBOHRG.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-OPIJ6HY3.js";
15
+ } from "./chunk-KQSO4DJ4.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-QQ7SY5IZ.js";
22
+ } from "./chunk-OPNJRQDP.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-YSWHAOPQ.js";
28
+ } from "./chunk-WHAJ3QVY.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -48,17 +48,17 @@ import {
48
48
  saveTurnCheckpoint,
49
49
  startActiveTurn,
50
50
  upsertConversationMessage
51
- } from "./chunk-STZVUVMS.js";
51
+ } from "./chunk-V7QL4QMW.js";
52
52
  import {
53
53
  normalizeSlackConversationId
54
- } from "./chunk-MNY5M7RB.js";
54
+ } from "./chunk-QHCIZLIX.js";
55
55
  import {
56
56
  getConversationEventStore,
57
57
  getConversationStore
58
- } from "./chunk-U2XOBFDK.js";
58
+ } from "./chunk-DDQ43S5Q.js";
59
59
  import {
60
60
  getSlackBotToken
61
- } from "./chunk-RVENVPNO.js";
61
+ } from "./chunk-MNCEGXEH.js";
62
62
  import {
63
63
  credentialContextForActor
64
64
  } from "./chunk-BDUENQD3.js";
@@ -67,7 +67,7 @@ import {
67
67
  logWarn,
68
68
  setTags,
69
69
  withLogContext
70
- } from "./chunk-DNSIU27S.js";
70
+ } from "./chunk-Y75ZDQB5.js";
71
71
 
72
72
  // src/handlers/health.ts
73
73
  function readHealthReport() {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  formatProviderLabel,
6
6
  startOAuthFlow
7
- } from "./chunk-VXFDVY4C.js";
7
+ } from "./chunk-O6P7DZ6O.js";
8
8
  import {
9
9
  parseSandboxEgressAuthRequiredSignal
10
10
  } from "./chunk-7MA4HV4W.js";
@@ -12,16 +12,16 @@ import {
12
12
  abandonReplacedPendingAuth,
13
13
  canReusePendingAuthLink,
14
14
  recordAuthorizationRequested
15
- } from "./chunk-STZVUVMS.js";
15
+ } from "./chunk-V7QL4QMW.js";
16
16
  import {
17
17
  AGENT_INVOCATION_MAILBOX_STATUSES
18
- } from "./chunk-FLMD25Y5.js";
18
+ } from "./chunk-CZ6EHOU5.js";
19
19
  import {
20
20
  TURN_REASONING_LEVELS
21
- } from "./chunk-RVENVPNO.js";
21
+ } from "./chunk-MNCEGXEH.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-CGAIDDLD.js";
24
+ } from "./chunk-FESUWAYU.js";
25
25
  import {
26
26
  credentialContextSchema
27
27
  } from "./chunk-BDUENQD3.js";