@sentry/junior 0.188.0 → 0.190.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 (115) hide show
  1. package/dist/{agent-hooks-5RQEVLQD.js → agent-hooks-3IG2FQW2.js} +11 -11
  2. package/dist/api/acp/conversations.d.ts +2 -2
  3. package/dist/api/conversations/list.d.ts +7 -0
  4. package/dist/api/people/shared.d.ts +54 -0
  5. package/dist/api.js +44 -55
  6. package/dist/app.d.ts +1 -1
  7. package/dist/app.js +1025 -349
  8. package/dist/{catalog-runtime-L4A6BJ3U.js → catalog-runtime-2OT7S3ZC.js} +4 -4
  9. package/dist/chat/actor.d.ts +7 -2
  10. package/dist/chat/agent/resume.d.ts +0 -2
  11. package/dist/chat/agent/types.d.ts +8 -9
  12. package/dist/chat/agent-dispatch/work.d.ts +1 -10
  13. package/dist/chat/agent-invocations/spawn.d.ts +1 -1
  14. package/dist/chat/agent-invocations/types.d.ts +44 -108
  15. package/dist/chat/app/conversation-work.d.ts +16 -8
  16. package/dist/chat/conversation-privacy.d.ts +7 -7
  17. package/dist/chat/conversations/destination.d.ts +12 -0
  18. package/dist/chat/conversations/projection.d.ts +2 -2
  19. package/dist/chat/conversations/sql/location.d.ts +13 -4
  20. package/dist/chat/{api-turns → conversations}/stop.d.ts +2 -2
  21. package/dist/chat/conversations/store.d.ts +4 -4
  22. package/dist/chat/conversations/structured-events.d.ts +1 -1
  23. package/dist/chat/{api-turns/authorization.d.ts → conversations/web-authorization.d.ts} +1 -0
  24. package/dist/chat/conversations/web-input.d.ts +98 -0
  25. package/dist/chat/conversations/web-mailbox.d.ts +12 -0
  26. package/dist/chat/event-tasks/tool-support.d.ts +1 -7
  27. package/dist/chat/providers/slack/runtime.d.ts +1 -0
  28. package/dist/chat/providers/slack/system-turn.d.ts +8 -0
  29. package/dist/chat/resource-events/actor.d.ts +13 -12
  30. package/dist/chat/resource-events/notification.d.ts +1 -1
  31. package/dist/chat/services/guardian-action-policy.d.ts +1 -1
  32. package/dist/chat/services/turn-session-routing.d.ts +2 -2
  33. package/dist/chat/source.d.ts +3 -3
  34. package/dist/chat/task-execution/assistant-message.d.ts +32 -0
  35. package/dist/chat/task-execution/conversation-turn.d.ts +8 -0
  36. package/dist/chat/{api-turns → task-execution}/mailbox-input.d.ts +1 -2
  37. package/dist/chat/task-execution/mailbox-turn.d.ts +52 -0
  38. package/dist/chat/task-execution/paused-turn.d.ts +1 -1
  39. package/dist/chat/task-execution/slack-work.d.ts +0 -2
  40. package/dist/chat/task-execution/state.d.ts +2 -2
  41. package/dist/chat/task-execution/store.d.ts +1 -1
  42. package/dist/chat/task-execution/turn-cursor.d.ts +10 -1
  43. package/dist/chat/tools/types.d.ts +9 -2
  44. package/dist/{chunk-XJIPMHKI.js → chunk-2MKHYSYL.js} +3 -3
  45. package/dist/{chunk-QCGNHSMA.js → chunk-2MRF22J4.js} +25 -10
  46. package/dist/{chunk-HCIVBCP5.js → chunk-3J3BCB4J.js} +1 -1
  47. package/dist/chunk-4BLFIYVK.js +703 -0
  48. package/dist/{chunk-NZLZ4KYZ.js → chunk-4PKEJK5B.js} +1 -1
  49. package/dist/{chunk-VFZAUQ5V.js → chunk-62DRKZQU.js} +5 -183
  50. package/dist/{chunk-QIOUTXTZ.js → chunk-663DQH5W.js} +1 -1
  51. package/dist/{chunk-Z5SKZE5B.js → chunk-67MMSYSE.js} +4 -12
  52. package/dist/{chunk-ZX7RSBQ6.js → chunk-6BXUSF7J.js} +1 -1
  53. package/dist/{chunk-W42ENMJW.js → chunk-6H7YU6XH.js} +1 -1
  54. package/dist/{chunk-WGZJ5SU4.js → chunk-7UJ6IJCK.js} +1 -1
  55. package/dist/{chunk-QDHJTKPE.js → chunk-7Y7XMI6P.js} +8 -6
  56. package/dist/{chunk-6YGFBU3A.js → chunk-BGOLRC36.js} +62 -336
  57. package/dist/{chunk-CVBDVIF4.js → chunk-BUJU6C2J.js} +1 -1
  58. package/dist/{chunk-XI4PVY2T.js → chunk-CZXZKTAI.js} +5 -5
  59. package/dist/chunk-DA2KGZZI.js +13 -0
  60. package/dist/{chunk-RMB7CERI.js → chunk-DJZGQ7OL.js} +311 -137
  61. package/dist/{chunk-FIUCHYT6.js → chunk-DVX6U6GI.js} +1 -1
  62. package/dist/{chunk-AW77HH54.js → chunk-ECOR3OXY.js} +19 -299
  63. package/dist/{chunk-WW2Y7JIA.js → chunk-F3K2267N.js} +51 -50
  64. package/dist/{chunk-W2DDJCPS.js → chunk-FVFJ57RK.js} +8 -8
  65. package/dist/{chunk-UVUXFRYN.js → chunk-GWCFXTB6.js} +211 -7
  66. package/dist/{chunk-X55FOVZO.js → chunk-HI5KXE3C.js} +3 -3
  67. package/dist/{chunk-ERZMACYA.js → chunk-IRQ3RSX3.js} +3 -3
  68. package/dist/{chunk-32XSSFZV.js → chunk-JV7U4665.js} +1 -1
  69. package/dist/chunk-MNHJ4WLE.js +285 -0
  70. package/dist/{chunk-SC67CH3C.js → chunk-OJFX2FP7.js} +14 -17
  71. package/dist/{chunk-IUUQWIG2.js → chunk-OKAHLUSU.js} +70 -19
  72. package/dist/{chunk-PSHMPRIU.js → chunk-OON4IQHH.js} +2 -2
  73. package/dist/{chunk-6JZGXLL2.js → chunk-OYCOLHCR.js} +5 -7
  74. package/dist/{chunk-3HEZWDS5.js → chunk-REVH4BZU.js} +2 -2
  75. package/dist/{chunk-CDSLOYOR.js → chunk-RLYJYEIY.js} +6 -6
  76. package/dist/{chunk-CZRWU4ZM.js → chunk-T66GV7A3.js} +2 -5
  77. package/dist/{chunk-Q7O74WOO.js → chunk-VWNIDTFR.js} +2 -2
  78. package/dist/{chunk-CIG6WI7Q.js → chunk-W2C4TPLB.js} +5 -5
  79. package/dist/{chunk-QIMN3FXL.js → chunk-Y4WL4OYD.js} +1 -1
  80. package/dist/{chunk-MQDIIFZM.js → chunk-YFU4DGZY.js} +12 -5
  81. package/dist/chunk-YKIAUKYH.js +311 -0
  82. package/dist/{chunk-QVH6FW3T.js → chunk-ZFCO2TMB.js} +7 -3
  83. package/dist/cli/chat.js +34 -33
  84. package/dist/cli/check.js +5 -5
  85. package/dist/cli/plugins.js +12 -12
  86. package/dist/cli/snapshot-create.js +9 -9
  87. package/dist/cli/upgrade.js +6 -6
  88. package/dist/db/schema/agent-invocations.d.ts +18 -42
  89. package/dist/db/schema/conversations.d.ts +62 -0
  90. package/dist/db/schema.d.ts +49 -42
  91. package/dist/{db-YPRZAA2T.js → db-2IFDMDDY.js} +6 -6
  92. package/dist/instrumentation.js +3 -3
  93. package/dist/nitro.js +6 -6
  94. package/dist/{oauth-callback-server-DBBIR3XG.js → oauth-callback-server-SZSS2KH6.js} +30 -28
  95. package/dist/{runner-FKVFFPLO.js → runner-2N4QU77X.js} +25 -21
  96. package/dist/{skills-4RBAZEMV.js → skills-VU2LZAKX.js} +5 -5
  97. package/dist/spawn-3K7RV4T5.js +42 -0
  98. package/dist/task-runner-52DYFHW3.js +36 -0
  99. package/dist/{validation-E6Z5LHZM.js → validation-IJGHK7NI.js} +5 -5
  100. package/dist/version.js +1 -1
  101. package/dist/{work-OFTXWOK4.js → work-DI45MLRL.js} +22 -21
  102. package/dist/{worker-OMWNOKTJ.js → worker-FY7KWG2M.js} +10 -10
  103. package/migrations/0037_conversation_location.sql +23 -0
  104. package/migrations/meta/0037_snapshot.json +3192 -0
  105. package/migrations/meta/_journal.json +7 -0
  106. package/package.json +4 -4
  107. package/dist/chat/api-turns/assistant-message.d.ts +0 -12
  108. package/dist/chat/api-turns/cancellation.d.ts +0 -24
  109. package/dist/chat/api-turns/routing.d.ts +0 -51
  110. package/dist/chat/api-turns/work.d.ts +0 -99
  111. package/dist/chat/task-execution/slack-resource-event.d.ts +0 -55
  112. package/dist/chunk-6FGN7ZEG.js +0 -221
  113. package/dist/chunk-LODJKINF.js +0 -1502
  114. package/dist/spawn-CO7QFCNJ.js +0 -41
  115. package/dist/task-runner-DUGZGI7V.js +0 -34
