@sentry/junior 0.97.1 → 0.99.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 (59) hide show
  1. package/dist/{agent-hooks-XSUIVRQS.js → agent-hooks-OSW6C3CJ.js} +2 -2
  2. package/dist/api/conversations/detail.d.ts +1 -1
  3. package/dist/api/conversations/detail.query.d.ts +1 -1
  4. package/dist/api/conversations/list.d.ts +7 -2
  5. package/dist/api/conversations/list.query.d.ts +9 -3
  6. package/dist/api/conversations/projection.d.ts +0 -1
  7. package/dist/api/conversations/schema.d.ts +31 -8
  8. package/dist/api/people/schema.d.ts +0 -11
  9. package/dist/api/people/shared.d.ts +2 -4
  10. package/dist/api/schema.d.ts +4 -1
  11. package/dist/api/schema.js +5 -3
  12. package/dist/api-reference.d.ts +2 -2
  13. package/dist/api.js +28 -13
  14. package/dist/app.js +50 -37
  15. package/dist/chat/conversations/search.d.ts +24 -0
  16. package/dist/chat/conversations/sql/search.d.ts +4 -0
  17. package/dist/chat/db.d.ts +3 -0
  18. package/dist/chat/runtime/report-progress.d.ts +3 -0
  19. package/dist/chat/runtime/slack-resume.d.ts +2 -0
  20. package/dist/chat/services/context-compaction.d.ts +1 -0
  21. package/dist/chat/slack/assistant-thread/status-scheduler.d.ts +4 -3
  22. package/dist/chat/slack/outbound.d.ts +6 -0
  23. package/dist/chat/slack/tools/conversation-search.d.ts +71 -0
  24. package/dist/chat/state/turn-session.d.ts +2 -0
  25. package/dist/chat/tool-support/zod-tool.d.ts +1 -1
  26. package/dist/chunk-6DTVCPLO.js +146 -0
  27. package/dist/{chunk-VFH4ZKZT.js → chunk-CRQVIHDI.js} +1 -3
  28. package/dist/{chunk-6U26PYI5.js → chunk-CV22LUIV.js} +7 -17
  29. package/dist/{chunk-GUAP3H7O.js → chunk-DHHU2WSG.js} +2 -2
  30. package/dist/{chunk-T533JLM3.js → chunk-ER45IV77.js} +8 -6
  31. package/dist/{chunk-LUAE4MGW.js → chunk-EUZ44ROE.js} +21 -4
  32. package/dist/{chunk-5HLDPVYS.js → chunk-FTTFV6DC.js} +1 -1
  33. package/dist/{chunk-3F4OPKGF.js → chunk-IO65E4ZD.js} +2 -2
  34. package/dist/{chunk-ON6YKIQ7.js → chunk-KFUSLFLL.js} +21 -15
  35. package/dist/{chunk-FBHZJFHI.js → chunk-NJEDJFK4.js} +1 -1
  36. package/dist/{chunk-35BNLDOJ.js → chunk-OGHXZ4KQ.js} +134 -57
  37. package/dist/{chunk-WJOSZOON.js → chunk-OL6XQ23W.js} +11 -150
  38. package/dist/{chunk-XIRPQQVE.js → chunk-PYK7R5A7.js} +312 -175
  39. package/dist/{chunk-UAMKJPDF.js → chunk-T55RBE4Z.js} +4 -0
  40. package/dist/{chunk-WGXMTFNU.js → chunk-WJ7STXT6.js} +5 -3
  41. package/dist/{chunk-AUUCAFDE.js → chunk-ZZUBLPXD.js} +134 -11
  42. package/dist/cli/chat.js +11 -10
  43. package/dist/cli/plugins.js +2 -2
  44. package/dist/cli/upgrade.js +9 -7
  45. package/dist/{db-BWXYIKFQ.js → db-GFSCDAHS.js} +3 -1
  46. package/dist/detail-Q4IVDNGS.js +67 -0
  47. package/dist/{legacy-import-3NQJVGQL.js → legacy-import-6WWXMALY.js} +2 -2
  48. package/dist/{list-UXJI5Q5X.js → list-A3F5JDYV.js} +7 -5
  49. package/dist/{list-A3WFRIYX.js → list-M5BRWW3D.js} +5 -6
  50. package/dist/{plugin-conversations-DDNGC35A.js → plugin-conversations-PDCQWU3O.js} +3 -3
  51. package/dist/{profile-4RYDXWTF.js → profile-UEIRSVT3.js} +5 -5
  52. package/dist/{runner-JALSYH2P.js → runner-267ZRLZD.js} +8 -7
  53. package/dist/{stats-XKXH3PTY.js → stats-L62E4O4U.js} +7 -17
  54. package/dist/{subagent-TZ55XY37.js → subagent-UN3MP6LV.js} +6 -6
  55. package/migrations/0002_conversation_message_search.sql +1 -0
  56. package/migrations/meta/0002_snapshot.json +987 -0
  57. package/migrations/meta/_journal.json +7 -0
  58. package/package.json +6 -6
  59. package/dist/detail-GA6NXWQJ.js +0 -43
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  conversationStatsReportSchema
3
- } from "./chunk-LUAE4MGW.js";
3
+ } from "./chunk-EUZ44ROE.js";
4
4
  import "./chunk-PDO5BLNM.js";
5
5
  import {
6
6
  getDb,
@@ -8,7 +8,7 @@ import {
8
8
  juniorDestinations,
9
9
  juniorIdentities,
10
10
  juniorUsers
11
- } from "./chunk-35BNLDOJ.js";
11
+ } from "./chunk-OGHXZ4KQ.js";
12
12
  import "./chunk-EEZCY5WX.js";
