@sentry/junior 0.176.2 → 0.178.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 (92) hide show
  1. package/dist/{agent-hooks-LQZFBXBK.js → agent-hooks-PBT4NNBV.js} +12 -12
  2. package/dist/api/conversations/archive.d.ts +5 -2
  3. package/dist/api/conversations/list.d.ts +0 -1
  4. package/dist/api/conversations/membership.d.ts +14 -0
  5. package/dist/api/conversations/projection.d.ts +2 -1
  6. package/dist/api/locations/detail.d.ts +1 -1
  7. package/dist/api/people/shared.d.ts +2 -2
  8. package/dist/api/schema/conversation.d.ts +4 -4
  9. package/dist/api/schema/location.d.ts +1 -1
  10. package/dist/api/schema/person.d.ts +1 -1
  11. package/dist/api/schema.js +1 -1
  12. package/dist/api.js +245 -166
  13. package/dist/app.js +52 -57
  14. package/dist/{catalog-runtime-P3DBC3XM.js → catalog-runtime-M7QGKPFZ.js} +5 -5
  15. package/dist/chat/agent/sandbox.d.ts +2 -0
  16. package/dist/chat/conversations/sql/participants.d.ts +1 -0
  17. package/dist/chat/conversations/store.d.ts +0 -1
  18. package/dist/chat/resource-events/notification.d.ts +6 -1
  19. package/dist/chat/sandbox/errors.d.ts +4 -0
  20. package/dist/chat/sandbox/noninteractive-command.d.ts +1 -0
  21. package/dist/chat/sandbox/prepare-workspace.d.ts +27 -3
  22. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  23. package/dist/chat/sandbox/session.d.ts +2 -0
  24. package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +5 -0
  25. package/dist/chat/sandbox/snapshot/install.d.ts +2 -2
  26. package/dist/chat/sandbox/snapshot/span.d.ts +3 -0
  27. package/dist/chat/sandbox/snapshot/store.d.ts +20 -17
  28. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +15 -0
  29. package/dist/chat/sandbox/snapshot/workspace.d.ts +17 -0
  30. package/dist/chat/services/workspace-snapshot-wait.d.ts +27 -0
  31. package/dist/chat/workspaces/types.d.ts +1 -0
  32. package/dist/{chunk-2PWBS4JK.js → chunk-22T3HB44.js} +1 -1
  33. package/dist/{chunk-LNV3NNDO.js → chunk-3ZZEPLLB.js} +2 -2
  34. package/dist/{chunk-DBXTXY2Z.js → chunk-4K6VNP3S.js} +9 -9
  35. package/dist/{chunk-SZWILPFG.js → chunk-534BO42N.js} +45 -276
  36. package/dist/{chunk-QWPKRFG6.js → chunk-6OYVH66J.js} +1 -1
  37. package/dist/{chunk-ESIS6NVJ.js → chunk-ABLODWPO.js} +1 -1
  38. package/dist/{chunk-LY6QWCJI.js → chunk-AGJ4OQ2V.js} +1 -1
  39. package/dist/{chunk-KKY2R2QF.js → chunk-AQHSXA3J.js} +331 -2
  40. package/dist/{chunk-JRDM64UU.js → chunk-AVRWMQ4U.js} +1 -1
  41. package/dist/{chunk-B2RBW7CX.js → chunk-BFLMRTPD.js} +6 -6
  42. package/dist/{chunk-HXX3CSGJ.js → chunk-BHHWCNXI.js} +5 -5
  43. package/dist/{chunk-H5SVUUPE.js → chunk-BUGO42R6.js} +4 -4
  44. package/dist/{chunk-2XQ45FB2.js → chunk-D3UJTX4U.js} +1 -1
  45. package/dist/{chunk-V4SBMRZ3.js → chunk-FQ6BMP5P.js} +767 -81
  46. package/dist/{chunk-AJ6M3LLM.js → chunk-G3CQEUHI.js} +5 -5
  47. package/dist/{chunk-RHNT2FYF.js → chunk-H6ZXBFGX.js} +1 -1
  48. package/dist/{chunk-FLBOMXLS.js → chunk-IQRPDKPJ.js} +1 -1
  49. package/dist/{chunk-OOH45KJS.js → chunk-JVXZ3WDH.js} +6 -6
  50. package/dist/{chunk-HLEE6JNT.js → chunk-KEQAA42D.js} +1 -1
  51. package/dist/{chunk-E7MUDWFH.js → chunk-LAOP4EPL.js} +6 -6
  52. package/dist/{chunk-FIWDSKL2.js → chunk-OGRD5PFM.js} +1 -1
  53. package/dist/{chunk-MNKXBIIA.js → chunk-PRDKO3QB.js} +124 -13
  54. package/dist/{chunk-YAB6CALP.js → chunk-QCCLDJHB.js} +8 -8
  55. package/dist/{chunk-FDA3E627.js → chunk-RE4XWXBV.js} +6 -6
  56. package/dist/{chunk-WVDCJ26T.js → chunk-RGV6KHDM.js} +4 -4
  57. package/dist/{chunk-73FXUNOB.js → chunk-RGXOLPWO.js} +1 -1
  58. package/dist/{chunk-ELEAIRTG.js → chunk-TKB25A3L.js} +2 -2
  59. package/dist/{chunk-UZM72ORS.js → chunk-U3UDPGZG.js} +2 -2
  60. package/dist/{chunk-PLJ3UO67.js → chunk-UGWBJAGN.js} +1 -1
  61. package/dist/{chunk-OJQTYDDD.js → chunk-UMG7M32G.js} +19 -19
  62. package/dist/{chunk-MOVIDCPX.js → chunk-XCNS3CXE.js} +11 -17
  63. package/dist/{chunk-TRG4RCTT.js → chunk-XWUJWHFD.js} +204 -100
  64. package/dist/{chunk-2KSPJ6EE.js → chunk-ZCHHVTMF.js} +14 -5
  65. package/dist/cli/chat.js +31 -30
  66. package/dist/cli/check.js +6 -6
  67. package/dist/cli/plugins.js +13 -13
  68. package/dist/cli/snapshot-create.js +10 -10
  69. package/dist/cli/upgrade.js +7 -7
  70. package/dist/db/schema/conversation-participants.d.ts +17 -0
  71. package/dist/db/schema/conversations.d.ts +629 -1
  72. package/dist/db/schema/snapshots.d.ts +1 -1
  73. package/dist/db/schema.d.ts +18 -1
  74. package/dist/{db-ATGRVFSI.js → db-QVYOWATH.js} +7 -7
  75. package/dist/instrumentation.js +4 -4
  76. package/dist/nitro.js +2 -2
  77. package/dist/{oauth-callback-server-55TYSRIZ.js → oauth-callback-server-PLPAFXO6.js} +23 -23
  78. package/dist/{runner-FD4BRECW.js → runner-AGNEIOZS.js} +15 -15
  79. package/dist/{skills-5YY7QYV6.js → skills-U5KQ66EM.js} +6 -6
  80. package/dist/spawn-ZRYYZP2B.js +37 -0
  81. package/dist/{validation-KH5UQUV4.js → validation-QE4U45KS.js} +6 -6
  82. package/dist/version.js +1 -1
  83. package/dist/{work-5LWDUEO4.js → work-ATAXAHJJ.js} +18 -18
  84. package/dist/worker-LIL5AOER.js +24 -0
  85. package/migrations/0033_workspace_snapshot_active_build.sql +1 -0
  86. package/migrations/0034_strong_randall.sql +31 -0
  87. package/migrations/meta/0033_snapshot.json +2914 -0
  88. package/migrations/meta/0034_snapshot.json +3038 -0
  89. package/migrations/meta/_journal.json +15 -1
  90. package/package.json +5 -5
  91. package/dist/spawn-6IS46YNW.js +0 -37
  92. package/dist/worker-XKVLTAI2.js +0 -24
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-B2RBW7CX.js";
3
+ } from "./chunk-BFLMRTPD.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-MOVIDCPX.js";
9
+ } from "./chunk-XCNS3CXE.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-2KSPJ6EE.js";
12
+ } from "./chunk-ZCHHVTMF.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-RHNT2FYF.js";
15
+ } from "./chunk-H6ZXBFGX.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-PLJ3UO67.js";
23
+ } from "./chunk-UGWBJAGN.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-LNV3NNDO.js";
3
+ } from "./chunk-3ZZEPLLB.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.176.2",
4
+ version: "0.178.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-TRG4RCTT.js";
8
+ } from "./chunk-XWUJWHFD.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-MOVIDCPX.js";
11
+ } from "./chunk-XCNS3CXE.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-RHNT2FYF.js";
14
+ } from "./chunk-H6ZXBFGX.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-LNV3NNDO.js";
17
+ } from "./chunk-3ZZEPLLB.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-ESIS6NVJ.js";
20
+ } from "./chunk-ABLODWPO.js";
21
21
  import {
22
22
  parseSlackMessageTs,
23
23
  parseSlackUserId
@@ -26,7 +26,7 @@ import {
26
26
  isRecord,
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-PLJ3UO67.js";
29
+ } from "./chunk-UGWBJAGN.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logWarn
3
- } from "./chunk-PLJ3UO67.js";
3
+ } from "./chunk-UGWBJAGN.js";
4
4
 