@@ -13,26 +13,26 @@ import {
13
13
  getPlugins,
14
14
  setPlugins,
15
15
  validatePlugins
16
- } from "./chunk-QCGNHSMA.js";
16
+ } from "./chunk-2MRF22J4.js";
17
17
  import "./chunk-3Y47VMHV.js";
18
- import "./chunk-IUUQWIG2.js";
19
- import "./chunk-QVH6FW3T.js";
20
- import "./chunk-X55FOVZO.js";
21
- import "./chunk-ZX7RSBQ6.js";
18
+ import "./chunk-OKAHLUSU.js";
19
+ import "./chunk-ZFCO2TMB.js";
20
+ import "./chunk-HI5KXE3C.js";
21
+ import "./chunk-6BXUSF7J.js";
22
22
  import "./chunk-GFBR4S3Q.js";
23
23
  import "./chunk-VFUK3X5B.js";
24
- import "./chunk-Q7O74WOO.js";
24
+ import "./chunk-VWNIDTFR.js";
25
25
  import "./chunk-D4YV5TDV.js";
26
- import "./chunk-FIUCHYT6.js";
27
- import "./chunk-NZLZ4KYZ.js";
28
- import "./chunk-QIOUTXTZ.js";
26
+ import "./chunk-DVX6U6GI.js";
27
+ import "./chunk-4PKEJK5B.js";
28
+ import "./chunk-663DQH5W.js";
29
29
  import "./chunk-CEMMLV5L.js";
