@sentry/junior 0.288.0 → 0.289.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/{adapter-Cikcqdty.js → adapter-tE1wnl0T.js} +1 -1
  2. package/dist/{admin-BcSxHuTB.js → admin-BmsPbmO_.js} +2 -2
  3. package/dist/{agent-runner-9MXyWUL8.js → agent-runner-bvl8U5uH.js} +343 -103
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +281 -254
  8. package/dist/{app-BUklJVBe.d.ts → app-Cu454FXq.d.ts} +2 -4
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +92 -64
  11. package/dist/assistant-reply-1N9oxyyb.js +58 -0
  12. package/dist/{automation-DDXwHQs5.js → automation-DWbjJltM.js} +1 -1
  13. package/dist/{background-compaction-queue-CjllSPir.js → background-compaction-queue-D36oCldp.js} +4 -4
  14. package/dist/{briefs-DW9iuolG.js → briefs-CV-1qkXa.js} +3 -4
  15. package/dist/{catalog-runtime-B3gfH58M.js → catalog-runtime-BNK4uJVZ.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{config-CLJcyYEF.js → config-DHAy7XlP.js} +4 -41
  24. package/dist/{connections-BtdJftow.js → connections-C3VmH3cf.js} +7 -129
  25. package/dist/{conversation-DhoqHtQ7.js → conversation-CwC8K3RZ.js} +8 -8
  26. package/dist/{conversation-pending-messages-DHV0S4uF.js → conversation-pending-messages-B0cuLReP.js} +1 -1
  27. package/dist/{conversation-privacy-BPirIVlX.js → conversation-privacy-Bky_veSp.js} +1 -1
  28. package/dist/{credential-sync-Co8Q2xRW.js → credential-sync-dY9o0YSj.js} +13 -13
  29. package/dist/{db-Co7DTYYh.js → db-BS2Kql3j.js} +56 -31
  30. package/dist/{db-zIs8-Ba3.d.ts → db-BebRmhsH.d.ts} +5 -1
  31. package/dist/{executor-m0kIN71Q.js → executor-cc4nH86C.js} +35 -9
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-DbD-dErY.js → logging-CtCJmt9p.js} +2 -2
  34. package/dist/{history-IjdmO_r6.js → media-BepyEUNm.js} +85 -1
  35. package/dist/{message-DKTdTYm-.js → message-C5VuRcP9.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +2 -2
  38. package/dist/{oauth-callback-server-CpbepSbp.js → oauth-callback-server-KRrYUZ35.js} +2 -2
  39. package/dist/{projection-BViECfYu.js → projection-BFJG58TG.js} +153 -119
  40. package/dist/{prompt-KT6MaDHN.js → prompt-D15oftoL.js} +183 -3
  41. package/dist/{registry-D-Acyjhh.js → registry-C_JrgqUz.js} +1 -1
  42. package/dist/{resolve-gkT2R66z.js → resolve-Cn_7JfP-.js} +3 -3
  43. package/dist/{result-DHmCFEt8.js → result-CIbQFLp6.js} +16 -10
  44. package/dist/{runner-DBKjGjH-.js → runner-BwmaMJVO.js} +8 -8
  45. package/dist/{sandbox-egress-signals-9n8hqx29.js → sandbox-egress-signals-BOQ8gn7i.js} +1 -1
  46. package/dist/{schema-DxicIQbc.js → schema-Bptz19Ja.js} +14 -9
  47. package/dist/{schema-B_6aOcx5.d.ts → schema-DQaFSkZZ.d.ts} +13 -5
  48. package/dist/{service-account-CDlC9ssy.js → service-account-AGw_pANb.js} +3 -3
  49. package/dist/{service-account-Bi0HsY6w.js → service-account-CLZfF8O1.js} +3 -3
  50. package/dist/{session-stop-BWOsuo8p.js → session-stop-CbzKf7UI.js} +41 -30
  51. package/dist/{skills-DO5K68Rq.js → skills-CcAJBquq.js} +2 -2
  52. package/dist/{spawn-BBqZDcPa.js → spawn-BvAk2vTI.js} +5 -5
  53. package/dist/{stop-WC97cmHz.js → stop-BQU4u7la.js} +123 -213
  54. package/dist/{store-ByR1Lr7e.js → store-DE7NJOvQ.js} +3 -3
  55. package/dist/{task-runner-B-Ewf8TX.js → task-runner-Q_7duP_T.js} +13 -17
  56. package/dist/{turn-failure-response-CpdPoZSl.js → turn-failure-response-aWZLfUM8.js} +8 -8
  57. package/dist/{validation-B4sbIoES.js → validation-BOoPeIJR.js} +1 -1
  58. package/dist/{version-D6lpuAgL.js → version-Db0MFy61.js} +1 -1
  59. package/dist/version.js +1 -1
  60. package/dist/{viewer-CeP27tC3.js → viewer-FFEFu9In.js} +4 -4
  61. package/dist/{warmup-P_GJCL1c.js → warmup-DDzrA9Gv.js} +260 -60
  62. package/dist/{work-DI7x1Slm.js → work-BBJK458E.js} +14 -14
  63. package/dist/{worker-CYPTOT4j.js → worker-2iU5RFyq.js} +6 -30
  64. package/migrations/0091_conversation_participant_unsubscribed_index.sql +20 -0
  65. package/migrations/0092_turn_metric_actor.sql +12 -0
  66. package/migrations/0093_participant_root_actor_backfill.sql +18 -0
  67. package/migrations/0094_conversation_delivery_paused_at.sql +1 -0
  68. package/migrations/meta/0091_snapshot.json +4410 -0
  69. package/migrations/meta/0092_snapshot.json +4446 -0
  70. package/migrations/meta/0093_snapshot.json +4446 -0
  71. package/migrations/meta/0094_snapshot.json +4452 -0
  72. package/migrations/meta/_journal.json +28 -0
  73. package/package.json +5 -5
  74. package/dist/assistant-reply-mj47jMRV.js +0 -65
  75. package/dist/core-model-BTt5E5b0.js +0 -182
  76. package/dist/media-BAHvgkok.js +0 -85
@@ -1,20 +1,19 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { $r as getDashboardConversationLink, Ba as sandboxSkillFile, Bn as getPlugins, Cn as renderTag$1, Fa as SANDBOX_DATA_ROOT, Fi as normalizeSlackReplyMarkdown, Fr as cancelSubscriptions, Gi as postSlackMessage, In as getPluginSlackConversationLink, Ln as getPluginSystemPromptContributions, N as normalizeConversationText, Ni as escapeSlackMrkdwnText, Pi as formatSlackLink, Qr as JUNIOR_THREAD_STATE_TTL_MS, Ra as SANDBOX_WORKSPACE_ROOT, Sn as renderChildTag, Tn as tagJson, Va as sandboxSkillPathResolution, Zr as verifyTimerWatchCredentialSubject, _n as SESSION_CONTEXT_SECTION_TAG, bn as escapeTagText, ct as listTurnSummaries, dn as isToolResultMessage, do as buildSentryConversationUrl, ei as getDashboardObjectIconLink, fn as normalizeToolNameFromResult, gn as REQUEST_CONTEXT_SECTION_TAG, in as hasRuntimeTurnContext, mn as stripRuntimeTurnContext, oi as ToolInputError, or as getReviewItem, pi as listWorkspaces, pn as retainRuntimeTurnContext, sn as isAssistantMessage, st as getTurnRecord, un as isToolResultError, vn as TURN_CONTEXT_TAG, wn as renderUntrustedTag, x as toStoredConversationMessage, yn as escapeClosingTags, za as sandboxSkillDir, zn as getPluginUserPromptContributions } from "./projection-BViECfYu.js";
3
- import { I as renderCurrentInstruction, R as escapeXml, n as botConfig, z as escapeXmlText } from "./config-CLJcyYEF.js";
4
- import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-DbD-dErY.js";
2
+ import { Cn as renderUntrustedTag, Fn as getPluginSlackConversationLink, Ha as sandboxSkillDir, Ii as escapeSlackMrkdwnText, In as getPluginSystemPromptContributions, Ji as postSlackMessage, Li as formatSlackLink, M as normalizeConversationText, Ra as SANDBOX_DATA_ROOT, Ri as normalizeSlackReplyMarkdown, Rn as getPluginUserPromptContributions, Rr as cancelSubscriptions, Sn as renderTag$1, Ua as sandboxSkillFile, Va as SANDBOX_WORKSPACE_ROOT, Wa as sandboxSkillPathResolution, _n as TURN_CONTEXT_TAG, dn as normalizeToolNameFromResult, ei as verifyTimerWatchCredentialSubject, fn as retainRuntimeTurnContext, gi as listWorkspaces, gn as SESSION_CONTEXT_SECTION_TAG, hn as REQUEST_CONTEXT_SECTION_TAG, li as ToolInputError, ln as isToolResultError, mo as buildSentryConversationUrl, ni as getDashboardConversationLink, on as isAssistantMessage, or as getReviewItem, ot as getTurnRecord, pn as stripRuntimeTurnContext, ri as getDashboardObjectIconLink, rn as hasRuntimeTurnContext, st as listTurnSummaries, ti as JUNIOR_THREAD_STATE_TTL_MS, un as isToolResultMessage, vn as escapeClosingTags, wn as tagJson, x as toStoredConversationMessage, xn as renderChildTag, yn as escapeTagText, zn as getPlugins } from "./projection-BFJG58TG.js";
3
+ import { F as renderCurrentInstruction, L as escapeXml, R as escapeXmlText, n as botConfig } from "./config-DHAy7XlP.js";
4
+ import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-CtCJmt9p.js";
5
5
  import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
6
- import { T as SYSTEM_IDENTITY_ID, V as nextDetailVersion, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-Co7DTYYh.js";
7
- import { A as juniorConversations, M as juniorUsers } from "./executor-m0kIN71Q.js";
6
+ import { J as nextDetailVersion, T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-BS2Kql3j.js";
7
+ import { A as juniorConversations, M as juniorUsers } from "./executor-cc4nH86C.js";
8
+ import { i as isVisionImageMediaType } from "./media-BepyEUNm.js";
8
9
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
9
- import { h as credentialSubjectSchema } from "./registry-D-Acyjhh.js";
10
- import { c as conversationNoteEvent, i as JUNIOR_NATIVE_EVENT_NAMESPACE } from "./core-model-BTt5E5b0.js";
11
- import { r as getStateAdapter } from "./adapter-Cikcqdty.js";
12
- import { i as isVisionImageMediaType } from "./media-BAHvgkok.js";
13
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-KT6MaDHN.js";
14
- import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-mj47jMRV.js";
10
+ import { h as credentialSubjectSchema } from "./registry-C_JrgqUz.js";
11
+ import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-D15oftoL.js";
12
+ import { r as getStateAdapter } from "./adapter-tE1wnl0T.js";
13
+ import { i as NO_REPLY_TOOL_NAME, r as sanitizeAssistantText } from "./assistant-reply-1N9oxyyb.js";
15
14
  import { D as userCustomizationTextSchema, v as formatUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
16
- import { r as appendAndEnqueueInboundMessage } from "./store-ByR1Lr7e.js";
17
- import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-B-Ewf8TX.js";
15
+ import { r as appendAndEnqueueInboundMessage } from "./store-DE7NJOvQ.js";
16
+ import { Ct as eventGuidance, St as eventCatalogEntry, yt as CORE_EVENT_NAMESPACE } from "./task-runner-Q_7duP_T.js";
18
17
  import path from "node:path";
19
18
  import { isDeepStrictEqual } from "node:util";
20
19
  import * as z from "zod";
@@ -26,7 +25,7 @@ import fs from "node:fs";
26
25
  * Automation run result.
27
26
  *
28
27
  * A Scheduled automation or Event automation run ends with one declared
29
- * result. The run does not deliver its final assistant text. The work owner
28
+ * result. The run does not deliver its final response. The work owner
30
29
  * reads the declared result and applies the stored outcomes.
31
30
  */
32
31
  /** Model-facing tool that ends an Automation run. */
@@ -47,7 +46,7 @@ const automationResultSchema = z.discriminatedUnion("result", [
47
46
  })
48
47
  ]);
49
48
  /**
50
- * Return whether the runtime delivers the final assistant text of a run. It
49
+ * Return whether the runtime delivers the final response of a run. It
51
50
  * does not for a dispatch with no outcomes. It does not for an Automation
52
51
  * run, which posts only its declared message, after the run.
53
52
  */
@@ -57,7 +56,7 @@ function deliversFinalText(dispatch) {
57
56
  /**
58
57
  * Return whether the runtime may post a failure reply or a status notice,
59
58
  * such as an auth prompt, for a run outside `finishedRunReply`. The rule is
60
- * the same as for final text. A chat Turn may post, also in a thread that an
59
+ * the same as for a final response. A chat Turn may post, also in a thread that an
61
60
  * Automation Conversation owns. A dispatch with no outcomes posts nothing. An
62
61
  * Automation run posts only a declared message; its failed execution shows on
63
62
  * the Automation.
@@ -284,13 +283,13 @@ const CONVERSATION_RULES = ["- In thread follow-ups, answer from prior thread co
284
283
  const SLACK_ACTION_RULES = [
285
284
  "- Assistant text, Slack posts, reactions, new canvases, new lists, and file sends go only to the current conversation or thread. Your reply is not a channel post, and you cannot create a new top-level channel post. When asked to post to a channel or anywhere else right now, explain that limitation; do not call a Slack send tool, and do not reply with only the requested text or present it as delivered. Scheduled automations can still post to the active channel later. Slack read tools can target other public channels with `channel_id`.",
286
285
  "- Ambient reaction requests target the current inbound message; do not ask for a message reference.",
287
- `- When no visible thread reply is requested or useful, keep tool-calling messages text-free and make the final message exactly ${NO_REPLY_MARKER}.`
286
+ `- When no visible thread reply is requested or useful, keep tool-calling messages text-free and end the Turn with \`${NO_REPLY_TOOL_NAME}\`.`
288
287
  ];
289
288
  /**
290
289
  * Block 6, `<failure-reporting>`: how to report a failure to a person. How to
291
290
  * find the cause goes in `<evidence>`.
292
291
  */
293
- const FAILURE_REPORTING_RULES = ["- Keep raw tool payloads and internal routing metadata out of the final answer."];
292
+ const FAILURE_REPORTING_RULES = ["- Keep raw tool payloads and internal routing metadata out of the final response."];
294
293
  /**
295
294
  * Block 6, `<failure-reporting>` for automation runs. No person reads the run,
296
295
  * so a failure that stops the job goes in the declared reason, never in the
@@ -651,7 +650,7 @@ function buildDispatchSection(params) {
651
650
  const metadataLines = Object.entries(params.metadata ?? {}).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => `- dispatch.metadata.${escapeXml(key)}: ${escapeXml(value)}`);
652
651
  return renderTag("dispatch", [
653
652
  "- dispatch.execution: execute the dispatched input now",
654
- ...params.declaresResult ? [] : ["- dispatch.delivery: the runtime delivers the final answer to the destination", "- dispatch.delivery_rule: do not request or require a separate posting tool just to deliver the final answer"],
653
+ ...params.declaresResult ? [] : ["- dispatch.delivery: the runtime delivers the final response to the destination", "- dispatch.delivery_rule: do not request or require a separate posting tool just to deliver the final response"],
655
654
  ...params.actor ? [`- dispatch.actor.platform: ${escapeXml(params.actor.platform)}`, `- dispatch.actor.name: ${escapeXml(params.actor.name)}`] : [],
656
655
  ...params.plugin ? [`- dispatch.plugin: ${escapeXml(params.plugin)}`] : [],
657
656
  ...formatSourceLines(params.source),
@@ -1933,7 +1932,7 @@ function replyContractLines(outcomes) {
1933
1932
  if (!outcomes) return [
1934
1933
  "When an Event asks you a question, answer it where it was asked, with that provider's tool. Then reply with the answer and a link to it.",
1935
1934
  "When you reply, follow any reply format in the instructions.",
1936
- `When the outcome needs nobody's attention, such as a routine fix that worked or feedback that you handled, end the reply with exactly ${QUIET_MARKER}. The reply stays in the Conversation but notifies nobody. Do not use it when the instructions say to notify, mention, or report to a person, when the reply asks a question, when a person must decide or act, or when something failed.`
1935
+ `When the outcome needs nobody's attention, such as a routine fix that worked or feedback that you handled, end the Turn with \`${NO_REPLY_TOOL_NAME}\` and put the outcome in its \`note\`. The note stays in the Conversation but notifies nobody. Do not use it when the instructions say to notify, mention, or report to a person, when the reply asks a question, when a person must decide or act, or when something failed.`
1937
1936
  ];
1938
1937
  return [`End with \`${FINISH_AUTOMATION_RUN_TOOL_NAME}\`.`];
1939
1938
  }
@@ -2165,6 +2164,8 @@ const SLACK_CURRENT_CHANNEL_IDENTIFIER = "current_channel";
2165
2164
  const CHANNEL_RESOURCE_TYPE = "channel";
2166
2165
  const MESSAGE_POSTED_EVENT = "message.posted";
2167
2166
  const CHANNEL_ID_PATTERN = /^[CG][A-Z0-9]{2,}$/;
2167
+ const CHANNEL_LOCATION = "channel";
2168
+ const THREAD_LOCATION = "thread";
2168
2169
  const CHANNEL_MESSAGE_MATCH_FIELDS = eventMatchFieldsSchema.parse({
2169
2170
  channelId: {
2170
2171
  kind: "string",
@@ -2174,11 +2175,16 @@ const CHANNEL_MESSAGE_MATCH_FIELDS = eventMatchFieldsSchema.parse({
2174
2175
  userId: {
2175
2176
  kind: "string",
2176
2177
  description: "Slack user ID of the message author. Required to run on bot posts, such as alert bots."
2178
+ },
2179
+ location: {
2180
+ kind: "string",
2181
+ enum: [CHANNEL_LOCATION, THREAD_LOCATION],
2182
+ description: "channel for a top-level message, thread for a thread reply. Leave out for top-level only; thread replies run only when this names thread."
2177
2183
  }
2178
2184
  });
2179
2185
  /**
2180
- * Event registration for new top-level Slack channel messages. Only event
2181
- * automations can use it, so watchEvents rejects it.
2186
+ * Event registration for new Slack channel messages and thread replies. Only
2187
+ * event automations can use it, so watchEvents rejects it.
2182
2188
  */
2183
2189
  function slackChannelMessageEvents() {
2184
2190
  return {
@@ -2194,7 +2200,7 @@ function slackChannelMessageEvents() {
2194
2200
  }],
2195
2201
  events: { [MESSAGE_POSTED_EVENT]: {
2196
2202
  reach: { anyOf: ["channelId"] },
2197
- guidance: "A person or bot posted a new top-level message in this channel. A bot post runs the automation only when match names the bot in user_id. A reply goes in that message's thread. If the instructions do not apply to this message, end with no action."
2203
+ guidance: "A person or bot posted a new message in this channel. A bot post runs the automation only when match names the bot in user_id. A thread reply runs it only when match.location names thread. A reply goes in the message's Slack thread. If the instructions do not apply to this message, end with no action."
2198
2204
  } },
2199
2205
  limits: { [CHANNEL_RESOURCE_TYPE]: {
2200
2206
  watch: false,
@@ -2243,25 +2249,28 @@ function requireSlackChannelMessageScope(automation) {
2243
2249
  };
2244
2250
  }
2245
2251
  /**
2246
- * Build the Event for one new top-level channel message, or nothing.
2252
+ * Build the Event for one new channel message or thread reply, or nothing.
2247
2253
  *
2248
- * Thread replies and Slackbot posts do not count. Other bot posts are marked
2249
- * with `postedByBot`, so only automations that name the bot can run on them.
2254
+ * Slackbot posts do not count. Bot posts are marked with `postedByBot`, so
2255
+ * only automations that name the bot can run on them. Thread replies carry
2256
+ * the `thread` location, so only automations that name it can run on them.
2250
2257
  */
2251
2258
  function slackChannelMessageEvent(input) {
2252
2259
  if (input.userId === "USLACKBOT") return void 0;
2253
- if (input.threadTs && input.threadTs !== input.ts) return void 0;
2254
2260
  if (!CHANNEL_ID_PATTERN.test(input.channelId)) return void 0;
2255
2261
  const postedByBot = Boolean(input.botId || input.subtype === "bot_message");
2262
+ const threadTs = input.threadTs && input.threadTs !== input.ts ? input.threadTs : void 0;
2256
2263
  return {
2257
2264
  eventKey: `${input.channelId}:${input.ts}`,
2258
2265
  eventType: MESSAGE_POSTED_EVENT,
2259
2266
  identifier: input.channelId,
2260
2267
  occurredAtMs: Math.floor(Number(input.ts) * 1e3),
2261
- trustedSummary: `${postedByBot ? "The bot " : ""}<@${input.userId}> posted a new message in <#${input.channelId}>.`,
2268
+ trustedSummary: `${postedByBot ? "The bot " : ""}<@${input.userId}> posted a new ${threadTs ? `thread reply under message ${threadTs}` : "message"} in <#${input.channelId}>.`,
2262
2269
  data: {
2263
2270
  channelId: input.channelId,
2271
+ location: threadTs ? THREAD_LOCATION : CHANNEL_LOCATION,
2264
2272
  messageTs: input.ts,
2273
+ ...threadTs ? { threadTs } : void 0,
2265
2274
  userId: input.userId,
2266
2275
  ...postedByBot ? { postedByBot: true } : void 0
2267
2276
  },
@@ -2276,18 +2285,20 @@ function slackChannelMessageEvent(input) {
2276
2285
  * channel, and this check keeps the rule when it does not.
2277
2286
  * A bot post runs only automations whose match names its author in `userId`.
2278
2287
  * Bots can post often and would use up the run limit of every other
2279
- * automation in the channel.
2288
+ * automation in the channel. A thread reply runs only automations whose
2289
+ * match names the `thread` location, so existing automations stay top-level.
2280
2290
  */
2281
2291
  function slackChannelMessageRunsAutomation(event, automation) {
2282
2292
  if (event.namespace !== "slack") return true;
2283
2293
  if (event.data?.channelId !== automation.destination.channelId) return false;
2294
+ if (event.data?.location === THREAD_LOCATION && ![automation.trigger.match?.location].flat().includes(THREAD_LOCATION)) return false;
2284
2295
  if (event.data?.postedByBot !== true) return true;
2285
2296
  return automation.trigger.match?.userId !== void 0;
2286
2297
  }
2287
2298
  /** Return the source message thread for a channel-message run. */
2288
2299
  function slackChannelMessageReplyThreadTs(event) {
2289
2300
  if (event.namespace !== "slack") return void 0;
2290
- const messageTs = event.data?.messageTs;
2301
+ const messageTs = event.data?.threadTs ?? event.data?.messageTs;
2291
2302
  return typeof messageTs === "string" ? messageTs : void 0;
2292
2303
  }
2293
2304
  // src/chat/events/runtime-catalog.ts
@@ -1,7 +1,7 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { h as logWarn } from "./logging-DbD-dErY.js";
2
+ import { h as logWarn } from "./logging-CtCJmt9p.js";
3
3
  import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-B3gfH58M.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BNK4uJVZ.js";
5
5
  import path from "node:path";
6
6
  import * as z from "zod";
7
7
  import fs from "node:fs/promises";
@@ -1,9 +1,9 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { n as botConfig } from "./config-CLJcyYEF.js";
3
- import { o as getDb, x as conversationKindFromRow } from "./db-Co7DTYYh.js";
4
- import { A as juniorConversations } from "./executor-m0kIN71Q.js";
5
- import { $t as actorFromRun, Ht as AgentDepthLimitError, en as toolInvocationDestination } from "./agent-runner-9MXyWUL8.js";
6
- import { n as createAndEnqueueAgentInvocation } from "./work-DI7x1Slm.js";
2
+ import { n as botConfig } from "./config-DHAy7XlP.js";
3
+ import { o as getDb, x as conversationKindFromRow } from "./db-BS2Kql3j.js";
4
+ import { A as juniorConversations } from "./executor-cc4nH86C.js";
5
+ import { dn as actorFromRun, en as AgentDepthLimitError, fn as toolInvocationDestination } from "./agent-runner-bvl8U5uH.js";
6
+ import { n as createAndEnqueueAgentInvocation } from "./work-BBJK458E.js";
7
7
  import { desc, eq, sql } from "drizzle-orm";
8
8
  // src/chat/conversations/lineage.ts
9
9
  /**