@sentry/junior 0.102.3 → 0.104.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 (86) hide show
  1. package/dist/{agent-hooks-I4I2DHSW.js → agent-hooks-EOFSY2PD.js} +5 -5
  2. package/dist/api/conversations/archive.d.ts +7 -0
  3. package/dist/api/conversations/detail.d.ts +7 -0
  4. package/dist/api/conversations/list.d.ts +109 -0
  5. package/dist/api/conversations/routes.d.ts +3 -0
  6. package/dist/api/conversations/schema.d.ts +88 -69
  7. package/dist/api/conversations/stats.d.ts +7 -0
  8. package/dist/api/conversations/subagent.d.ts +7 -0
  9. package/dist/api/http.d.ts +5 -0
  10. package/dist/api/locations/detail.d.ts +10 -2
  11. package/dist/api/locations/list.d.ts +7 -0
  12. package/dist/api/locations/routes.d.ts +3 -0
  13. package/dist/api/locations/schema.d.ts +4 -3
  14. package/dist/api/people/list.d.ts +7 -0
  15. package/dist/api/people/profile.d.ts +7 -0
  16. package/dist/api/people/routes.d.ts +3 -0
  17. package/dist/api/people/schema.d.ts +35 -33
  18. package/dist/api/people/shared.d.ts +4 -4
  19. package/dist/api/route.d.ts +7 -0
  20. package/dist/api/schema.js +11 -17
  21. package/dist/api.js +2184 -88
  22. package/dist/app.js +120 -162
  23. package/dist/chat/conversations/history.d.ts +6 -6
  24. package/dist/chat/conversations/store.d.ts +1 -0
  25. package/dist/chat/pi/messages.d.ts +2 -2
  26. package/dist/chat/plugins/agent-hooks.d.ts +2 -2
  27. package/dist/chat/resource-events/store.d.ts +2 -2
  28. package/dist/chat/sandbox/runtime-dependencies.d.ts +2 -0
  29. package/dist/chat/sandbox/sandbox.d.ts +1 -0
  30. package/dist/chat/services/provider-retry.d.ts +1 -2
  31. package/dist/chat/slack/tools/conversation-search.d.ts +2 -2
  32. package/dist/chat/state/session-log.d.ts +2 -2
  33. package/dist/chat/task-execution/store.d.ts +2 -2
  34. package/dist/chat/tools/search-tools.d.ts +2 -2
  35. package/dist/{chunk-ZSHL44IQ.js → chunk-4PDVOHXP.js} +1 -1
  36. package/dist/{chunk-3OABPOHR.js → chunk-7G4J3CR7.js} +11 -2
  37. package/dist/chunk-AIRE7Q2W.js +362 -0
  38. package/dist/{chunk-QZGVPPIJ.js → chunk-BCULHGZK.js} +24 -4
  39. package/dist/{chunk-IQ36I3DF.js → chunk-CCTCIISK.js} +1 -1
  40. package/dist/{chunk-SHBPSE7A.js → chunk-M3UAVLEN.js} +2 -3
  41. package/dist/{chunk-EMUZSROX.js → chunk-O7ILGCMJ.js} +78 -1
  42. package/dist/{chunk-EOB77KME.js → chunk-QDKRE3LS.js} +340 -9
  43. package/dist/{chunk-DTUSCR2Y.js → chunk-QVTVCJR4.js} +7 -7
  44. package/dist/{chunk-5K4N73TP.js → chunk-RMZ65YAA.js} +3 -3
  45. package/dist/{chunk-VSAFV2GI.js → chunk-RYDF4GOX.js} +3 -3
  46. package/dist/{chunk-ZIX4PNBI.js → chunk-TMWUGGSA.js} +37 -35
  47. package/dist/{chunk-3UK5DFKW.js → chunk-U26ZWZCN.js} +1 -1
  48. package/dist/{chunk-X2IPNCB5.js → chunk-VDHMFCDY.js} +65 -12
  49. package/dist/cli/chat.js +13 -14
  50. package/dist/cli/plugins.js +6 -6
  51. package/dist/cli/snapshot-warmup.js +7 -3
  52. package/dist/cli/upgrade.js +6 -7
  53. package/dist/db/schema/conversations.d.ts +17 -0
  54. package/dist/db/schema.d.ts +17 -0
  55. package/dist/{db-6QP6HY7U.js → db-PDMC67T3.js} +2 -2
  56. package/dist/{legacy-import-R3BMM2GH.js → legacy-import-G333RHJZ.js} +3 -3
  57. package/dist/reporting-schema.d.ts +4 -4
  58. package/dist/{runner-C2ZTIOUD.js → runner-6A7MQRUE.js} +9 -10
  59. package/migrations/0004_useful_magus.sql +1 -0
  60. package/migrations/meta/0004_snapshot.json +1041 -0
  61. package/migrations/meta/_journal.json +7 -0
  62. package/package.json +6 -6
  63. package/dist/api/conversations/list.query.d.ts +0 -103
  64. package/dist/chunk-2RNOB32R.js +0 -17
  65. package/dist/chunk-4XNQSJAX.js +0 -331
  66. package/dist/chunk-4YN2ZXKB.js +0 -66
  67. package/dist/chunk-B5QS4AVO.js +0 -319
  68. package/dist/chunk-F4CQEUTP.js +0 -77
  69. package/dist/chunk-HYDQULR2.js +0 -214
  70. package/dist/chunk-KFP3TZOS.js +0 -102
  71. package/dist/chunk-LJB2TLVT.js +0 -273
  72. package/dist/chunk-LVUKF5CE.js +0 -63
  73. package/dist/chunk-NSP6OGL2.js +0 -671
  74. package/dist/chunk-QNVHH5PU.js +0 -20
  75. package/dist/chunk-QOZOJNSE.js +0 -96
  76. package/dist/chunk-WPHCUGN7.js +0 -84
  77. package/dist/detail-OEIVZYXS.js +0 -68
  78. package/dist/detail-V37NTVBN.js +0 -29
  79. package/dist/list-AJ6RWBOG.js +0 -30
  80. package/dist/list-FWLIZHSW.js +0 -30
  81. package/dist/list-NTUT6A5M.js +0 -121
  82. package/dist/plugin-conversations-F3IBVNFX.js +0 -37
  83. package/dist/profile-3FRQP4HP.js +0 -212
  84. package/dist/reporting/plugin-conversations.d.ts +0 -3
  85. package/dist/stats-7UFY6FPE.js +0 -174
  86. package/dist/subagent-X3ZWJHR4.js +0 -49