30
30
  import "./chunk-N7TMSOZH.js";
31
31
  import "./chunk-DWPN6SCH.js";
32
32
  import "./chunk-TXKUKMVO.js";
33
- import "./chunk-QIMN3FXL.js";
33
+ import "./chunk-Y4WL4OYD.js";
34
34
  import "./chunk-PEQXYSSE.js";
35
- import "./chunk-32XSSFZV.js";
35
+ import "./chunk-JV7U4665.js";
36
36
  export {
37
37
  PluginHookDeniedError,
38
38
  applyPluginFormatMarkdown,
@@ -9,7 +9,7 @@ type ConversationMessage = {
9
9
  role: "assistant" | "user";
10
10
  text: string;
11
11
  };
12
- type PromptAdmission = {
12
+ type PromptResult = {
13
13
  afterCursor: number;
14
14
  messageId: string;
15
15
  status: "accepted";
@@ -50,7 +50,7 @@ export type AcpConversations = {
50
50
  idempotencyKey: string;
51
51
  text: string;
52
52
  user: User;
53
- }): Promise<PromptAdmission>;
53
+ }): Promise<PromptResult>;
54
54
  readMessages(conversationId: string): Promise<ConversationMessage[]>;
55
55
  readTurn(args: {
56
56
  afterCursor: number;
@@ -18,6 +18,13 @@ declare function conversationRows(db: JuniorDatabase, limit: number, status: "ac
18
18
  originType: string | null;
19
19
  originId: string | null;
20
20
  originRunId: string | null;
21
+ location: {
22
+ id: string;
23
+ provider: "slack";
24
+ teamId: string;
25
+ channelId: string;
26
+ threadTs?: string | undefined;
27
+ } | null;
21
28
  destinationId: string | null;
22
29
  destination: {
23
30
  platform: "slack";
@@ -128,6 +128,37 @@ export declare const peopleTreeConversation: import("drizzle-orm/pg-core").PgTab
128
128
  identity: undefined;
129
129
  generated: undefined;
130
130
  }, {}, {}>;
131
+ location: import("drizzle-orm/pg-core").PgColumn<{
132
+ name: "location_json";
133
+ tableName: "junior_conversations";
134
+ dataType: "json";
135
+ columnType: "PgJsonb";
136
+ data: {
137
+ id: string;
138
+ provider: "slack";
139
+ teamId: string;
140
+ channelId: string;
141
+ threadTs?: string | undefined;
142
+ };
143
+ driverParam: unknown;
144
+ notNull: false;
145
+ hasDefault: false;
146
+ isPrimaryKey: false;
147
+ isAutoincrement: false;
148
+ hasRuntimeDefault: false;
149
+ enumValues: undefined;
150
+ baseColumn: never;
151
+ identity: undefined;
152
+ generated: undefined;
153
+ }, {}, {
154
+ $type: {
155
+ id: string;
156
+ provider: "slack";
157
+ teamId: string;
158
+ channelId: string;
159
+ threadTs?: string | undefined;
160
+ };
161
+ }>;
131
162
  destinationId: import("drizzle-orm/pg-core").PgColumn<{
132
163
  name: "destination_id";
133
164
  tableName: "junior_conversations";
@@ -771,6 +802,29 @@ export declare const peopleTreeConversation: import("drizzle-orm/pg-core").PgTab
771
802
  identity: undefined;
772
803
  generated: undefined;
773
804
  }, {}, {}>;
805
+ location: import("drizzle-orm/pg-core").PgColumn<{
806
+ name: "location_json";
807
+ tableName: "people_tree_conversation";
808
+ dataType: "json";
809
+ columnType: "PgJsonb";
810
+ data: {
811
+ id: string;
812
+ provider: "slack";
813
+ teamId: string;
814
+ channelId: string;
815
+ threadTs?: string | undefined;
816
+ };
817
+ driverParam: unknown;
818
+ notNull: false;
819
+ hasDefault: false;
820
+ isPrimaryKey: false;
821
+ isAutoincrement: false;
822
+ hasRuntimeDefault: false;
823
+ enumValues: undefined;
824
+ baseColumn: never;
825
+ identity: undefined;
826
+ generated: undefined;
827
+ }, {}, {}>;
774
828
  destinationId: import("drizzle-orm/pg-core").PgColumn<{
775
829
  name: "destination_id";
776
830
  tableName: "people_tree_conversation";
package/dist/api.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  workspaceSchema
46
46
  } from "./chunk-PFAZSRGR.js";
47
47
  import {
48
- appendAndEnqueueApiConversationMessage,
48
+ appendAndEnqueueWebMessage,
49
49
  conversationArchiveTimes,
50
50
  conversationArchivedForEmail,
51
51
  conversationArchivedForUser,
@@ -53,23 +53,22 @@ import {
53
53
  conversationHasParticipantUser,
54
54
  conversationNotArchivedForEmail,
55
55
  conversationNotArchivedForUser,
56
- createAndEnqueueApiConversation,
56
+ createAndEnqueueConversation,
57
57
  createVercelAttachmentStorage,
58
58
  formatSlackConversationRedactedLabel,
59
+ legacyWebMailboxMetadataSchema,
59
60
  lookupSlackUser,
60
61
  readConversationAccessFromSql,
61
62
  readHealthReport,
62
63
  resolveSlackConversationContextFromThreadId,
63
64
  viewerConversationMembership,
64
65
  webActorFromEmail
65
- } from "./chunk-LODJKINF.js";
66
+ } from "./chunk-4BLFIYVK.js";
66
67
  import {
67
68
  buildSentryConversationUrl,
68
69
  buildSentryEventUrl,
69
70
  getWebAuthorization
70
- } from "./chunk-PSHMPRIU.js";
71
- import "./chunk-ERZMACYA.js";
72
- import "./chunk-QDHJTKPE.js";
71
+ } from "./chunk-OON4IQHH.js";
73
72
  import {
74
73
  readTaskExecutionByConversationId,
75
74
  readTaskExecutionDays,
@@ -77,9 +76,7 @@ import {
77
76
  readTaskExecutionSummaries,
78
77
  readTaskExecutions,
79
78
  readTaskRuns
80
- } from "./chunk-AW77HH54.js";
81
- import "./chunk-W42ENMJW.js";
82
- import "./chunk-CIG6WI7Q.js";
79
+ } from "./chunk-MNHJ4WLE.js";
83
80
  import {
84
81
  healthReportSchema,
85
82
  pluginOperationalReportFeedSchema,
@@ -87,7 +84,6 @@ import {
87
84
  runtimeInfoReportSchema,
88
85
  skillReportsSchema
89
86
  } from "./chunk-UTL3MHPC.js";
90
- import "./chunk-XI4PVY2T.js";
91
87
  import {
92
88
  deleteEventTask,
93
89
  eventTaskBelongsToUser,
@@ -103,33 +99,30 @@ import {
103
99
  readScheduledTask,
104
100
  readStats,
105
101
  saveScheduledTask
106
- } from "./chunk-VFZAUQ5V.js";
102
+ } from "./chunk-62DRKZQU.js";
107
103
  import {
108
104
  parseSlackThreadId
109
- } from "./chunk-CVBDVIF4.js";
110
- import "./chunk-6FGN7ZEG.js";
105
+ } from "./chunk-BUJU6C2J.js";
111
106
  import {
112
107
  cancelHumanFacingPendingMessages,
113
108
  getConversation
114
- } from "./chunk-MQDIIFZM.js";
115
- import "./chunk-Z5SKZE5B.js";
109
+ } from "./chunk-YFU4DGZY.js";
110
+ import "./chunk-DA2KGZZI.js";
116
111
  import {
117
112
  agentTurnUsageSchema,
118
113
  fallbackShortTitle,
119
114
  hasAgentTurnUsage,
120
115
  renderJuniorNativeConversationEvent
121
- } from "./chunk-6YGFBU3A.js";
122
- import "./chunk-2LYHWMR4.js";
116
+ } from "./chunk-YKIAUKYH.js";
123
117
  import {
124
118
  getCachedSnapshot
125
- } from "./chunk-XJIPMHKI.js";
119
+ } from "./chunk-2MKHYSYL.js";
126
120
  import "./chunk-PDO5BLNM.js";
