@sentry/junior 0.85.0 → 0.87.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 (49) hide show
  1. package/dist/{agent-hooks-AV7CHLUO.js → agent-hooks-NWOUB3UR.js} +7 -7
  2. package/dist/app.js +779 -356
  3. package/dist/chat/conversation-privacy.d.ts +12 -2
  4. package/dist/chat/conversations/sql/migrations.d.ts +1 -1
  5. package/dist/chat/conversations/sql/store.d.ts +9 -1
  6. package/dist/chat/conversations/store.d.ts +13 -0
  7. package/dist/chat/ingress/message-changed.d.ts +2 -0
  8. package/dist/chat/no-reply.d.ts +7 -0
  9. package/dist/chat/respond.d.ts +7 -1
  10. package/dist/chat/runtime/reply-executor.d.ts +2 -10
  11. package/dist/chat/runtime/slack-runtime.d.ts +5 -4
  12. package/dist/chat/runtime/turn.d.ts +7 -0
  13. package/dist/chat/services/persist-retry.d.ts +2 -0
  14. package/dist/chat/services/reply-delivery-plan.d.ts +0 -4
  15. package/dist/chat/services/turn-session-record.d.ts +31 -2
  16. package/dist/chat/slack/client.d.ts +33 -2
  17. package/dist/chat/slack/conversation-context.d.ts +15 -0
  18. package/dist/chat/state/turn-session.d.ts +9 -0
  19. package/dist/chat/task-execution/queue.d.ts +1 -1
  20. package/dist/chat/task-execution/slack-work.d.ts +10 -2
  21. package/dist/chat/task-execution/state.d.ts +44 -4
  22. package/dist/chat/task-execution/store.d.ts +21 -4
  23. package/dist/chat/task-execution/worker.d.ts +11 -4
  24. package/dist/chat/tools/slack/channel-access.d.ts +29 -0
  25. package/dist/chat/tools/slack/thread-read.d.ts +4 -1
  26. package/dist/{chunk-UVNV67EC.js → chunk-2NFV5FMB.js} +4 -4
  27. package/dist/{chunk-QTTTRBNB.js → chunk-6I6HBOQM.js} +80 -15
  28. package/dist/{chunk-ENEWQMRJ.js → chunk-6O5UI3RG.js} +1 -1
  29. package/dist/{chunk-GY7L6VCT.js → chunk-ACJJJEGG.js} +35 -17
  30. package/dist/{chunk-MHEV3T2Y.js → chunk-B6FQPS7A.js} +953 -795
  31. package/dist/{chunk-MTE5NRPJ.js → chunk-BRSQQRG6.js} +1 -1
  32. package/dist/{chunk-EENOFKDN.js → chunk-ENPSU7L7.js} +165 -27
  33. package/dist/{chunk-RUB77TGS.js → chunk-GB5DFM4D.js} +1 -1
  34. package/dist/{chunk-C2PSUWK3.js → chunk-GGD6WK6V.js} +124 -25
  35. package/dist/{chunk-SSUEWAVS.js → chunk-JRXCSSSU.js} +19 -4
  36. package/dist/{chunk-DR75T7J3.js → chunk-L7OHKDOX.js} +9 -5
  37. package/dist/{chunk-FYPO4K7C.js → chunk-RIB3M6YA.js} +2 -2
  38. package/dist/{chunk-BU2AWPEN.js → chunk-ZU2ALUVQ.js} +3 -2
  39. package/dist/cli/chat.js +4 -4
  40. package/dist/cli/plugins.js +7 -7
  41. package/dist/cli/snapshot-warmup.js +4 -4
  42. package/dist/cli/upgrade.js +10 -7
  43. package/dist/{db-S3HYBLUS.js → db-SZVUU7RB.js} +4 -4
  44. package/dist/instrumentation.js +1 -1
  45. package/dist/nitro.js +4 -4
  46. package/dist/reporting/conversations.d.ts +2 -1
  47. package/dist/reporting.js +95 -30
  48. package/dist/{runner-IMQH6V2B.js → runner-DMP3IQNM.js} +27 -13
  49. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getSlackBotToken