5
5
  // src/chat/conversation-privacy.ts
6
6
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,6 +1,3 @@
1
- import {
2
- getTurnRequestDeadline
3
- } from "./chunk-QWPKRFG6.js";
4
1
  import {
5
2
  CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
6
3
  CONVERSATION_WORK_MAX_RETRIES,
@@ -21,20 +18,23 @@ import {
21
18
  releaseConversationWork,
22
19
  requestAnotherSlice,
23
20
  startConversationWork
24
- } from "./chunk-H5SVUUPE.js";
21
+ } from "./chunk-BUGO42R6.js";
25
22
  import {
26
23
  ConversationQueueMessageRejectedError
27
24
  } from "./chunk-JAL3CH4G.js";
25
+ import {
26
+ getTurnRequestDeadline
27
+ } from "./chunk-6OYVH66J.js";
28
28
  import {
29
29
  getChatConfig,
30
30
  isProviderRetryError
31
- } from "./chunk-LNV3NNDO.js";
31
+ } from "./chunk-3ZZEPLLB.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-PLJ3UO67.js";
37
+ } from "./chunk-UGWBJAGN.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-ESIS6NVJ.js";
3
+ } from "./chunk-ABLODWPO.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-JRDM64UU.js";
4
+ } from "./chunk-AVRWMQ4U.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-H5SVUUPE.js";
7
+ } from "./chunk-BUGO42R6.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-DBXTXY2Z.js";
15
+ } from "./chunk-4K6VNP3S.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-AJ6M3LLM.js";
22
+ } from "./chunk-G3CQEUHI.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-2PWBS4JK.js";
28
+ } from "./chunk-22T3HB44.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -49,31 +49,31 @@ import {
49
49
  saveTurnCheckpoint,