127
121
  import {
128
122
  getVercelConversationWorkQueue
129
123
  } from "./chunk-DKIJ2RP5.js";
130
124
  import "./chunk-JAL3CH4G.js";
131
125
  import "./chunk-7H2VZTWN.js";
132
- import "./chunk-WGZJ5SU4.js";
133
126
  import {
134
127
  SANDBOX_RUNTIME,
135
128
  WorkspaceValidationError,
@@ -149,7 +142,7 @@ import {
149
142
  updateWorkspace,
150
143
  withSlackRetries,
151
144
  workspaceRepoCheckoutPath
152
- } from "./chunk-QCGNHSMA.js";
145
+ } from "./chunk-2MRF22J4.js";
153
146
  import "./chunk-3Y47VMHV.js";
154
147
  import {
155
148
  getConversationStore,
@@ -158,7 +151,7 @@ import {
158
151
  locationFromRow,
159
152
  parseSessionSource,
160
153
  resolveRootConversationId
161
- } from "./chunk-IUUQWIG2.js";
154
+ } from "./chunk-OKAHLUSU.js";
162
155
  import {
163
156
  conversationReadColumns,
164
157
  juniorApiTokens,
@@ -170,23 +163,23 @@ import {
170
163
  juniorIdentities,
171
164
  juniorSchedulerTasks,
172
165
  juniorUsers
173
- } from "./chunk-QVH6FW3T.js";
166
+ } from "./chunk-ZFCO2TMB.js";
174
167
  import {
175
168
  create,
176
169
  hash
177
- } from "./chunk-X55FOVZO.js";
178
- import "./chunk-ZX7RSBQ6.js";
170
+ } from "./chunk-HI5KXE3C.js";
171
+ import "./chunk-6BXUSF7J.js";
179
172
  import {
180
173
  decodeStoredConversationEvent
181
174
  } from "./chunk-GFBR4S3Q.js";