13
13
  import "./chunk-LVA4I4H7.js";
14
14
  import "./chunk-B7PUBQQM.js";
@@ -22,14 +22,12 @@ import "./chunk-MLKGABMK.js";
22
22
  import { and, asc, desc, eq, gte, isNull, lte } from "drizzle-orm";
23
23
  var SAMPLE_LIMIT = 5e3;
24
24
  var WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
25
- var HUNG_PROGRESS_MS = 5 * 60 * 1e3;
26
25
  function emptyStatsItem(label) {
27
26
  return {
28
27
  active: 0,
29
28
  conversations: 0,
30
29
  durationMs: 0,
31
30
  failed: 0,
32
- hung: 0,
33
31
  label
34
32
  };
35
33
  }
@@ -58,16 +56,14 @@ function locationLabel(row) {
58
56
  const name = (row.channelName ?? row.destinationDisplayName)?.trim().replace(/^#/, "");
59
57
  return name ? `#${name}` : "Public Channel";
60
58
  }
61
- function signals(row, nowMs) {
59
+ function signals(row) {
62
60
  if (row.executionStatus === "failed") {
63
- return { active: false, failed: true, hung: false };
61
+ return { active: false, failed: true };
64
62
  }
65
63
  if (row.executionStatus === "idle") {
66
- return { active: false, failed: false, hung: false };
64
+ return { active: false, failed: false };
67
65
  }
68
- const updatedAt = (row.executionUpdatedAt ?? row.updatedAt).getTime();
69
- const hung = row.executionStatus === "running" && nowMs - updatedAt > HUNG_PROGRESS_MS;
70
- return { active: !hung, failed: false, hung };
66
+ return { active: true, failed: false };
71
67
  }
72
68
  function addConversation(map, label, rowSignals, metrics) {
73
69
  const item = map.get(label) ?? emptyStatsItem(label);
@@ -81,7 +77,6 @@ function addConversation(map, label, rowSignals, metrics) {
81
77
  }
82
78
  item.active += rowSignals.active ? 1 : 0;
83
79
  item.failed += rowSignals.failed ? 1 : 0;
84
- item.hung += rowSignals.hung ? 1 : 0;
85
80
  map.set(label, item);
86
81
  }
87
82
  function statsItems(map) {
@@ -98,13 +93,11 @@ async function statsRows(db, start, end) {
98
93
  destinationVisibility: juniorDestinations.visibility,
99
94
  durationMs: juniorConversations.durationMs,
100
95
  executionStatus: juniorConversations.executionStatus,
101
- executionUpdatedAt: juniorConversations.executionUpdatedAt,
102
96
  identityDisplayName: juniorIdentities.displayName,
103
97
  identityEmail: juniorIdentities.emailNormalized,
104
98
  identityHandle: juniorIdentities.handle,
105
99
  identitySubjectId: juniorIdentities.providerSubjectId,
106
100
  source: juniorConversations.source,
107
- updatedAt: juniorConversations.updatedAt,
108
101
  usage: juniorConversations.usage,
109
102
  userDisplayName: juniorUsers.displayName,
110
103
  userEmail: juniorUsers.primaryEmailNormalized
@@ -162,13 +155,11 @@ async function readConversationStatsFromSql() {
162
155
  let costUsd;
163
156
  let durationMs = 0;
164
157
  let failed = 0;
165
- let hung = 0;
166
158
  let tokens;
167
159
  for (const row of rows) {
168
- const rowSignals = signals(row, nowMs);
160
+ const rowSignals = signals(row);
169
161
  active += rowSignals.active ? 1 : 0;
170
162
  failed += rowSignals.failed ? 1 : 0;
171
- hung += rowSignals.hung ? 1 : 0;
172
163
  const rowTokens = usageTokens(row.usage);
173
164
  const rowCostUsd = usageCostUsd(row.usage);
174
165
  const metrics = {
@@ -192,7 +183,6 @@ async function readConversationStatsFromSql() {
192
183
  durationMs,
193
184
  failed,
194
185
  generatedAt: new Date(nowMs).toISOString(),
195
- hung,
196
186
  locations: statsItems(locations),
197
187
  actors: statsItems(actors),
198
188
  sampleLimit: SAMPLE_LIMIT,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  buildConversationSubagent
3
- } from "./chunk-AUUCAFDE.js";
3
+ } from "./chunk-ZZUBLPXD.js";
4
4
  import {
5
5
  readConversationRecordFromSql
6
- } from "./chunk-ON6YKIQ7.js";
6
+ } from "./chunk-KFUSLFLL.js";
7
7
  import {
8
8
  conversationSubagentTranscriptReportSchema
9
- } from "./chunk-LUAE4MGW.js";
9
+ } from "./chunk-EUZ44ROE.js";
10
10
  import "./chunk-LVUKF5CE.js";
11
11
  import "./chunk-NG2AV7IB.js";
12
- import "./chunk-GUAP3H7O.js";
13
- import "./chunk-3F4OPKGF.js";
12
+ import "./chunk-DHHU2WSG.js";
13
+ import "./chunk-IO65E4ZD.js";
14
14
  import "./chunk-PDO5BLNM.js";
15
15
  import "./chunk-WTYEKPXU.js";
16
- import "./chunk-35BNLDOJ.js";
16
+ import "./chunk-OGHXZ4KQ.js";
17
17
  import "./chunk-4ZNGQH7C.js";
18
18
  import "./chunk-EEZCY5WX.js";
19
19
  import "./chunk-LVA4I4H7.js";
@@ -0,0 +1 @@
1
+ CREATE INDEX "junior_conversation_messages_search_idx" ON "junior_conversation_messages" USING gin (to_tsvector('english', "text"));