50
50
  startActiveTurn,
51
51
  upsertConversationMessage
52
- } from "./chunk-B2RBW7CX.js";
52
+ } from "./chunk-BFLMRTPD.js";
53
53
  import {
54
54
  normalizeSlackConversationId
55
- } from "./chunk-TRG4RCTT.js";
55
+ } from "./chunk-XWUJWHFD.js";
56
56
  import {
57
57
  getConversationEventStore,
58
58
  getConversationStore,
59
59
  getDb
60
- } from "./chunk-MOVIDCPX.js";
60
+ } from "./chunk-XCNS3CXE.js";
61
61
  import {
62
62
  juniorApiTokens,
63
63
  juniorConversationParticipants,
64
64
  juniorConversations,
65
65
  juniorIdentities,
66
66
  juniorUsers
67
- } from "./chunk-2KSPJ6EE.js";
67
+ } from "./chunk-ZCHHVTMF.js";
68
68
  import {
69
69
  getSlackBotToken
70
- } from "./chunk-LNV3NNDO.js";
70
+ } from "./chunk-3ZZEPLLB.js";
71
71
  import {
72
72
  juniorDestinations
73
73
  } from "./chunk-VFUK3X5B.js";
74
74
  import {
75
75
  canExposeConversationPayload
76
- } from "./chunk-HLEE6JNT.js";
76
+ } from "./chunk-KEQAA42D.js";
77
77
  import {
78
78
  credentialContextForActor
79
79
  } from "./chunk-CGA4ERJ5.js";