182
175
  import {
183
176
  juniorDestinations
184
177
  } from "./chunk-VFUK3X5B.js";
185
- import "./chunk-Q7O74WOO.js";
178
+ import "./chunk-VWNIDTFR.js";
186
179
  import "./chunk-D4YV5TDV.js";
187
- import "./chunk-FIUCHYT6.js";
188
- import "./chunk-NZLZ4KYZ.js";
189
- import "./chunk-QIOUTXTZ.js";
180
+ import "./chunk-DVX6U6GI.js";
181
+ import "./chunk-4PKEJK5B.js";
182
+ import "./chunk-663DQH5W.js";
190
183
  import "./chunk-CEMMLV5L.js";
191
184
  import {
192
185
  parseSlackChannelId,
@@ -198,9 +191,9 @@ import "./chunk-TXKUKMVO.js";
198
191
  import {
199
192
  logException,
200
193
  logWarn
201
- } from "./chunk-QIMN3FXL.js";
194
+ } from "./chunk-Y4WL4OYD.js";
202
195
  import "./chunk-PEQXYSSE.js";
203
- import "./chunk-32XSSFZV.js";
196
+ import "./chunk-JV7U4665.js";
204
197
 
205
198
  // src/api.ts
206
199
  import { Hono as Hono9 } from "hono";