3
- } from "./chunk-BU2AWPEN.js";
3
+ } from "./chunk-ZU2ALUVQ.js";
4
4
  import {
5
5
  isSlackConversationId,
6
6
  isSlackTeamId,
@@ -11,7 +11,21 @@ import {
11
11
  } from "./chunk-KF7522P3.js";
12
12
 
13
13
  // src/chat/slack/client.ts
14
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
14
15
  import { WebClient } from "@slack/web-api";
16
+
17
+ // src/chat/slack/workspace-context.ts
18
+ import { AsyncLocalStorage } from "async_hooks";
19
+ var workspaceTeamIdStorage = new AsyncLocalStorage();
20
+ function runWithWorkspaceTeamId(teamId, fn) {
21
+ if (!teamId) return fn();
22
+ return workspaceTeamIdStorage.run(teamId, fn);
23
+ }
24
+ function getWorkspaceTeamId() {
25
+ return workspaceTeamIdStorage.getStore();
26
+ }
27
+
28
+ // src/chat/slack/client.ts
15
29
  var SlackActionError = class extends Error {
16
30
  code;
17
31
  apiError;
@@ -98,7 +112,39 @@ function parseSlackCanvasDetail(detail) {
98
112
  }
99
113
  return parsed;
100
114
  }
101
- var client = null;
115
+ var installationTokenStorage = new AsyncLocalStorage2();
116
+ var clientsByToken = /* @__PURE__ */ new Map();
117
+ function runWithSlackInstallationToken(token, fn) {
118
+ const trimmed = token.trim();
119
+ if (!trimmed) {
120
+ throw new SlackActionError(
121
+ "Slack installation token binding requires a non-empty token",
122
+ "missing_token"
123
+ );
124
+ }
125
+ return installationTokenStorage.run({ token: trimmed }, fn);
126
+ }
127
+ function resolveSlackToken() {
128
+ const ambientToken = installationTokenStorage.getStore()?.token;
129
+ if (ambientToken) {
130
+ return ambientToken;
131
+ }
132
+ const envToken = getSlackBotToken();
133
+ if (envToken) {
134
+ return envToken;
135
+ }
136
+ const teamId = getWorkspaceTeamId();
137
+ if (teamId) {
138
+ throw new SlackActionError(
139
+ `Slack call is scoped to workspace ${teamId} but no installation token is bound and no default bot token is configured`,
140
+ "missing_token"
141
+ );
142
+ }
143
+ throw new SlackActionError(
144
+ "SLACK_BOT_TOKEN (or SLACK_BOT_USER_TOKEN) is required for Slack Web API actions in this service",
145
+ "missing_token"
146
+ );
147
+ }
102
148
  function normalizeSlackConversationId(channelId) {
103
149
  if (!channelId) return void 0;
104
150
  const trimmed = channelId.trim();
@@ -110,16 +156,16 @@ function normalizeSlackConversationId(channelId) {
110
156
  return parts[1]?.trim() || void 0;
111
157
  }
112
158
  function getClient() {
113
- if (client) return client;
114
- const token = getSlackBotToken();
115
- if (!token) {
116
- throw new SlackActionError(
117
- "SLACK_BOT_TOKEN (or SLACK_BOT_USER_TOKEN) is required for Slack canvas/list actions in this service",
118
- "missing_token"
119
- );
159
+ const token = resolveSlackToken();
160
+ let cached = clientsByToken.get(token);
161
+ if (!cached) {
162
+ cached = new WebClient(token, {
163
+ retryConfig: { retries: 0 },
164
+ rejectRateLimitedCalls: true
165
+ });
166
+ clientsByToken.set(token, cached);
120
167
  }
121
- client = new WebClient(token);
122
- return client;
168
+ return cached;
123
169
  }
124
170
  function mapSlackError(error) {
125
171
  if (error instanceof SlackActionError) {
@@ -186,8 +232,54 @@ function mapSlackError(error) {
186
232
  function sleep(ms) {
187
233
  return new Promise((resolve) => setTimeout(resolve, ms));
188
234
  }
235
+ var MAX_RETRY_DELAY_MS = 1e4;
236
+ var MAX_TOTAL_RETRY_DELAY_MS = 2e4;
237
+ var CONNECTION_ERROR_CODES = /* @__PURE__ */ new Set([
238
+ "ECONNREFUSED",
239
+ "ECONNRESET",
240
+ "ENOTFOUND",
241
+ "EAI_AGAIN"
242
+ ]);
243
+ var TIMEOUT_ERROR_CODES = /* @__PURE__ */ new Set([
244
+ "ETIMEDOUT",
245
+ "ECONNABORTED",
246
+ "ESOCKETTIMEDOUT"
247
+ ]);
248
+ function findNetworkErrorCode(error, depth = 0) {
249
+ if (!error || typeof error !== "object" || depth > 4) {
250
+ return void 0;
251
+ }
252
+ const candidate = error;
253
+ if (typeof candidate.code === "string" && (CONNECTION_ERROR_CODES.has(candidate.code) || TIMEOUT_ERROR_CODES.has(candidate.code))) {
254
+ return candidate.code;
255
+ }
256
+ return findNetworkErrorCode(candidate.original, depth + 1) ?? findNetworkErrorCode(candidate.cause, depth + 1);
257
+ }
258
+ function hasSocketHangUpMessage(error) {
259
+ return error instanceof Error && error.message.toLowerCase().includes("socket hang up");
260
+ }
261
+ function classifySlackRetry(raw, mapped) {
262
+ if (mapped.code === "rate_limited") {
263
+ return "rate_limited";
264
+ }
265
+ if (mapped.statusCode !== void 0 && mapped.statusCode >= 500) {
266
+ return "server_error";
267
+ }
268
+ const networkCode = findNetworkErrorCode(raw);
269
+ if (networkCode && CONNECTION_ERROR_CODES.has(networkCode)) {
270
+ return "connection";
271
+ }
272
+ if (networkCode && TIMEOUT_ERROR_CODES.has(networkCode)) {
273
+ return "timeout";
274
+ }
275
+ if (hasSocketHangUpMessage(raw)) {
276
+ return "connection";
277
+ }
278
+ return "none";
279
+ }
189
280
  async function withSlackRetries(task, maxAttempts = 3, context = {}) {
190
281
  let attempt = 0;
282
+ let totalDelayMs = 0;
191
283
  const action = context.action ?? "unknown";
192
284
  while (attempt < maxAttempts) {
193
285
  attempt += 1;
@@ -235,7 +327,9 @@ async function withSlackRetries(task, maxAttempts = 3, context = {}) {
235
327
  );
236
328
  } catch (error) {
237
329
  const mapped = mapSlackError(error);
238
- const isRetryable = mapped.code === "rate_limited";
330
+ const retryClass = classifySlackRetry(error, mapped);
331
+ const isRetryable = retryClass === "rate_limited" || retryClass === "connection" || retryClass === "server_error" || retryClass === "timeout" && context.idempotent === true;
332
+ const remainingDelayBudgetMs = MAX_TOTAL_RETRY_DELAY_MS - totalDelayMs;
239
333
  const baseLogAttributes = {
240
334
  "app.slack.action": action,
241
335
  "app.slack.error_code": mapped.code,
@@ -247,7 +341,7 @@ async function withSlackRetries(task, maxAttempts = 3, context = {}) {
247
341
  ...mapped.statusCode !== void 0 ? { "http.response.status_code": mapped.statusCode } : {},
248
342
  ...context.attributes ?? {}
249
343
  };
250
- if (!isRetryable || attempt >= maxAttempts) {
344
+ if (!isRetryable || attempt >= maxAttempts || remainingDelayBudgetMs <= 0) {
251
345
  logWarn(
252
346
  "slack_action_failed",
253
347
  {},
@@ -264,13 +358,20 @@ async function withSlackRetries(task, maxAttempts = 3, context = {}) {
264
358
  {},
265
359
  {
266
360
  ...baseLogAttributes,
267
- "app.slack.retry_attempt": attempt
361
+ "app.slack.retry_attempt": attempt,
362
+ "app.slack.retry_class": retryClass
268
363
  },
269
364
  "Retrying Slack action after transient failure"
270
365
  );
271
- const retryAfterMs = mapped.code === "rate_limited" && mapped.retryAfterSeconds && mapped.retryAfterSeconds > 0 ? mapped.retryAfterSeconds * 1e3 : void 0;
366
+ const retryAfterMs = retryClass === "rate_limited" && mapped.retryAfterSeconds && mapped.retryAfterSeconds > 0 ? mapped.retryAfterSeconds * 1e3 : void 0;
272
367
  const backoffMs = Math.min(2e3, 250 * 2 ** (attempt - 1));
273
- await sleep(retryAfterMs ?? backoffMs);
368
+ const delayMs = Math.min(
369
+ retryAfterMs ?? backoffMs,
370
+ MAX_RETRY_DELAY_MS,
371
+ remainingDelayBudgetMs
372
+ );
373
+ totalDelayMs += delayMs;
374
+ await sleep(delayMs);
274
375
  }
275
376
  }
276
377
  throw new SlackActionError(
@@ -296,27 +397,22 @@ function isConversationChannel(channelId) {
296
397
  return normalized.startsWith("C") || normalized.startsWith("G");
297
398
  }
298
399
  async function getFilePermalink(fileId) {
299
- const client2 = getClient();
400
+ const client = getClient();
300
401
  const response = await withSlackRetries(
301
- () => client2.files.info({
402
+ () => client.files.info({
302
403
  file: fileId
303
404
  }),
304
405
  3,
305
406
  {
306
407
  action: "files.info",
408
+ idempotent: true,
307
409
  spanAttributes: { "app.slack.file_id": fileId }
308
410
  }
309
411
  );
310
412
  return response.file?.permalink;
311
413
  }
312
414
  async function downloadPrivateSlackFile(url) {
313
- const token = getSlackBotToken();
314
- if (!token) {
315
- throw new SlackActionError(
316
- "SLACK_BOT_TOKEN (or SLACK_BOT_USER_TOKEN) is required for Slack file downloads in this service",
317
- "missing_token"
318
- );
319
- }
415
+ const token = resolveSlackToken();
320
416
  return withSpan(
321
417
  "GET files.slack.com",
322
418
  "http.client",
@@ -389,8 +485,11 @@ function destinationKey(destination) {
389
485
  }
390
486
 
391
487
  export {
488
+ runWithWorkspaceTeamId,
489
+ getWorkspaceTeamId,
392
490
  SlackActionError,
393
491
  getHeaderString,
492
+ runWithSlackInstallationToken,
394
493
  normalizeSlackConversationId,
395
494
  withSlackRetries,
396
495
  getSlackClient,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-RUB77TGS.js";
3
+ } from "./chunk-GB5DFM4D.js";
4
4
  import {
5
5
  normalizeSlackConversationId
6
- } from "./chunk-C2PSUWK3.js";
6
+ } from "./chunk-GGD6WK6V.js";
7
7
  import {
8
8
  parseSlackThreadId
9
- } from "./chunk-DR75T7J3.js";
9
+ } from "./chunk-L7OHKDOX.js";
10
10
  import {
11
11
  parseStoredSlackRequester
12
12
  } from "./chunk-IXTBFABZ.js";
@@ -114,6 +114,18 @@ function toSlackEventChannelType(channelType) {
114
114
  }
115
115
  return void 0;
116
116
  }
117
+ function conversationVisibilityFromSlackChannelType(channelType) {
118
+ if (!channelType) return void 0;
119
+ return channelType === "channel" ? "public" : "private";
120
+ }
121
+ function visibilityFromChannelIdPrefix(channelId) {
122
+ const normalized = normalizeSlackConversationId(channelId);
123
+ if (!normalized) return void 0;
124
+ if (normalized.startsWith("D") || normalized.startsWith("G")) {
125
+ return "private";
126
+ }
127
+ return void 0;
128
+ }
117
129
  function resolveSlackChannelTypeFromMessage(message) {
118
130
  const raw = message.raw;
119
131
  if (!raw || typeof raw !== "object") {
@@ -126,9 +138,11 @@ function resolveSlackConversationContext(input) {
126
138
  const type = typeFromSlackChannelType(input.channelType) ?? typeFromChannelId(input.channelId, input.channelName);
127
139
  if (!type) return void 0;
128
140
  const name = normalizeConversationName(type, input.channelName);
141
+ const visibility = conversationVisibilityFromSlackChannelType(input.channelType) ?? visibilityFromChannelIdPrefix(input.channelId);
129
142
  return {
130
143
  type,
131
- ...name ? { name } : {}
144
+ ...name ? { name } : {},
145
+ ...visibility ? { visibility } : {}
132
146
  };
133
147
  }
134
148
  function resolveSlackConversationContextFromThreadId(input) {
@@ -264,6 +278,7 @@ export {
264
278
  GET,
265
279
  buildSentryConversationUrl,
266
280
  buildSentryTraceUrl,
281
+ conversationVisibilityFromSlackChannelType,
267
282
  resolveSlackChannelTypeFromMessage,
268
283
  resolveSlackConversationContext,
269
284
  resolveSlackConversationContextFromThreadId,
@@ -52,21 +52,25 @@ function resolveSlackChannelIdFromMessage(message) {
52
52
  import { AsyncLocalStorage } from "async_hooks";
53
53
  var SAFE_METADATA_KEY_LIMIT = 20;
54
54
  var conversationPrivacyStorage = new AsyncLocalStorage();
55
- function conversationPrivacyFromChannelId(channelId) {
55
+ function privateNarrowingFromChannelId(channelId) {
56
56
  const normalized = channelId?.trim();
57
57
  if (!normalized) return void 0;
58
- return normalized.startsWith("C") ? "public" : "private";
58
+ return normalized.startsWith("D") || normalized.startsWith("G") ? "private" : void 0;
59
59
  }
60
- function conversationPrivacyFromConversationId(conversationId) {
60
+ function privateNarrowingFromConversationId(conversationId) {
61
61
  if (!conversationId?.trim()) return void 0;
62
62
  const slackThread = parseSlackThreadId(conversationId);
63
63
  if (slackThread) {
64
- return conversationPrivacyFromChannelId(slackThread.channelId);
64
+ return privateNarrowingFromChannelId(slackThread.channelId);
65
65
  }
66
66
  return "private";
67
67
  }
68
68
  function resolveConversationPrivacy(input) {
69
- return conversationPrivacyFromChannelId(input.channelId) ?? conversationPrivacyFromConversationId(input.conversationId);
69
+ const narrowed = privateNarrowingFromChannelId(input.channelId) ?? privateNarrowingFromConversationId(input.conversationId);
70
+ if (narrowed === "private") {
71
+ return "private";
72
+ }
73
+ return input.visibility;
70
74
  }
71
75
  function canExposeConversationPayload(input) {
72
76
  return resolveConversationPrivacy(input) === "public";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-G3E7SCME.js";
4
4
  import {
5
5
  getStateAdapter
6
- } from "./chunk-RUB77TGS.js";
6
+ } from "./chunk-GB5DFM4D.js";
7
7
  import {
8
8
  toOptionalTrimmed
9
- } from "./chunk-BU2AWPEN.js";
9
+ } from "./chunk-ZU2ALUVQ.js";
10
10
  import {
11
11
  pluginCatalogRuntime
12
12
  } from "./chunk-BQ3ITJA6.js";
@@ -1,9 +1,10 @@
1
1
  import {
2
+ getCurrentConversationPrivacy,
2
3
  resolveConversationPrivacy,
3
4
  toGenAiMessageMetadata,
4
5
  toGenAiMessagesTraceAttributes,
5
6
  toGenAiTextMetadata
6
- } from "./chunk-DR75T7J3.js";
7
+ } from "./chunk-L7OHKDOX.js";
7
8
  import {
8
9
  extractGenAiUsageAttributes,
9
10
  logException,
@@ -378,7 +379,7 @@ async function completeText(params) {
378
379
  const privacy = resolveConversationPrivacy({
379
380
  channelId: typeof params.metadata?.channelId === "string" ? params.metadata.channelId : void 0,
380
381
  conversationId: typeof params.metadata?.conversationId === "string" ? params.metadata.conversationId : typeof params.metadata?.threadId === "string" ? params.metadata.threadId : void 0
381
- });
382
+ }) ?? getCurrentConversationPrivacy();
382
383
  const effectivePrivacy = privacy ?? "private";
383
384
  const messageAttributeMode = params.messageAttributeMode ?? (effectivePrivacy === "public" ? "content" : "metadata");
384
385
  const requestMessagesAttribute = serializeGenAiAttribute(
package/dist/cli/chat.js CHANGED
@@ -130,10 +130,10 @@ async function configureLocalChatPlugins(pluginSet) {
130
130
  databaseModule
131
131
  ] = await Promise.all([
132
132
  import("../plugins-PZMDS7AT.js"),
133
- import("../agent-hooks-AV7CHLUO.js"),
133
+ import("../agent-hooks-NWOUB3UR.js"),
134
134
  import("../catalog-runtime-XOD7YPRS.js"),
135
135
  import("../validation-MBNJKWPQ.js"),
136
- import("../db-S3HYBLUS.js")
136
+ import("../db-SZVUU7RB.js")
137
137
  ]);
138
138
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
139
139
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -195,7 +195,7 @@ async function runPrompt(options, io, pluginSet) {
195
195
  defaultStateAdapterForLocalChat();
196
196
  await configureLocalChatPlugins(pluginSet);
197
197
  const conversationId = newRunConversationId();
198
- const { runLocalAgentTurn } = await import("../runner-IMQH6V2B.js");
198
+ const { runLocalAgentTurn } = await import("../runner-DMP3IQNM.js");
199
199
  const result = await runLocalAgentTurn(
200
200
  {
201
201
  conversationId,
@@ -219,7 +219,7 @@ async function runInteractive(io, pluginSet) {
219
219
  defaultStateAdapterForLocalChat();
220
220
  await configureLocalChatPlugins(pluginSet);
221
221
  const conversationId = newRunConversationId();
222
- const { runLocalAgentTurn } = await import("../runner-IMQH6V2B.js");
222
+ const { runLocalAgentTurn } = await import("../runner-DMP3IQNM.js");
223
223
  const rl = readline.createInterface({
224
224
  input: io.input,
225
225
  output: io.output,
@@ -10,18 +10,18 @@ import {
10
10
  import {
11
11
  setPlugins,
12
12
  validatePlugins
13
- } from "../chunk-UVNV67EC.js";
13
+ } from "../chunk-2NFV5FMB.js";
14
14
  import {
15
15
  createPluginLogger
16
- } from "../chunk-MTE5NRPJ.js";
16
+ } from "../chunk-BRSQQRG6.js";
17
17
  import {
18
18
  getDb
19
- } from "../chunk-QTTTRBNB.js";
19
+ } from "../chunk-6I6HBOQM.js";
20
20
  import "../chunk-G3E7SCME.js";
21
- import "../chunk-RUB77TGS.js";
22
- import "../chunk-C2PSUWK3.js";
23
- import "../chunk-BU2AWPEN.js";
24
- import "../chunk-DR75T7J3.js";
21
+ import "../chunk-GB5DFM4D.js";
22
+ import "../chunk-GGD6WK6V.js";
23
+ import "../chunk-ZU2ALUVQ.js";
24
+ import "../chunk-L7OHKDOX.js";
25
25
  import {
26
26
  loadAppPluginSet
27
27
  } from "../chunk-Y2CM7HXH.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  resolveRuntimeDependencySnapshot
3
- } from "../chunk-FYPO4K7C.js";
3
+ } from "../chunk-RIB3M6YA.js";
4
4
  import "../chunk-G3E7SCME.js";
5
5
  import {
6
6
  disconnectStateAdapter
7
- } from "../chunk-RUB77TGS.js";
8
- import "../chunk-BU2AWPEN.js";
9
- import "../chunk-DR75T7J3.js";
7
+ } from "../chunk-GB5DFM4D.js";
8
+ import "../chunk-ZU2ALUVQ.js";
9
+ import "../chunk-L7OHKDOX.js";
10
10
  import {
11
11
  pluginCatalogRuntime
12
12
  } from "../chunk-BQ3ITJA6.js";
@@ -4,7 +4,7 @@ import {
4
4
  recordConversationActivity,
5
5
  recordConversationExecution,
6
6
  requestConversationWork
7
- } from "../chunk-EENOFKDN.js";
7
+ } from "../chunk-ENPSU7L7.js";
8
8
  import {
9
9
  JUNIOR_THREAD_STATE_TTL_MS,
10
10
  coerceThreadConversationState
@@ -18,24 +18,24 @@ import {
18
18
  import {
19
19
  createPluginLogger,
20
20
  createPluginState
21
- } from "../chunk-MTE5NRPJ.js";
21
+ } from "../chunk-BRSQQRG6.js";
22
22
  import {
23
23
  createJuniorSqlExecutor,
24
24
  createSqlStore,
25
25
  getDb
26
- } from "../chunk-QTTTRBNB.js";
26
+ } from "../chunk-6I6HBOQM.js";
27
27
  import {
28
28
  disconnectStateAdapter,
29
29
  getConnectedStateContext
30
- } from "../chunk-RUB77TGS.js";
30
+ } from "../chunk-GB5DFM4D.js";
31
31
  import {
32
32
  parseDestination,
33
33
  sameDestination
34
- } from "../chunk-C2PSUWK3.js";
34
+ } from "../chunk-GGD6WK6V.js";
35
35
  import {
36
36
  getChatConfig
37
- } from "../chunk-BU2AWPEN.js";
38
- import "../chunk-DR75T7J3.js";
37
+ } from "../chunk-ZU2ALUVQ.js";
38
+ import "../chunk-L7OHKDOX.js";
39
39
  import {
40
40
  loadAppPluginSet
41
41
  } from "../chunk-Y2CM7HXH.js";
@@ -75,6 +75,9 @@ async function backfillToSql(args) {
75
75
  function createStateConversationStore(state) {
76
76
  return {
77
77
  get: (args) => getConversation({ ...args, state }),
78
+ // Task-execution state has no destination records, so visibility is never
79
+ // source-confirmed here and cross-context reads fail closed to private.
80
+ getDestinationVisibility: async () => void 0,
78
81
  recordActivity: (args) => recordConversationActivity({ ...args, state }),
79
82
  recordExecution: (args) => recordConversationExecution({ ...args, state }),
80
83
  listByActivity: (args) => listConversationsByActivity({ ...args, state })
@@ -2,10 +2,10 @@ import {
2
2
  closeDb,
3
3
  getConversationStore,
4
4
  getDb
5
- } from "./chunk-QTTTRBNB.js";
6
- import "./chunk-C2PSUWK3.js";
7
- import "./chunk-BU2AWPEN.js";
8
- import "./chunk-DR75T7J3.js";
5
+ } from "./chunk-6I6HBOQM.js";
6
+ import "./chunk-GGD6WK6V.js";
7
+ import "./chunk-ZU2ALUVQ.js";
8
+ import "./chunk-L7OHKDOX.js";
9
9
  import "./chunk-IXTBFABZ.js";
10
10
  import "./chunk-KF7522P3.js";
11
11
  import "./chunk-FTMXFBDC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCurrentConversationPrivacy
3
- } from "./chunk-DR75T7J3.js";
3
+ } from "./chunk-L7OHKDOX.js";
4
4
  import {
5
5
  getDeploymentServiceVersion,
6
6
  getDeploymentTelemetryAttributes
package/dist/nitro.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveConversationWorkQueueTopic
3
- } from "./chunk-ENEWQMRJ.js";
3
+ } from "./chunk-6O5UI3RG.js";
4
4
  import {
5
5
  PLUGIN_TASK_QUEUE_TOPIC
6
6
  } from "./chunk-KNFROR7R.js";
@@ -8,9 +8,9 @@ import {
8
8
  pluginCatalogConfigFromPluginSet,
9
9
  pluginRuntimeRegistrationsFromPluginSet
10
10
  } from "./chunk-SG5WAA7H.js";
11
- import "./chunk-C2PSUWK3.js";
12
- import "./chunk-BU2AWPEN.js";
13
- import "./chunk-DR75T7J3.js";
11
+ import "./chunk-GGD6WK6V.js";
12
+ import "./chunk-ZU2ALUVQ.js";
13
+ import "./chunk-L7OHKDOX.js";
14
14
  import {
15
15
  loadPluginSetFromModule,
16
16
  resolvePluginModule
@@ -35,6 +35,7 @@ export interface ConversationSummaryReport {
35
35
  requesterIdentity?: RequesterIdentity;
36
36
  channel?: string;
37
37
  channelName?: string;
38
+ channelNameRedacted?: boolean;
38
39
  sentryTraceUrl?: string;
39
40
  traceId?: string;
40
41
  }
@@ -230,4 +231,4 @@ export declare function listRecentConversationSummaries(options?: {
230
231
  /** Read one conversation transcript for reporting consumers. */
231
232
  export declare function readConversationReport(conversationId: string, options?: ConversationReaderOptions): Promise<ConversationReport>;
232
233
  /** Read one child-agent transcript through its parent conversation run. */
233
- export declare function readConversationSubagentTranscriptReport(conversationId: string, runId: string, subagentId: string): Promise<ConversationSubagentTranscriptReport>;
234
+ export declare function readConversationSubagentTranscriptReport(conversationId: string, runId: string, subagentId: string, options?: ConversationReaderOptions): Promise<ConversationSubagentTranscriptReport>;