@@ -82,7 +82,7 @@ import {
82
82
  logWarn,
83
83
  setTags,
84
84
  withLogContext
85
- } from "./chunk-PLJ3UO67.js";
85
+ } from "./chunk-UGWBJAGN.js";
86
86
 
87
87
  // src/handlers/health.ts
88
88
  function readHealthReport() {
@@ -1025,7 +1025,15 @@ import { eq as eq3, inArray as inArray2 } from "drizzle-orm";
1025
1025
  import { alias } from "drizzle-orm/pg-core";
1026
1026
 
1027
1027
  // src/api/conversations/membership.ts
1028
- import { and as and2, eq as eq2, exists, inArray, or } from "drizzle-orm";
1028
+ import {
1029
+ and as and2,
1030
+ eq as eq2,
1031
+ exists,
1032
+ inArray,
1033
+ isNotNull,
1034
+ notExists,
1035
+ or
1036
+ } from "drizzle-orm";
1029
1037
  function conversationHasParticipantUser(userId) {
1030
1038
  const participant = getDb().select({
1031
1039
  rootConversationId: juniorConversationParticipants.rootConversationId
@@ -1057,12 +1065,110 @@ function conversationHasParticipantEmail(email) {
1057
1065
  );
1058
1066
  return exists(participant);
1059
1067
  }
1068
+ function conversationArchivedForUser(userId) {
1069
+ const archive = getDb().select({
1070
+ rootConversationId: juniorConversationParticipants.rootConversationId
1071
+ }).from(juniorConversationParticipants).where(
1072
+ and2(
1073
+ eq2(
1074
+ juniorConversationParticipants.rootConversationId,
1075
+ juniorConversations.conversationId
1076
+ ),
1077
+ eq2(juniorConversationParticipants.userId, userId),
1078
+ isNotNull(juniorConversationParticipants.archivedAt)
1079
+ )
1080
+ );
1081
+ return exists(archive);
1082
+ }
1083
+ function conversationNotArchivedForUser(userId) {
1084
+ const archive = getDb().select({
1085
+ rootConversationId: juniorConversationParticipants.rootConversationId
1086
+ }).from(juniorConversationParticipants).where(
1087
+ and2(
1088
+ eq2(
1089
+ juniorConversationParticipants.rootConversationId,
1090
+ juniorConversations.conversationId
1091
+ ),
1092
+ eq2(juniorConversationParticipants.userId, userId),
1093
+ isNotNull(juniorConversationParticipants.archivedAt)
1094
+ )
1095
+ );
1096
+ return notExists(archive);
1097
+ }
1098
+ function conversationArchivedForEmail(email) {
1099
+ const archive = getDb().select({
1100
+ rootConversationId: juniorConversationParticipants.rootConversationId
1101
+ }).from(juniorConversationParticipants).innerJoin(
1102
+ juniorUsers,
1103
+ eq2(juniorUsers.id, juniorConversationParticipants.userId)
1104
+ ).where(
1105
+ and2(
1106
+ eq2(
1107
+ juniorConversationParticipants.rootConversationId,
1108
+ juniorConversations.conversationId
1109
+ ),
1110
+ eq2(juniorUsers.primaryEmailNormalized, email),
1111
+ isNotNull(juniorConversationParticipants.archivedAt)
1112
+ )
1113
+ );
1114
+ return exists(archive);
1115
+ }
1116
+ function conversationNotArchivedForEmail(email) {
1117
+ const archive = getDb().select({
1118
+ rootConversationId: juniorConversationParticipants.rootConversationId
1119
+ }).from(juniorConversationParticipants).innerJoin(
1120
+ juniorUsers,
1121
+ eq2(juniorUsers.id, juniorConversationParticipants.userId)
1122
+ ).where(
1123
+ and2(
1124
+ eq2(
1125
+ juniorConversationParticipants.rootConversationId,
1126
+ juniorConversations.conversationId
1127
+ ),
1128
+ eq2(juniorUsers.primaryEmailNormalized, email),
1129
+ isNotNull(juniorConversationParticipants.archivedAt)
1130
+ )
1131
+ );
1132
+ return notExists(archive);
1133
+ }
1060
1134
  function viewerConversationMembership(args) {
1061
1135
  if (args.actorMatch && args.participantMatch) {
1062
1136
  return or(args.actorMatch, args.participantMatch);
1063
1137
  }
1064
1138
  return args.actorMatch ?? args.participantMatch;
1065
1139
  }
1140
+ async function conversationArchiveTimes(db, conversationIds, subject) {
1141
+ if (!subject || conversationIds.length === 0) return /* @__PURE__ */ new Map();
1142
+ const query = db.select({
1143
+ archivedAt: juniorConversationParticipants.archivedAt,
1144
+ rootConversationId: juniorConversationParticipants.rootConversationId
1145
+ }).from(juniorConversationParticipants);
1146
+ const rows = "userId" in subject ? await query.where(
1147
+ and2(
1148
+ eq2(juniorConversationParticipants.userId, subject.userId),
1149
+ inArray(juniorConversationParticipants.rootConversationId, [
1150
+ ...conversationIds
1151
+ ]),
1152
+ isNotNull(juniorConversationParticipants.archivedAt)
1153
+ )
1154
+ ) : await query.innerJoin(
1155
+ juniorUsers,
1156
+ eq2(juniorUsers.id, juniorConversationParticipants.userId)
1157
+ ).where(
1158
+ and2(
1159
+ eq2(juniorUsers.primaryEmailNormalized, subject.email),
1160
+ inArray(juniorConversationParticipants.rootConversationId, [
1161
+ ...conversationIds
1162
+ ]),
1163
+ isNotNull(juniorConversationParticipants.archivedAt)
1164
+ )
1165
+ );
1166
+ return new Map(
1167
+ rows.flatMap(
1168
+ (row) => row.archivedAt ? [[row.rootConversationId, row.archivedAt.getTime()]] : []
1169
+ )
1170
+ );
1171
+ }
1066
1172
  async function conversationIdsWithParticipantUser(db, conversationIds, userId) {
1067
1173
  if (conversationIds.length === 0) {
1068
1174
  return /* @__PURE__ */ new Set();
@@ -1335,7 +1441,12 @@ export {
1335
1441
  routeApiTurnWork,
1336
1442
  conversationHasParticipantUser,
1337
1443
  conversationHasParticipantEmail,
1444
+ conversationArchivedForUser,
1445
+ conversationNotArchivedForUser,
1446
+ conversationArchivedForEmail,
1447
+ conversationNotArchivedForEmail,
1338
1448
  viewerConversationMembership,
1449
+ conversationArchiveTimes,
1339
1450
  readConversationAccessFromSql,
1340
1451
  createPersonalToken,
1341
1452
  listPersonalTokens,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RF6J3DIO.js";
4
4
  import {
5
5
  resolveBaseUrl
6
- } from "./chunk-OOH45KJS.js";
6
+ } from "./chunk-JVXZ3WDH.js";
7
7
  import {
8
8
  isExperimentalFeatureEnabled
9
9
  } from "./chunk-VRS6WDK5.js";
@@ -12,27 +12,27 @@ import {
12
12
  getPlugins,
13
13
  getSlackClient,
14
14
  withSlackRetries
15
- } from "./chunk-TRG4RCTT.js";
15
+ } from "./chunk-XWUJWHFD.js";
16
16
  import {
17
17
  getDb,
18
18
  parseDestination
19
- } from "./chunk-MOVIDCPX.js";
19
+ } from "./chunk-XCNS3CXE.js";
20
20
  import {
21
21
  sleep
22
- } from "./chunk-KKY2R2QF.js";
22
+ } from "./chunk-AQHSXA3J.js";
23
23
  import {
24
24
  acquireActiveLock,
25
25
  getStateAdapter
26
- } from "./chunk-RHNT2FYF.js";
26
+ } from "./chunk-H6ZXBFGX.js";
27
27
  import {
28
28
  pluginCatalogRuntime
29
- } from "./chunk-ESIS6NVJ.js";
29
+ } from "./chunk-ABLODWPO.js";
30
30
  import {
31
31
  fetchWithBoundedOAuthErrorBodies
32
- } from "./chunk-2XQ45FB2.js";
32
+ } from "./chunk-D3UJTX4U.js";
33
33
  import {
34
34
  isRecord
35
- } from "./chunk-PLJ3UO67.js";
35
+ } from "./chunk-UGWBJAGN.js";
36
36
 