@@ -1,212 +0,0 @@
1
- import {
2
- slackLocationLabel,
3
- summaryFromRow,
4
- surfaceLabel
5
- } from "./chunk-QOZOJNSE.js";
6
- import {
7
- ACTIVITY_DAYS,
8
- activityDays,
9
- emptyTotals,
10
- normalizeEmail,
11
- recentActorRows,
12
- statsItems,
13
- verifiedActorWhere
14
- } from "./chunk-KFP3TZOS.js";
15
- import {
16
- conversationActiveDaysColumn,
17
- conversationAggregateColumns
18
- } from "./chunk-F4CQEUTP.js";
19
- import {
20
- actorProfileReportSchema
21
- } from "./chunk-4YN2ZXKB.js";
22
- import "./chunk-HYDQULR2.js";
23
- import "./chunk-PDO5BLNM.js";
24
- import {
25
- getDb,
26
- juniorConversations,
27
- juniorIdentities,
28
- juniorUsers
29
- } from "./chunk-QZGVPPIJ.js";
30
- import "./chunk-SHBPSE7A.js";
31
- import {
32
- juniorDestinations
33
- } from "./chunk-FXFQNHRU.js";
34
- import "./chunk-RT5BUHR5.js";
35
- import "./chunk-B7PUBQQM.js";
36
- import "./chunk-AEWZ7F65.js";
37
- import "./chunk-OB42YVAE.js";
38
- import "./chunk-6GWA276C.js";
39
- import "./chunk-7FBGKXPE.js";
40
- import "./chunk-MLKGABMK.js";
41
-
42
- // src/api/people/profile.query.ts
43
- import { and, eq, gte, sql } from "drizzle-orm";
44
- function emptyProfile(email, nowMs) {
45
- const end = new Date(nowMs);
46
- end.setUTCHours(0, 0, 0, 0);
47
- const start = new Date(end);
48
- start.setUTCDate(start.getUTCDate() - (ACTIVITY_DAYS - 1));
49
- return {
50
- activityDays: activityDays(/* @__PURE__ */ new Map(), nowMs),
51
- generatedAt: new Date(nowMs).toISOString(),
52
- locations: [],
53
- recentConversations: [],
54
- actor: { email },
55
- source: "conversation_index",
56
- surfaces: [],
57
- totals: emptyTotals(),
58
- windowEnd: end.toISOString(),
59
- windowStart: start.toISOString()
60
- };
61
- }
62
- function addAggregate(map, label, row) {
63
- const item = map.get(label) ?? {
64
- active: 0,
65
- conversations: 0,
66
- durationMs: 0,
67
- failed: 0,
68
- label
69
- };
70
- item.active += row.active;
71
- item.conversations += row.conversations;
72
- item.durationMs += row.durationMs;
73
- item.failed += row.failed;
74
- if (row.tokens !== null) item.tokens = (item.tokens ?? 0) + row.tokens;
75
- map.set(label, item);
76
- }
77
- function surfaceExpression() {
78
- return sql`CASE
79
- WHEN ${juniorConversations.source} IN ('api', 'scheduler', 'slack')
80
- THEN ${juniorConversations.source}
81
- WHEN ${juniorConversations.conversationId} LIKE 'slack:%' THEN 'slack'
82
- WHEN ${juniorConversations.conversationId} LIKE 'scheduler:%' THEN 'scheduler'
83
- WHEN ${juniorConversations.conversationId} LIKE 'api:%' THEN 'api'
84
- ELSE 'internal'
85
- END`;
86
- }
87
- function locationLabel(row) {
88
- if (row.surface !== "slack")
89
- return surfaceLabel(row.surface);
90
- if (row.destinationVisibility !== "public") return "Private Conversation";
91
- return slackLocationLabel({
92
- channel: row.channel || void 0,
93
- channelName: row.channelName ?? void 0
94
- }) ?? "Conversation";
95
- }
96
- async function readPeopleProfileFromSql(email) {
97
- const nowMs = Date.now();
98
- const normalizedEmail = normalizeEmail(email);
99
- if (!normalizedEmail) return emptyProfile("", nowMs);
100
- const end = new Date(nowMs);
101
- end.setUTCHours(0, 0, 0, 0);
102
- const start = new Date(end);
103
- start.setUTCDate(start.getUTCDate() - (ACTIVITY_DAYS - 1));
104
- const where = verifiedActorWhere(normalizedEmail);
105
- const surface = surfaceExpression();
106
- const activityDate = sql`TO_CHAR(
107
- ${juniorConversations.lastActivityAt} AT TIME ZONE 'UTC',
108
- 'YYYY-MM-DD'
109
- )`;
110
- const channel = sql`SPLIT_PART(${juniorConversations.conversationId}, ':', 2)`;
111
- const [totalsRows, dayRows, locationRows, surfaceRows, recentRows] = await Promise.all([
112
- getDb().select({
113
- email: juniorUsers.primaryEmailNormalized,
114
- fullName: juniorUsers.displayName,
115
- slackUserId: sql`MAX(${juniorIdentities.providerSubjectId})`,
116
- slackUserName: sql`MAX(${juniorIdentities.handle})`,
117
- activeDays: conversationActiveDaysColumn(),
118
- ...conversationAggregateColumns()
119
- }).from(juniorConversations).innerJoin(
120
- juniorIdentities,
121
- eq(juniorIdentities.id, juniorConversations.actorIdentityId)
122
- ).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(where).groupBy(juniorUsers.primaryEmailNormalized, juniorUsers.displayName),
123
- getDb().select({
124
- date: activityDate,
125
- ...conversationAggregateColumns()
126
- }).from(juniorConversations).innerJoin(
127
- juniorIdentities,
128
- eq(juniorIdentities.id, juniorConversations.actorIdentityId)
129
- ).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(and(where, gte(juniorConversations.lastActivityAt, start))).groupBy(activityDate),
130
- getDb().select({
131
- channel,
132
- channelName: juniorConversations.channelName,
133
- destinationVisibility: juniorDestinations.visibility,
134
- surface,
135
- ...conversationAggregateColumns()
136
- }).from(juniorConversations).innerJoin(
137
- juniorIdentities,
138
- eq(juniorIdentities.id, juniorConversations.actorIdentityId)
139
- ).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).leftJoin(
140
- juniorDestinations,
141
- eq(juniorDestinations.id, juniorConversations.destinationId)
142
- ).where(where).groupBy(
143
- channel,
144
- juniorConversations.channelName,
145
- juniorDestinations.visibility,
146
- surface
147
- ),
148
- getDb().select({ surface, ...conversationAggregateColumns() }).from(juniorConversations).innerJoin(
149
- juniorIdentities,
150
- eq(juniorIdentities.id, juniorConversations.actorIdentityId)
151
- ).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(where).groupBy(surface),
152
- recentActorRows(normalizedEmail)
153
- ]);
154
- const totalsRow = totalsRows[0];
155
- if (!totalsRow) return emptyProfile(normalizedEmail, nowMs);
156
- const actor = {
157
- email: totalsRow.email,
158
- ...totalsRow.fullName ? { fullName: totalsRow.fullName } : {},
159
- ...totalsRow.slackUserId ? { slackUserId: totalsRow.slackUserId } : {},
160
- ...totalsRow.slackUserName ? { slackUserName: totalsRow.slackUserName } : {}
161
- };
162
- const days = /* @__PURE__ */ new Map();
163
- for (const row of dayRows) {
164
- days.set(row.date, {
165
- active: row.active,
166
- conversations: row.conversations,
167
- date: row.date,
168
- durationMs: row.durationMs,
169
- failed: row.failed,
170
- ...row.tokens !== null ? { tokens: row.tokens } : {}
171
- });
172
- }
173
- const locations = /* @__PURE__ */ new Map();
174
- for (const row of locationRows) {
175
- addAggregate(locations, locationLabel(row), row);
176
- }
177
- const surfaces = /* @__PURE__ */ new Map();
178
- for (const row of surfaceRows) {
179
- addAggregate(
180
- surfaces,
181
- surfaceLabel(row.surface),
182
- row
183
- );
184
- }
185
- return {
186
- activityDays: activityDays(days, nowMs),
187
- generatedAt: new Date(nowMs).toISOString(),
188
- locations: statsItems(locations),
189
- recentConversations: recentRows.map(summaryFromRow),
190
- actor,
191
- source: "conversation_index",
192
- surfaces: statsItems(surfaces),
193
- totals: {
194
- active: totalsRow.active,
195
- activeDays: totalsRow.activeDays,
196
- conversations: totalsRow.conversations,
197
- durationMs: totalsRow.durationMs,
198
- failed: totalsRow.failed,
199
- ...totalsRow.tokens !== null ? { tokens: totalsRow.tokens } : {}
200
- },
201
- windowEnd: end.toISOString(),
202
- windowStart: start.toISOString()
203
- };
204
- }
205
-
206
- // src/api/people/profile.ts
207
- async function readPeopleProfile(email) {
208
- return actorProfileReportSchema.parse(await readPeopleProfileFromSql(email));
209
- }
210
- export {
211
- readPeopleProfile
212
- };
@@ -1,3 +0,0 @@
1
- import type { PluginConversationSummary } from "@sentry/junior-plugin-api";
2
- /** Supply bounded SQL conversation metadata to plugin operational reports. */
3
- export declare function listRecentConversationSummaries(requestedLimit?: number): Promise<PluginConversationSummary[]>;
@@ -1,174 +0,0 @@
1
- import {
2
- conversationAggregateColumns
3
- } from "./chunk-F4CQEUTP.js";
4
- import {
5
- conversationStatsReportSchema
6
- } from "./chunk-HYDQULR2.js";
7
- import "./chunk-PDO5BLNM.js";
8
- import {
9
- getDb,
10
- juniorConversations,
11
- juniorIdentities,
12
- juniorUsers
13
- } from "./chunk-QZGVPPIJ.js";
14
- import "./chunk-SHBPSE7A.js";
15
- import {
16
- juniorDestinations
17
- } from "./chunk-FXFQNHRU.js";
18
- import "./chunk-RT5BUHR5.js";
19
- import "./chunk-B7PUBQQM.js";
20
- import "./chunk-AEWZ7F65.js";
21
- import "./chunk-OB42YVAE.js";
22
- import "./chunk-6GWA276C.js";
23
- import "./chunk-7FBGKXPE.js";
24
- import "./chunk-MLKGABMK.js";
25
-
26
- // src/api/conversations/stats.query.ts
27
- import { and, eq, gte, isNull, lte } from "drizzle-orm";
28
- var WINDOW_MS = 90 * 24 * 60 * 60 * 1e3;
29
- function emptyStatsItem(label) {
30
- return {
31
- active: 0,
32
- conversations: 0,
33
- durationMs: 0,
34
- failed: 0,
35
- label
36
- };
37
- }
38
- function addUsd(current, next) {
39
- return Math.round(((current ?? 0) + next) * 1e12) / 1e12;
40
- }
41
- function actorLabel(row) {
42
- return row.userEmail?.trim() || row.identityEmail?.trim() || row.userDisplayName?.trim() || row.identityDisplayName?.trim() || row.identityHandle?.trim() || row.identitySubjectId?.trim() || "Unknown";
43
- }
44
- function surfaceLabel(source) {
45
- if (source === "scheduler") return "Scheduler";
46
- if (source === "api") return "API";
47
- if (source === "internal" || source === "local") return "Internal";
48
- return "Conversation";
49
- }
50
- function locationLabel(row) {
51
- if (row.destinationProvider !== "slack") {
52
- return surfaceLabel(row.source);
53
- }
54
- if (row.destinationKind === "dm") {
55
- return "Direct Message";
56
- }
57
- if (row.destinationVisibility !== "public") {
58
- return "Private Conversation";
59
- }
60
- const name = (row.channelName ?? row.destinationDisplayName)?.trim().replace(/^#/, "");
61
- return name ? `#${name}` : "Public Channel";
62
- }
63
- function addAggregate(map, label, row) {
64
- const item = map.get(label) ?? emptyStatsItem(label);
65
- item.active += row.active;
66
- item.conversations += row.conversations;
67
- item.durationMs += row.durationMs;
68
- item.failed += row.failed;
69
- if (row.tokens !== null) {
70
- item.tokens = (item.tokens ?? 0) + row.tokens;
71
- }
72
- if (row.costUsd !== null) {
73
- item.costUsd = addUsd(item.costUsd, row.costUsd);
74
- }
75
- map.set(label, item);
76
- }
77
- function statsItems(map) {
78
- return [...map.values()].sort(
79
- (left, right) => right.conversations - left.conversations || left.label.localeCompare(right.label)
80
- );
81
- }
82
- function statsWhere(start, end) {
83
- return and(
84
- isNull(juniorConversations.parentConversationId),
85
- gte(juniorConversations.lastActivityAt, start),
86
- lte(juniorConversations.lastActivityAt, end)
87
- );
88
- }
89
- async function aggregateStats(db, start, end) {
90
- const where = statsWhere(start, end);
91
- const [totalsRows, actorRows, locationRows] = await Promise.all([
92
- db.select(conversationAggregateColumns()).from(juniorConversations).where(where),
93
- db.select({
94
- identityDisplayName: juniorIdentities.displayName,
95
- identityEmail: juniorIdentities.emailNormalized,
96
- identityHandle: juniorIdentities.handle,
97
- identitySubjectId: juniorIdentities.providerSubjectId,
98
- userDisplayName: juniorUsers.displayName,
99
- userEmail: juniorUsers.primaryEmailNormalized,
100
- ...conversationAggregateColumns()
101
- }).from(juniorConversations).leftJoin(
102
- juniorIdentities,
103
- eq(juniorIdentities.id, juniorConversations.actorIdentityId)
104
- ).leftJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(where).groupBy(
105
- juniorIdentities.displayName,
106
- juniorIdentities.emailNormalized,
107
- juniorIdentities.handle,
108
- juniorIdentities.providerSubjectId,
109
- juniorUsers.displayName,
110
- juniorUsers.primaryEmailNormalized
111
- ),
112
- db.select({
113
- channelName: juniorConversations.channelName,
114
- destinationDisplayName: juniorDestinations.displayName,
115
- destinationKind: juniorDestinations.kind,
116
- destinationProvider: juniorDestinations.provider,
117
- destinationVisibility: juniorDestinations.visibility,
118
- source: juniorConversations.source,
119
- ...conversationAggregateColumns()
120
- }).from(juniorConversations).leftJoin(
121
- juniorDestinations,
122
- eq(juniorDestinations.id, juniorConversations.destinationId)
123
- ).where(where).groupBy(
124
- juniorConversations.channelName,
125
- juniorConversations.source,
126
- juniorDestinations.displayName,
127
- juniorDestinations.kind,
128
- juniorDestinations.provider,
129
- juniorDestinations.visibility
130
- )
131
- ]);
132
- return { actorRows, locationRows, totals: totalsRows[0] };
133
- }
134
- async function readConversationStatsFromSql() {
135
- const nowMs = Date.now();
136
- const windowStartMs = nowMs - WINDOW_MS;
137
- const { actorRows, locationRows, totals } = await aggregateStats(
138
- getDb(),
139
- new Date(windowStartMs),
140
- new Date(nowMs)
141
- );
142
- const actors = /* @__PURE__ */ new Map();
143
- const locations = /* @__PURE__ */ new Map();
144
- for (const row of actorRows) {
145
- addAggregate(actors, actorLabel(row), row);
146
- }
147
- for (const row of locationRows) {
148
- addAggregate(locations, locationLabel(row), row);
149
- }
150
- return {
151
- active: totals?.active ?? 0,
152
- conversations: totals?.conversations ?? 0,
153
- durationMs: totals?.durationMs ?? 0,
154
- failed: totals?.failed ?? 0,
155
- generatedAt: new Date(nowMs).toISOString(),
156
- locations: statsItems(locations),
157
- actors: statsItems(actors),
158
- source: "conversation_index",
159
- ...totals?.costUsd !== null && totals?.costUsd !== void 0 ? { costUsd: addUsd(void 0, totals.costUsd) } : {},
160
- ...totals?.tokens !== null && totals?.tokens !== void 0 ? { tokens: totals.tokens } : {},
161
- windowEnd: new Date(nowMs).toISOString(),
162
- windowStart: new Date(windowStartMs).toISOString()
163
- };
164
- }
165
-
166
- // src/api/conversations/stats.ts
167
- async function readConversationStats() {
168
- return conversationStatsReportSchema.parse(
169
- await readConversationStatsFromSql()
170
- );
171
- }
172
- export {
173
- readConversationStats
174
- };
@@ -1,49 +0,0 @@
1
- import {
2
- buildConversationSubagent
3
- } from "./chunk-NSP6OGL2.js";
4
- import {
5
- readConversationRecordFromSql
6
- } from "./chunk-LJB2TLVT.js";
7
- import {
8
- conversationSubagentTranscriptReportSchema
9
- } from "./chunk-HYDQULR2.js";
10
- import "./chunk-LVUKF5CE.js";
11
- import "./chunk-EMUZSROX.js";
12
- import "./chunk-B5QS4AVO.js";
13
- import "./chunk-VSAFV2GI.js";
14
- import "./chunk-PDO5BLNM.js";
15
- import "./chunk-IQ36I3DF.js";
16
- import "./chunk-QZGVPPIJ.js";
17
- import "./chunk-4ZNGQH7C.js";
18
- import "./chunk-SHBPSE7A.js";
19
- import "./chunk-FXFQNHRU.js";
20
- import "./chunk-RT5BUHR5.js";
21
- import "./chunk-B7PUBQQM.js";
22
- import "./chunk-AEWZ7F65.js";
23
- import "./chunk-OB42YVAE.js";
24
- import "./chunk-6GWA276C.js";
25
- import "./chunk-7FBGKXPE.js";
26
- import "./chunk-MLKGABMK.js";
27
-
28
- // src/api/conversations/subagent.ts
29
- async function readConversationSubagent(conversationId, subagentId) {
30
- const record = await readConversationRecordFromSql(conversationId);
31
- if (!record) {
32
- return conversationSubagentTranscriptReportSchema.parse({
33
- type: "subagent",
34
- createdAt: (/* @__PURE__ */ new Date(0)).toISOString(),
35
- id: subagentId,
36
- status: "error",
37
- subagentKind: "unknown",
38
- transcript: [],
39
- transcriptAvailable: false,
40
- unavailableReason: "not_found"
41
- });
42
- }
43
- return conversationSubagentTranscriptReportSchema.parse(
44
- await buildConversationSubagent(record.conversation, subagentId)
45
- );
46
- }
47
- export {
48
- readConversationSubagent
49
- };