@@ -392,7 +385,7 @@ function actorFromViewer(viewer) {
392
385
  }
393
386
  async function createConversationForViewer(viewer, body) {
394
387
  try {
395
- return await createAndEnqueueApiConversation(
388
+ return await createAndEnqueueConversation(
396
389
  {
397
390
  actor: actorFromViewer(viewer),
398
391
  idempotencyKey: body.idempotencyKey,
@@ -416,9 +409,9 @@ async function appendConversationMessageForViewer(viewer, conversationId, body)
416
409
  throwApiError(404, "Conversation not found.");
417
410
  }
418
411
  const destinationPlatform = conversation.destination?.platform;
419
- const acceptsApiMessages = destinationPlatform === "local" && conversationId.startsWith("local:web:") || destinationPlatform === "slack";
420
- if (!acceptsApiMessages) {
421
- throwApiError(409, "Conversation does not accept API messages.");
412
+ const acceptsWebMessages = destinationPlatform === "local" && conversationId.startsWith("local:web:") || destinationPlatform === "slack";
413
+ if (!acceptsWebMessages) {
414
+ throwApiError(409, "Conversation does not accept web messages.");
422
415
  }
423
416
  const access = await readConversationAccessFromSql(
424
417
  getDb(),
@@ -429,7 +422,7 @@ async function appendConversationMessageForViewer(viewer, conversationId, body)
429
422
  throwApiError(403, "Only conversation participants can add messages.");
430
423
  }
431
424
  try {
432
- return await appendAndEnqueueApiConversationMessage(
425
+ return await appendAndEnqueueWebMessage(
433
426
  {
434
427
  actor: actorFromViewer(viewer),
435
428
  conversationId,
@@ -1303,7 +1296,7 @@ function surfaceFromSource(source, conversationId) {
1303
1296
  }
1304
1297
  function sourceUrlFromConversation(args) {
1305
1298
  const { conversation } = args;
1306
- if (!args.canViewPrivateContent || conversation.sessionSource?.platform !== "slack") {
1299
+ if (!args.canViewPrivateContent || conversation.sessionSource?.kind !== "slack") {
1307
1300
  return void 0;
1308
1301
  }
1309
1302
  const teamDomain = args.teamDomainByTeamId?.get(
@@ -1873,7 +1866,11 @@ function conversationFromRow(row) {
1873
1866
  ...row.identityHandle ? { slackUserName: row.identityHandle } : void 0,
1874
1867
  ...row.identityTenantId ? { teamId: row.identityTenantId } : void 0
1875
1868
  } : void 0;
1876
- const location = locationFromRow(row.destination);
1869
+ const location = locationFromRow(
1870
+ value.location,
1871
+ row.destination,
1872
+ sessionSource
1873
+ );
1877
1874
  return {
1878
1875
  schemaVersion: 1,
1879
1876
  conversationId: value.conversationId,
@@ -1974,7 +1971,7 @@ async function readConversationFeedFromSql(options = {}) {
1974
1971
  readRootConversationMetricsFromSql(db, conversationIds),
1975
1972
  resolveSlackTeamDomains(
1976
1973
  conversations.flatMap(
1977
- (conversation) => conversation.sessionSource?.platform === "slack" ? [conversation.sessionSource.teamId] : []
1974
+ (conversation) => conversation.sessionSource?.kind === "slack" ? [conversation.sessionSource.teamId] : []
1978
1975
  )
1979
1976
  ),
1980
1977
  listConversationWork(conversationIds),
@@ -2672,7 +2669,7 @@ async function readConversationDetailFromSql(conversationId, options) {
2672
2669
  ...options.viewer ? { viewer: options.viewer } : void 0
2673
2670
  }),
2674
2671
  resolveSlackTeamDomains(
2675
- record.conversation.sessionSource?.platform === "slack" ? [record.conversation.sessionSource.teamId] : []
2672
+ record.conversation.sessionSource?.kind === "slack" ? [record.conversation.sessionSource.teamId] : []
2676
2673
  )
2677
2674
  ]);
2678
2675
  const access = accessByConversation.get(conversationId);
@@ -2780,14 +2777,6 @@ async function cancelConversationPendingMessagesForViewer(viewer, conversationId
2780
2777
 
2781
2778
  // src/api/conversations/pending-messages.ts
2782
2779
  import { z as z4 } from "zod";
2783
- var apiTurnMailboxMetadataSchema = z4.object({
2784
- authorEmail: z4.string().email(),
2785
- authorFullName: z4.string().min(1).optional(),
2786
- authorUserId: z4.string().min(1),
2787
- authorUserName: z4.string().min(1).optional(),
2788
- kind: z4.literal("api_turn"),
2789
- messageId: z4.string().min(1)
2790
- }).strict();
2791
2780
  var slackMailboxAuthorSchema = z4.object({
2792
2781
  userId: z4.string(),
2793
2782
  userName: z4.string().optional(),
@@ -2805,7 +2794,7 @@ var slackMailboxMetadataSchema = z4.object({
2805
2794
  function isoFromMs(value) {
2806
2795
  return new Date(value).toISOString();
2807
2796
  }
2808
- function actorIdentityFromApiMetadata(metadata2) {
2797
+ function actorIdentityFromWebMetadata(metadata2) {
2809
2798
  return {
2810
2799
  email: metadata2.authorEmail.trim().toLowerCase(),
2811
2800
  ...metadata2.authorFullName ? { fullName: metadata2.authorFullName } : void 0
@@ -2828,7 +2817,7 @@ async function actorIdentityFromSlackMetadata(metadata2, teamId) {
2828
2817
  }
2829
2818
  async function projectPendingMessage(message2, canExposePayload) {
2830
2819
  if (message2.source === "web") {
2831
- const metadata2 = apiTurnMailboxMetadataSchema.safeParse(
2820
+ const metadata2 = legacyWebMailboxMetadataSchema.safeParse(
2832
2821
  message2.input.metadata
2833
2822
  );
2834
2823
  if (!metadata2.success) return void 0;
@@ -2843,7 +2832,7 @@ async function projectPendingMessage(message2, canExposePayload) {
2843
2832
  role: "user",
2844
2833
  source: "web",
2845
2834
  ...canExposePayload ? {
2846
- actorIdentity: actorIdentityFromApiMetadata(metadata2.data),
2835
+ actorIdentity: actorIdentityFromWebMetadata(metadata2.data),
2847
2836
  text
2848
2837
  } : { redacted: true }
2849
2838
  };
@@ -4596,7 +4585,7 @@ async function readPeoplePluginReports(args) {
4596
4585
  source: "plugins"
4597
4586
  });
4598
4587
  }
4599
- const { getPluginProfileReports } = await import("./agent-hooks-5RQEVLQD.js");
4588
+ const { getPluginProfileReports } = await import("./agent-hooks-3IG2FQW2.js");
4600
4589
  return pluginOperationalReportFeedSchema.parse({
4601
4590
  generatedAt: new Date(nowMs).toISOString(),
4602
4591
  reports: await getPluginProfileReports({
@@ -5400,7 +5389,7 @@ function readDescriptionText(home) {
5400
5389
  }
5401
5390
  }
5402
5391
  async function readSkillReports() {
5403
- const { discoverSkills } = await import("./skills-4RBAZEMV.js");
5392
+ const { discoverSkills } = await import("./skills-VU2LZAKX.js");
5404
5393
  const skills = await discoverSkills();
5405
5394
  return skillReportsSchema.parse(
5406
5395
  skills.map((skill) => ({
@@ -5410,7 +5399,7 @@ async function readSkillReports() {
5410
5399
  );
5411
5400
  }
5412
5401
  async function readPlugins() {
5413
- const { pluginCatalogRuntime } = await import("./catalog-runtime-L4A6BJ3U.js");
5402
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-2OT7S3ZC.js");
5414
5403
  return pluginsSchema.parse(
5415
5404
  pluginCatalogRuntime.getProviders().map((plugin) => ({
5416
5405
  configKeys: plugin.manifest.configKeys ?? [],
@@ -5423,7 +5412,7 @@ async function readPlugins() {
5423
5412
  async function readRuntimeInfoReport() {
5424
5413
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
5425
5414
  import("./discovery-DWVDM7UK.js"),
5426
- import("./catalog-runtime-L4A6BJ3U.js"),
5415
+ import("./catalog-runtime-2OT7S3ZC.js"),
5427
5416
  readPlugins(),
5428
5417
  readSkillReports()
5429
5418
  ]);
@@ -5439,7 +5428,7 @@ async function readRuntimeInfoReport() {
5439
5428
  }
5440
5429
  async function readPluginOperationalReportFeed() {
5441
5430
  const nowMs = Date.now();
5442
- const { getPluginOperationalReports } = await import("./agent-hooks-5RQEVLQD.js");
5431
+ const { getPluginOperationalReports } = await import("./agent-hooks-3IG2FQW2.js");
5443
5432
  return pluginOperationalReportFeedSchema.parse({
5444
5433
  source: "plugins",
5445
5434
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.d.ts CHANGED
@@ -62,7 +62,7 @@ export interface JuniorDashboardOptions {
62
62
  componentGallery?: boolean;
63
63
  /** Disable dashboard route mounting while preserving serializable config shape. */
64
64
  disabled?: boolean;
65
- /** Replace conversation API responses with dashboard visual-QA fixtures. */
65
+ /** Replace Conversation route responses with dashboard visual-QA fixtures. */
66
66
  mockConversations?: boolean;
67
67
  /** Browser session lifetime in seconds. */
68
68
  sessionMaxAgeSeconds?: number;