37
37
  // src/chat/capabilities/router.ts
38
38
  var ProviderCredentialRouter = class {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-H5SVUUPE.js";
3
+ } from "./chunk-BUGO42R6.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService,
6
6
  getPersistedSandboxState,
7
7
  getPersistedThreadState,
8
8
  persistThreadStateById
9
- } from "./chunk-AJ6M3LLM.js";
9
+ } from "./chunk-G3CQEUHI.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-HXX3CSGJ.js";
18
+ } from "./chunk-BHHWCNXI.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-B2RBW7CX.js";
29
+ } from "./chunk-BFLMRTPD.js";
30
30
  import {
31
31
  getConversationEventStore,
32
32
  getConversationStore,
33
33
  getSqlExecutor
34
- } from "./chunk-MOVIDCPX.js";
34
+ } from "./chunk-XCNS3CXE.js";
35
35
  import {
36
36
  juniorAgentBindings,
37
37
  juniorAgentInvocations
38
- } from "./chunk-2KSPJ6EE.js";
38
+ } from "./chunk-ZCHHVTMF.js";
39
39
 
40
40
  // src/chat/agent-invocations/work.ts
41
41
  import { z } from "zod";
@@ -2,10 +2,10 @@ import {
2
2
  ToolInputError,
3
3
  canRouteResourceEvents,
4
4
  getPlugins
5
- } from "./chunk-TRG4RCTT.js";
5
+ } from "./chunk-XWUJWHFD.js";
6
6
  import {
7
7
  getDb
8
- } from "./chunk-MOVIDCPX.js";
8
+ } from "./chunk-XCNS3CXE.js";
9
9
  import {
10
10
  juniorAttachments,
11
11
  juniorConversations,
@@ -13,13 +13,13 @@ import {
13
13
  juniorSchedulerRuns,
14
14
  juniorSchedulerTasks,
15
15
  juniorStats
16
- } from "./chunk-2KSPJ6EE.js";
16
+ } from "./chunk-ZCHHVTMF.js";
17
17
  import {
18
18
  juniorDestinations
19
19
  } from "./chunk-VFUK3X5B.js";
20
20
  import {
21
21
  logInfo
22
- } from "./chunk-PLJ3UO67.js";
22
+ } from "./chunk-UGWBJAGN.js";
23
23
 
24
24
  // src/chat/resource-events/catalog.ts
25
25
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-FDA3E627.js";
3
+ } from "./chunk-RE4XWXBV.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
@@ -73,7 +73,7 @@ var conversationFeedQuerySchema = z2.object({
73
73
  status: z2.enum(["active", "archived"]).default("active")
74
74
  }).strict();
75
75
  var archiveConversationBodySchema = z2.object({ archived: z2.boolean(), lastSeenAt: z2.string().datetime() }).strict();
76
- var archiveConversationResponseSchema = z2.object({ archived: z2.boolean() }).strict();
76
+ var archiveConversationResponseSchema = z2.object({ archivedAt: z2.string().datetime().nullable() }).strict();
77
77
  var createConversationBodySchema = z2.object({
78
78
  idempotencyKey: z2.string().trim().min(1).max(200),
79
79
  message: z2.string().trim().min(1).max(32e3),
@@ -189,7 +189,7 @@ var conversationSummaryReportSchema = z2.object({
189
189
  lastProgressAt: z2.string(),
190
190
  surface: conversationSurfaceSchema,
191
191
  actorIdentity: actorIdentitySchema.optional(),
192
- archivedAt: z2.string().optional(),
192
+ archivedAt: z2.string().datetime().nullable().optional(),
193
193
  channel: z2.string().optional(),
194
194
  channelName: z2.string().optional(),
195
195
  channelNameRedacted: z2.boolean().optional(),
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-ESIS6NVJ.js";
3
+ } from "./chunk-ABLODWPO.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-PLJ3UO67.js";
6
+ } from "./chunk-UGWBJAGN.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-LY6QWCJI.js";
12
+ } from "./chunk-AGJ4OQ2V.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";
@@ -1,17 +1,14 @@
1
1
  import {
2
2
  relayLocalOAuthCallback
3
3
  } from "./chunk-FA6POGLH.js";
4
- import {
5
- getTurnRequestDeadline
6
- } from "./chunk-QWPKRFG6.js";
7
4
  import {
8
5
  buildSentryConversationUrl,
9
6
  deleteWebAuthorization
10
- } from "./chunk-JRDM64UU.js";
7
+ } from "./chunk-AVRWMQ4U.js";
11
8
  import {
12
9
  ensureConversationWake,
13
10
  requestConversationWork
14
- } from "./chunk-H5SVUUPE.js";
11
+ } from "./chunk-BUGO42R6.js";
15
12
  import {
16
13
  buildDeliveredTurnStatePatch,
17
14
  finalizeFailedTurnReplyWithEvent,
@@ -24,7 +21,7 @@ import {
24
21
  requireTurnFailureEventId,
25
22
  resolveTurnSessionRouting,
26
23
  scheduleSessionCompletedPluginTasks
27
- } from "./chunk-DBXTXY2Z.js";
24
+ } from "./chunk-4K6VNP3S.js";
28
25
  import {
29
26
  ConversationTurnLifecycleService,
30
27
  coerceThreadConversationState,
@@ -33,7 +30,7 @@ import {
33
30
  getPersistedSandboxState,
34
31
  getPersistedThreadState,
35
32
  persistThreadStateById
36
- } from "./chunk-AJ6M3LLM.js";
33
+ } from "./chunk-G3CQEUHI.js";
37
34
  import {
38
35
  getVercelConversationWorkQueue
39
36
  } from "./chunk-WR76IVA5.js";
@@ -47,7 +44,10 @@ import {
47
44
  lookupSlackUserProfile,
48
45
  resolvePluginOAuthAccount,
49
46
  runAgentWithTimeout
50
- } from "./chunk-YAB6CALP.js";
47
+ } from "./chunk-QCCLDJHB.js";
48
+ import {
49
+ getTurnRequestDeadline
50
+ } from "./chunk-6OYVH66J.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-OOH45KJS.js";
66
+ } from "./chunk-JVXZ3WDH.js";
67
67
  import {
68
68
  parseSlackThreadId,
69
69
  readSlackRawMessageContext,
70
70
  resolveSlackChannelIdFromMessage,
71
71
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-2PWBS4JK.js";
72
+ } from "./chunk-22T3HB44.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-B2RBW7CX.js";
99
+ } from "./chunk-BFLMRTPD.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-TRG4RCTT.js";
108
+ } from "./chunk-XWUJWHFD.js";
109
109
  import {
110
110
  getConversationEventStore,
111
111
  getSqlExecutor,
112
112
  requireSlackDestination,
113
113
  upsertIdentity,
114
114
  upsertLinkedIdentity
115
- } from "./chunk-MOVIDCPX.js";
115
+ } from "./chunk-XCNS3CXE.js";
116
116
  import {
117
117
  acquireActiveLock,
118
118
  getStateAdapter
119
- } from "./chunk-RHNT2FYF.js";
119
+ } from "./chunk-H6ZXBFGX.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-LNV3NNDO.js";
127
+ } from "./chunk-3ZZEPLLB.js";
128
128
  import {
129
129
  discoverSkills
130
- } from "./chunk-UZM72ORS.js";
130
+ } from "./chunk-U3UDPGZG.js";
131
131
  import {
132
132
  pluginCatalogRuntime
133
- } from "./chunk-ESIS6NVJ.js";
133
+ } from "./chunk-ABLODWPO.js";
134
134
  import {
135
135
  buildOAuthTokenRequest,
136
136
  hasRequiredOAuthScope,
137
137
  parseOAuthTokenResponse
138
- } from "./chunk-2XQ45FB2.js";
138
+ } from "./chunk-D3UJTX4U.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-PLJ3UO67.js";
154
+ } from "./chunk-UGWBJAGN.js";
155
155
  import {
156
156
  homeDir
157
157
  } from "./chunk-H4HBKISO.js";